mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 20:10:18 +03:00
[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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user