diff options
author | Michael Brown | 2013-08-06 20:16:30 +0200 |
---|---|---|
committer | Michael Brown | 2013-08-07 13:06:28 +0200 |
commit | 55201e2d0e60003edfd7e2c7c4c592136b000f44 (patch) | |
tree | 3be4677eaac90b8c686edf1318a8726895868649 /src/config | |
parent | [nfs] Fix an issue with the selection of a local port (diff) | |
download | ipxe-55201e2d0e60003edfd7e2c7c4c592136b000f44.tar.gz ipxe-55201e2d0e60003edfd7e2c7c4c592136b000f44.tar.xz ipxe-55201e2d0e60003edfd7e2c7c4c592136b000f44.zip |
[settings] Expose CPUID instruction via settings mechanism
Allow CPUID values to be read using the syntax
${cpuid/<register>.<function>}
For example, ${cpuid/2.0x80000001} will give the value of %ecx after
calling CPUID with %eax=0x80000001. Values for <register> are encoded
as %eax=0, %ebx=1, %ecx=2, %edx=3.
The numeric encoding is more sophisticated than described above,
allowing for settings such as the CPU model (obtained by calling CPUID
with %eax=0x80000002-0x80000004 inclusive and concatenating the values
returned in %eax:%ebx:%ecx:%edx). See the source code for details.
The "cpuvendor" and "cpumodel" settings provide easy access to these
more complex CPUID settings.
This functionality is intended to complement the "cpuid" command,
which allows for testing individual CPUID feature bits.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/config.c | 3 | ||||
-rw-r--r-- | src/config/settings.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/config/config.c b/src/config/config.c index 437f6133..06c5713f 100644 --- a/src/config/config.c +++ b/src/config/config.c @@ -313,6 +313,9 @@ REQUIRE_OBJECT ( pci_settings ); #ifdef VMWARE_SETTINGS REQUIRE_OBJECT ( guestinfo ); #endif +#ifdef CPUID_SETTINGS +REQUIRE_OBJECT ( cpuid_settings ); +#endif /* * Drag in selected keyboard map diff --git a/src/config/settings.h b/src/config/settings.h index 9c5c2d20..97131e88 100644 --- a/src/config/settings.h +++ b/src/config/settings.h @@ -10,6 +10,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define PCI_SETTINGS /* PCI device settings */ +//#define CPUID_SETTINGS /* CPUID settings */ //#define VMWARE_SETTINGS /* VMware GuestInfo settings */ #include <config/local/settings.h> |