Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33387 )
Change subject: mainboard/emulation/qemu-aarch64: Add new board for ARMv8 ......................................................................
Patch Set 15:
(6 comments)
Patch Set 15:
I believe it's time to review.
I relocated BOOTBLOCK code into DRAM successfully and reverted the change in /arch/arm64/armv8/cache.c that means we can use a BSS section.
Now, I can make coreboot.rom for QEMU/AArch64 and execute it via: $ qemu-system-aarch64 -bios ./build/coreboot.rom -M virt,secure=on -cpu cortex-a53 -nographic -m 1024M
The result of this execution is "Payload not loaded" because I put an empty payload. However, The comment "Payload not loaded" indicates we are ready to pass the execution to the payload.
Could you review this CL?
Thank you for your work. I'd assume the mainboard port done as soon as you were able to boot a payload.
1) Please try to run a payload, for example a Linux kernel. This can easily be done by generating an uImage/FIT and selecting FIT payload or by selecting LinuxBoot payload. Right now it won't work, as the payload will be loaded to _dram.
It would be nice to use the FDT passed by qemu to coreboot, as right now we have to manually specify a FDT when building the uImage/FIT.
2) Please add Documentation/. It has to be written in markdown and is automatically converted by sphinx to HTML. It would nice to have a short chapter how to use this mainboard port, TODOs and a description why it's implemented the way it is.
https://review.coreboot.org/c/coreboot/+/33387/15/src/mainboard/emulation/qe... File src/mainboard/emulation/qemu-aarch64/bootblock_custom.S:
https://review.coreboot.org/c/coreboot/+/33387/15/src/mainboard/emulation/qe... PS15, Line 11: ENTRY(_start) doesn't boot rom pass FDT as argument?
https://review.coreboot.org/c/coreboot/+/33387/15/src/mainboard/emulation/qe... PS15, Line 45: /* Jump to code in DRAM */ restore saved FDT pointer and pass it to bootblock
https://review.coreboot.org/c/coreboot/+/33387/15/src/mainboard/emulation/qe... File src/mainboard/emulation/qemu-aarch64/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33387/15/src/mainboard/emulation/qe... PS15, Line 1: /* cbmem_recovery needs to be called in romstage, too
https://review.coreboot.org/c/coreboot/+/33387/15/src/mainboard/emulation/qe... PS15, Line 22: if (!dev) { I guess this is dead code and will never happen
https://review.coreboot.org/c/coreboot/+/33387/15/src/mainboard/emulation/qe... PS15, Line 28: ram_resource(dev, 0, VIRT_DRAM_START >> 10, discovered << 10); ram_resouce() should be called in "discover resources" phase, not in "enable" phase.
https://review.coreboot.org/c/coreboot/+/33387/15/src/mainboard/emulation/qe... File src/mainboard/emulation/qemu-aarch64/timer.c:
https://review.coreboot.org/c/coreboot/+/33387/15/src/mainboard/emulation/qe... PS15, Line 9: void udelay(unsigned int n); I think this file can be droped by simply selecting CONFIG_ARM64_USE_ARCH_TIMER