summaryrefslogtreecommitdiffstats
path: root/src/config/config.c
diff options
context:
space:
mode:
authorMichael Brown2013-08-12 14:42:12 +0200
committerMichael Brown2013-08-12 23:00:36 +0200
commitc692a690dafe4c6bdb406c4c5e0ae66bfcb2f6cb (patch)
treed4dc5f8d6d0938404e649f24e79ec91f81548188 /src/config/config.c
parent[settings] Allow numeric_setting_value() to handle long setting values (diff)
downloadipxe-c692a690dafe4c6bdb406c4c5e0ae66bfcb2f6cb.tar.gz
ipxe-c692a690dafe4c6bdb406c4c5e0ae66bfcb2f6cb.tar.xz
ipxe-c692a690dafe4c6bdb406c4c5e0ae66bfcb2f6cb.zip
[settings] Expose memory map via settings mechanism
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>
Diffstat (limited to 'src/config/config.c')
-rw-r--r--src/config/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config/config.c b/src/config/config.c
index 06c5713f..c8cb5399 100644
--- a/src/config/config.c
+++ b/src/config/config.c
@@ -316,6 +316,9 @@ REQUIRE_OBJECT ( guestinfo );
#ifdef CPUID_SETTINGS
REQUIRE_OBJECT ( cpuid_settings );
#endif
+#ifdef MEMMAP_SETTINGS
+REQUIRE_OBJECT ( memmap_settings );
+#endif
/*
* Drag in selected keyboard map