-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add section loading and entry point execution to UEFI loader
This loads all sections specified by PE header at the correct memory location, and executes the entry point function. Only the OutputString function of text output protocol is implemented, so the only application we can run is hello world. Test: th Bug: 294283461 Change-Id: I786bc8b7db9e1c0a6019b8fe4ba5a8c8ab4f2936
- Loading branch information
1 parent
2e3c153
commit 07b80bf
Showing
4 changed files
with
103 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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,29 @@ | ||
## Build | ||
|
||
``` | ||
make qemu-virt-arm64-test | ||
``` | ||
|
||
## Run | ||
|
||
``` | ||
qemu-system-aarch64 -cpu max -m 512 -smp 1 -machine virt,highmem=off \ | ||
-kernel qemu-virt-arm64-test/lk.elf \ | ||
-net none -nographic \ | ||
-drive if=none,file=lib/uefi/helloworld_aa64.efi,id=blk,format=raw \ | ||
-device virtio-blk-device,drive=blk | ||
``` | ||
|
||
|
||
Once you see the main console prompt, enter `uefi_load virtio0` to load the hello world UEFI application. | ||
|
||
``` | ||
starting app shell | ||
entering main console loop | ||
] uefi_load virtio0 | ||
bio_read returns 4096, took 1 msecs (4096000 bytes/sec) | ||
PE header machine type: aa64 | ||
Valid UEFI application found. | ||
Entry function located at 0xffff000780067380 | ||
Hello World! | ||
``` |
Binary file not shown.
This file contains 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
This file contains 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