summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/fdtmem.h
Commit message (Collapse)AuthorAgeFilesLines
* [build] Mark core files as permitted for UEFI Secure BootMichael Brown2026-01-141-0/+1
| | | | | | | | | | | | Mark all files used in a standard build of bin-x86_64-efi/snponly.efi as permitted for UEFI Secure Boot. These files represent the core functionality of iPXE that is guaranteed to have been included in every binary that was previously subject to a security review and signed by Microsoft. It is therefore legitimate to assume that at least these files have already been reviewed to the required standard multiple times. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fdtmem] Update to use the generic system memory map APIMichael Brown2025-05-161-3/+19
| | | | | | | | | Provide an implementation of the system memory map API based on the system device tree, excluding any memory outside the size of the accessible physical address space and defining an in-use region to cover the relocated copy of iPXE and the system device tree. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fdtmem] Record size of accessible physical address spaceMichael Brown2025-05-141-1/+1
| | | | | | | | | | | | The size of accessible physical address space will be required for the runtime memory map, not just at relocation time. Make this size an additional parameter to fdt_register() (matching the prototype for fdt_relocate()), and record the value for future reference. Note that we cannot simply store the limit in fdt_relocate() since it is called before .data is writable and before .bss is zeroed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [riscv] Avoid potentially overwriting the scratch area during relocationMichael Brown2025-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | We do not currently describe the temporary page table or the temporary stack as areas to be avoided during relocation of the iPXE image to a new physical address. Perform the copy of the iPXE image and zeroing of the .bss within libprefix.S, after we have no futher use for the temporary page table or the temporary initial stack. Perform the copy and registration of the system device tree in C code after relocation is complete and the new stack (within .bss) has been set up. This provides a clean separation of responsibilities between the RISC-V libprefix.S and the architecture-independent fdtmem.c. The prefix is responsible only for relocating iPXE to the new physical address returned from fdtmem_relocate(), and doesn't need to know or care where fdtmem.c is planning to place the copy of the device tree. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fdtmem] Add ability to parse FDT memory map for a relocation addressMichael Brown2025-05-111-0/+17
Add code to parse the devicetree memory nodes, memory reservations block, and reserved memory nodes to construct an ordered and non-overlapping description of the system memory map, and use this to identify a suitable address to which iPXE may be relocated at runtime. We choose to place iPXE on a superpage boundary (as required by the paging code), and to use the highest available address within accessible memory. This mirrors the approach taken for x86 BIOS builds, where we have long assumed that any image format that we might need to support may require specific fixed addresses towards the bottom of the memory map, but is very unlikely to require specific fixed addresses towards the top of the memory map (since those addresses may not exist, depending on the amount of installed RAM). Signed-off-by: Michael Brown <mcb30@ipxe.org>