mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
bi_load itself loads various things into the staging area which can cause it to grow, which may result in the staging area moving, including the kernel. Therefore the address we get for the kernel entry point prior to bi_load may not be correct afterwards when we actually call it, and so we must defer the translation. On arm and riscv (but not arm64, which predates both of them in loader.efi and did not gain a copy of arm's added printf when arm support was added) we also printf this entry point to the console, which we can no longer do since bi_load calls ExitBootServices, so remove this printf that, in practice, seems to not be so useful, given nobody ever felt the need to add it to arm64. If anyone really feels this is an important printf to have then bi_load will need to be split so we can call printf after all the loading and potential reallocation of the staging area, but before ExitBootServices is called. We may also want to make this code more uniform and shared between the three architectures here, since there isn't much architecture-specific about this (and something like the RISC-V boot hart protocol could easily be made an MD hook). Reviewed by: imp Fixes:0cafabf97f("Add support for arm64 to loader.efi and boot1.efi") Fixes:ea7796a9ae("EFI: don't call printf after ExitBootServices, since it uses Boot Services") Fixes:2192efc03b("RISC-V boot1.efi and loader.efi support") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56431