|
iPXE
|
Flattened Device Tree memory map. More...
#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | MEMMAP_PREFIX_fdt __fdt_ |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static | __attribute__ ((always_inline)) void MEMMAP_INLINE(fdt |
| Synchronise in-use regions with the externally visible system memory map. More... | |
| static | memmap_sync (void) |
| Synchronise in-use regions with the externally visible system memory map. More... | |
| physaddr_t | fdtmem_relocate (struct fdt_header *hdr, physaddr_t max) |
| Find a relocation address for iPXE. More... | |
| int | fdtmem_register (struct fdt_header *hdr, physaddr_t max) |
| Copy and register system device tree. More... | |
Flattened Device Tree memory map.
Definition in file fdtmem.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Synchronise in-use regions with the externally visible system memory map.
| static memmap_sync | ( | void | ) |
Synchronise in-use regions with the externally visible system memory map.
In environments such as x86 BIOS, we need to patch the global system memory map to hide our in-use regions, since there is no other way to communicate this information to external code.
| physaddr_t fdtmem_relocate | ( | struct fdt_header * | hdr, |
| physaddr_t | max | ||
| ) |
Find a relocation address for iPXE.
| hdr | FDT header |
| max | Maximum accessible physical address |
| new | New physical address for relocation |
Find a suitably aligned address towards the top of existent 32-bit memory to which iPXE may be relocated, along with a copy of the system device tree.
This function may be called very early in initialisation, before .data is writable or .bss has been zeroed. Neither this function nor any function that it calls may write to or rely upon the zero initialisation of any static variables.
Definition at line 264 of file fdtmem.c.
References _prefix, addr, assert(), DBGC, DBGC_MEMMAP, fdt_parse(), fdtmem_describe(), fdtmem_len(), FDTMEM_MAX32, hdr, fdt::len, len, max, memmap_region::max, max_align, MEMMAP_FL_RESERVED, MEMMAP_FL_USED, memmap_is_usable(), memmap_update(), memsz, memmap_region::min, next, old, rc, and strerror().
| int fdtmem_register | ( | struct fdt_header * | hdr, |
| physaddr_t | max | ||
| ) |
Copy and register system device tree.
| hdr | FDT header |
| max | Maximum accessible physical address |
| rc | Return status code |
Definition at line 345 of file fdtmem.c.
References _end, _prefix, assert(), DBGC, fdt_parse(), fdtmem_len(), fdtmem_max, hdr, fdt::len, max, memcpy(), memmap_dump_all(), memmap_use(), rc, strerror(), and sysfdt.
1.8.15