From c692a690dafe4c6bdb406c4c5e0ae66bfcb2f6cb Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 12 Aug 2013 13:42:12 +0100 Subject: [settings] Expose memory map via settings mechanism Allow memory map entries to be read using the syntax ${memmap/..} where is the index of the memory region, is a bitmask where bit 0 represents the start address and bit 1 represents the length (allowing the end address to be encoded by having both bits 0 and 1 set), and is the number of bits by which to shift the result. This allows for several values of interest to be encoded. For example: ${memmap/.1.0:hexraw} # 64-bit start address of ${memmap/.2.0:hexraw} # 64-bit length of , in bytes ${memmap/.3.0:hexraw} # 64-bit end address of ${memmap/.2.10:int32} # Length of , in kB ${memmap/.2.20:int32} # Length of , in MB The numeric encoding is slightly more sophisticated than described here, allowing a single encoding to cover multiple regions. (See the source code for details.) The primary use case for this feature is to provide the total system memory size (in MB) via the "memsize" predefined setting. Signed-off-by: Michael Brown --- src/include/ipxe/errfile.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include') diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h index 0fd3facaa..4053923be 100644 --- a/src/include/ipxe/errfile.h +++ b/src/include/ipxe/errfile.h @@ -285,6 +285,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define ERRFILE_linux_pci ( ERRFILE_OTHER | 0x003c0000 ) #define ERRFILE_pci_settings ( ERRFILE_OTHER | 0x003d0000 ) #define ERRFILE_efi_reboot ( ERRFILE_OTHER | 0x003e0000 ) +#define ERRFILE_memmap_settings ( ERRFILE_OTHER | 0x003f0000 ) /** @} */ -- cgit v1.2.3-55-g7522