Files
lk/lib/uefi
Ying-Chun Liu (PaulLiu) de3e831eae lib: uefi: add charset converting helper functions.
The UEFI variable names are in UTF-16. We add several helper
functions to convert US-ASCII to UTF-16.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
2025-08-14 12:25:36 -04:00
..
2024-11-06 10:12:17 -08:00

Build

make qemu-virt-arm64-test

Note, this may fail if your system does not have aarch64-elf-gcc installed. To address, download from here, unzip, and add the extracted dir to PATH.

Run

qemu-system-aarch64 -cpu max -m 512 -smp 1 -machine virt,highmem=off \
	-kernel build-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!