2013-07-09 16:01:52 +01:00
|
|
|
#ifndef CONFIG_SETTINGS_H
|
|
|
|
|
#define CONFIG_SETTINGS_H
|
|
|
|
|
|
|
|
|
|
/** @file
|
|
|
|
|
*
|
|
|
|
|
* Configuration settings sources
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2015-03-02 11:54:40 +00:00
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
2026-01-14 13:25:34 +00:00
|
|
|
FILE_SECBOOT ( PERMITTED );
|
2013-07-09 16:01:52 +01:00
|
|
|
|
[efi] Provide read-only access to EFI variables via settings mechanism
EFI variables do not map neatly to the iPXE settings mechanism, since
the EFI variable identifier includes a namespace GUID that cannot
cleanly be supplied as part of a setting name. Creating a new EFI
variable requires the variable's attributes to be specified, which
does not fit within iPXE's settings concept.
However, EFI variable names are generally unique even without the
namespace GUID, and EFI does provide a mechanism to iterate over all
existent variables. We can therefore provide read-only access to EFI
variables by comparing only the names and ignoring the namespace
GUIDs.
Provide an "efi" settings block that implements this mechanism using a
syntax such as:
echo Platform language is ${efi/PlatformLang:string}
show efi/SecureBoot:int8
Settings are returned as raw binary values by default since an EFI
variable may contain boolean flags, integer values, ASCII strings,
UCS-2 strings, EFI device paths, X.509 certificates, or any other
arbitrary blob of data.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2023-06-09 14:03:48 +01:00
|
|
|
#include <config/defaults.h>
|
|
|
|
|
|
2026-01-16 15:27:26 +00:00
|
|
|
/* Settings sources supported on all platforms */
|
2026-01-16 22:38:07 +00:00
|
|
|
#define ACPI_SETTINGS /* ACPI settings */
|
2026-01-16 15:27:26 +00:00
|
|
|
#define PCI_SETTINGS /* PCI device settings */
|
|
|
|
|
#define USB_SETTINGS /* USB device settings */
|
|
|
|
|
|
|
|
|
|
/* Settings sources supported only on EFI platforms */
|
|
|
|
|
#if defined ( PLATFORM_efi )
|
|
|
|
|
#define EFI_SETTINGS /* EFI variable settings */
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Settings sources supported only when memory maps are available */
|
|
|
|
|
#if ! defined ( MEMMAP_NULL )
|
|
|
|
|
//#define MEMMAP_SETTINGS /* Memory map settings */
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Settings sources supported only on x86 CPUs */
|
|
|
|
|
#if defined ( __i386__ ) || defined ( __x86_64__ )
|
2026-01-16 22:38:07 +00:00
|
|
|
#define CPUID_SETTINGS /* CPUID settings */
|
2026-01-16 15:27:26 +00:00
|
|
|
//#define VMWARE_SETTINGS /* VMware GuestInfo settings */
|
|
|
|
|
//#define VRAM_SETTINGS /* Video RAM dump settings */
|
|
|
|
|
#endif
|
2013-07-09 16:01:52 +01:00
|
|
|
|
2026-01-16 22:38:07 +00:00
|
|
|
/* Disable settings sources not historically included in BIOS builds */
|
|
|
|
|
#if defined ( PLATFORM_pcbios )
|
|
|
|
|
#undef ACPI_SETTINGS
|
|
|
|
|
#undef CPUID_SETTINGS
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-08-19 16:17:25 +01:00
|
|
|
#include <config/named.h>
|
|
|
|
|
#include NAMED_CONFIG(settings.h)
|
2013-07-09 16:01:52 +01:00
|
|
|
#include <config/local/settings.h>
|
2014-08-19 16:17:25 +01:00
|
|
|
#include LOCAL_NAMED_CONFIG(settings.h)
|
2013-07-09 16:01:52 +01:00
|
|
|
|
|
|
|
|
#endif /* CONFIG_SETTINGS_H */
|