mirror of
https://github.com/ipxe/ipxe
synced 2026-01-31 11:39:46 +03:00
[fdtmem] Update to use the generic system memory map API
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>
This commit is contained in:
@@ -10,9 +10,25 @@
|
||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <stdint.h>
|
||||
#include <ipxe/fdt.h>
|
||||
|
||||
extern physaddr_t fdtmem_relocate ( struct fdt_header *hdr, size_t limit );
|
||||
extern int fdtmem_register ( struct fdt_header *hdr, size_t limit );
|
||||
#ifdef MEMMAP_FDT
|
||||
#define MEMMAP_PREFIX_fdt
|
||||
#else
|
||||
#define MEMMAP_PREFIX_fdt __fdt_
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Synchronise in-use regions with the externally visible system memory map
|
||||
*
|
||||
*/
|
||||
static inline __attribute__ (( always_inline )) void
|
||||
MEMMAP_INLINE ( fdt, memmap_sync ) ( void ) {
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
||||
struct fdt_header;
|
||||
|
||||
extern physaddr_t fdtmem_relocate ( struct fdt_header *hdr, physaddr_t max );
|
||||
extern int fdtmem_register ( struct fdt_header *hdr, physaddr_t max );
|
||||
|
||||
#endif /* _IPXE_FDTMEM_H */
|
||||
|
||||
@@ -124,6 +124,7 @@ struct used_region {
|
||||
|
||||
/* Include all architecture-independent ACPI API headers */
|
||||
#include <ipxe/null_memmap.h>
|
||||
#include <ipxe/fdtmem.h>
|
||||
|
||||
/* Include all architecture-dependent ACPI API headers */
|
||||
#include <bits/memmap.h>
|
||||
|
||||
Reference in New Issue
Block a user