Skip to content

Add aarch64 emulation#732

Draft
felipebalbi wants to merge 1 commit into
oreboot:mainfrom
felipebalbi:add-aarch64-emulation
Draft

Add aarch64 emulation#732
felipebalbi wants to merge 1 commit into
oreboot:mainfrom
felipebalbi:add-aarch64-emulation

Conversation

@felipebalbi

Copy link
Copy Markdown
Contributor

First we teach xtask how to compile RiscV emulation and proceed with re-adding qemu-aarch64 target.

@felipebalbi

Copy link
Copy Markdown
Contributor Author

For now I'm really just looking for confirmation that I'm in the right path. Do we want to revisit qemu-aarch64 or do we start it all from scratch? Note that I removed all the code pointing at oreboot::drivers and the aarch64 emulation target is basically a stub of what it should be doing.

I can see life with qemu + gdb, but there's no output of any kind. Any suggestions on how to add proper PL011 support? There are some crates, but they depend on cortex-m.

@orangecms FYI

@felipebalbi felipebalbi mentioned this pull request Mar 5, 2024
@felipebalbi

Copy link
Copy Markdown
Contributor Author

Failing due to lack of #728

@felipebalbi felipebalbi force-pushed the add-aarch64-emulation branch 2 times, most recently from 51c2c56 to 5aedc34 Compare March 6, 2024 22:22
@codecov

codecov Bot commented Mar 6, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.21%. Comparing base (08384ec) to head (1b7a4fa).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #732   +/-   ##
=====================================
  Coverage   0.21%   0.21%           
=====================================
  Files         22      22           
  Lines        938     938           
=====================================
  Hits           2       2           
  Misses       936     936           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@felipebalbi felipebalbi force-pushed the add-aarch64-emulation branch from 5aedc34 to 6a04b29 Compare March 6, 2024 22:53
@orangecms

Copy link
Copy Markdown
Member

Looks perfectly fine to me :)

For QEMU, the approach from what I am thinking of would be to really just have the main stage and test the higher-level features - decompression, running some test payload, and seeing that our setup works fine (whatever it'd be on Arm, for RISC-V it'd be the SBI, etc). Does that make sense to you as well?

If you don't mind, I'd love to take that first commit here already. Would you move that over into another PR? :)

@orangecms

Copy link
Copy Markdown
Member

For the PL011, you can use the register block definition from here:
https://github.com/apgoetz/pl011_qemu/blob/master/src/lib.rs

just copy that over, essentially, and implement the embedded HAL trait for it and the oreboot log library:
https://github.com/oreboot/oreboot/blob/main/src/lib/log/src/lib.rs

Signed-off-by: Felipe Balbi <felipe@balbi.sh>
@felipebalbi felipebalbi force-pushed the add-aarch64-emulation branch from 6a04b29 to 1b7a4fa Compare March 7, 2024 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants