-
-
Notifications
You must be signed in to change notification settings - Fork 29
real-hw-test: init #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
phip1611
wants to merge
20
commits into
rust-osdev:main
Choose a base branch
from
phip1611:real-hw-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
dc7335d
real-hw-test: add UEFI application scaffold
phip1611 3ed1141
real-hw-test: add QEMU development environment
phip1611 e3cd523
nix: add flake development environment
phip1611 6cc4a1d
real-hw-test: discover and disconnect serial devices
phip1611 ae93c9f
real-hw-test: add barebones UART preflight
phip1611 f972472
real-hw-test: exercise uart_16550 devices
phip1611 ce0bb7e
real-hw-test: add interactive serial checks
phip1611 aa61f5f
real-hw-test: document and guard hardware deployment
phip1611 f374e11
real-hw-test: disable firmware watchdog
phip1611 e201f0d
mmio: use wrapping pointer offsets
phip1611 3707925
real-hw-test: persist diagnostics on the boot volume
phip1611 39d4868
real-hw-test: bound nonblocking transmit checks
phip1611 ac3c2cb
real-hw-test: report persisted log location
phip1611 338454c
ci: smoke-test UEFI UART paths in QEMU
phip1611 60752aa
real-hw-test: gate x86-specific code paths
phip1611 99ab20f
real-hw-test: reach PCI I/O BARs through the ACPI I/O window
phip1611 0bd2baf
real-hw-test: parameterize the build and QEMU tooling per architecture
phip1611 090dff3
ci: smoke-test aarch64 UEFI UART paths in QEMU
phip1611 7adbe81
real-hw-test: record the architecture in persisted logs
phip1611 128bac2
real-hw-test: build and deploy every architecture at once
phip1611 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| name: UEFI real-hardware test smoke test | ||
|
|
||
| on: [pull_request, merge_group] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event_name }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| qemu: | ||
| name: Headless QEMU TCG (${{ matrix.arch }}) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| arch: [x86_64, aarch64] | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - name: Setup Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| targets: x86_64-unknown-uefi,aarch64-unknown-uefi | ||
| - name: Install QEMU, firmware, and harness tools | ||
| run: | | ||
| sudo apt-get update | ||
| if [[ "${{ matrix.arch }}" == x86_64 ]]; then | ||
| sudo apt-get install -y dosfstools mtools ovmf qemu-system-x86 socat | ||
| else | ||
| sudo apt-get install -y dosfstools mtools qemu-efi-aarch64 qemu-system-arm socat | ||
| fi | ||
| - name: Run deterministic UEFI checks | ||
| working-directory: real-hw-test | ||
| run: | | ||
| if [[ "${{ matrix.arch }}" == x86_64 ]]; then | ||
| # The ovmf package layout varies across Ubuntu releases: combined | ||
| # vs split images, 4M variants, and symlinks. Prefer combined. | ||
| OVMF="" | ||
| for candidate in /usr/share/ovmf/OVMF.fd /usr/share/OVMF/OVMF.fd; do | ||
| if [[ -r "$candidate" ]]; then | ||
| OVMF=$candidate | ||
| break | ||
| fi | ||
| done | ||
| if [[ -z "$OVMF" ]]; then | ||
| OVMF=$(find -L /usr/share/OVMF /usr/share/ovmf -maxdepth 1 \ | ||
| -name 'OVMF_CODE*.fd' -readable 2>/dev/null | sort | head -n1) | ||
| fi | ||
| if [[ -z "$OVMF" ]]; then | ||
| echo "error: the ovmf package did not install a usable image:" >&2 | ||
| ls -la /usr/share/OVMF /usr/share/ovmf >&2 || true | ||
| exit 1 | ||
| fi | ||
| make ci-qemu OVMF="$OVMF" | ||
| else | ||
| export AAVMF_CODE=/usr/share/AAVMF/AAVMF_CODE.fd | ||
| export AAVMF_VARS=/usr/share/AAVMF/AAVMF_VARS.fd | ||
| make ci-qemu ARCH=aarch64 | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| use flake | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. split the addition of flake.nix into a dedicated commit, and squash this change into that new commit |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /build/ | ||
| /target/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| [package] | ||
| name = "uart-16550-real-hw-test" | ||
| version = "0.1.0" | ||
| edition = "2024" | ||
| publish = false | ||
|
|
||
| [dependencies] | ||
| jiff = { version = "0.2", default-features = false } | ||
| uart_16550 = { path = ".." } | ||
| uefi = { version = "0.38.0", features = ["alloc", "global_allocator", "jiff02", "panic_handler"] } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like that the driver needs to know anything about the CI test. Let's strip all functionality of the testing infrastructur that depends on this.