c692a690da
Allow memory map entries to be read using the syntax ${memmap/<region>.<properties>.<scale>} where <region> is the index of the memory region, <properties> 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 <scale> is the number of bits by which to shift the result. This allows for several values of interest to be encoded. For example: ${memmap/<region>.1.0:hexraw} # 64-bit start address of <region> ${memmap/<region>.2.0:hexraw} # 64-bit length of <region>, in bytes ${memmap/<region>.3.0:hexraw} # 64-bit end address of <region> ${memmap/<region>.2.10:int32} # Length of <region>, in kB ${memmap/<region>.2.20:int32} # Length of <region>, 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 <mcb30@ipxe.org>
20 lines
412 B
C
20 lines
412 B
C
#ifndef CONFIG_SETTINGS_H
|
|
#define CONFIG_SETTINGS_H
|
|
|
|
/** @file
|
|
*
|
|
* Configuration settings sources
|
|
*
|
|
*/
|
|
|
|
FILE_LICENCE ( GPL2_OR_LATER );
|
|
|
|
#define PCI_SETTINGS /* PCI device settings */
|
|
//#define CPUID_SETTINGS /* CPUID settings */
|
|
//#define MEMMAP_SETTINGS /* Memory map settings */
|
|
//#define VMWARE_SETTINGS /* VMware GuestInfo settings */
|
|
|
|
#include <config/local/settings.h>
|
|
|
|
#endif /* CONFIG_SETTINGS_H */
|