OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcVariable.h
Go to the documentation of this file.
1
15#ifndef OC_VARIABLE_H
16#define OC_VARIABLE_H
17
18//
19// Variable used for OpenCore log storage (if enabled).
20//
21#define OC_LOG_VARIABLE_NAME L"boot-log"
22
23//
24// Variable used for OpenCore boot path (if enabled).
25//
26#define OC_LOG_VARIABLE_PATH L"boot-path"
27
28//
29// Variable used for OpenCore request to redirect NVRAM Boot variable write.
30// Boot Services only.
31// See: https://github.com/acidanthera/bugtracker/issues/308.
32//
33#define OC_BOOT_REDIRECT_VARIABLE_NAME L"boot-redirect"
34
35//
36// Variable used for exposing OpenCore Security -> ScanPolicy.
37// Boot Services only.
38//
39#define OC_SCAN_POLICY_VARIABLE_NAME L"scan-policy"
40
41//
42// Variable used to report boot protection.
43//
44#define OC_BOOT_PROTECT_VARIABLE_NAME L"boot-protect"
45
46//
47// Boot protection guids.
48//
49#define OC_BOOT_PROTECT_VARIABLE_BOOTSTRAP BIT0
50
51//
52// Variable used to report OpenCore version in the following format:
53// REL-001-2019-01-01. This follows versioning style of Lilu and plugins.
54//
55#define OC_VERSION_VARIABLE_NAME L"opencore-version"
56
57//
58// Variable used to report OEM product from SMBIOS Type1 ProductName.
59//
60#define OC_OEM_PRODUCT_VARIABLE_NAME L"oem-product"
61
62//
63// Variable used to report OEM board vendor from SMBIOS Type2 Manufacturer.
64//
65#define OC_OEM_VENDOR_VARIABLE_NAME L"oem-vendor"
66
67//
68// Variable used to report OEM board vendor from SMBIOS Type2 ProductName.
69//
70#define OC_OEM_BOARD_VARIABLE_NAME L"oem-board"
71
72//
73// Variable used to share CPU frequency calculated from ACPI between the drivers.
74//
75#define OC_ACPI_CPU_FREQUENCY_VARIABLE_NAME L"acpi-cpu-frequency"
76
77//
78// Variable used to mark blacklisted RTC values.
79//
80#define OC_RTC_BLACKLIST_VARIABLE_NAME L"rtc-blacklist"
81
82//
83// Boot prefix used instead of normal Boot in OC_VENDOR_VARIABLE_GUID
84//
85#define OC_VENDOR_BOOT_VARIABLE_PREFIX L"OCBt"
86
87//
88// BootOrder variable name for OC_VENDOR_VARIABLE_GUID
89//
90#define OC_VENDOR_BOOT_ORDER_VARIABLE_NAME OC_VENDOR_BOOT_VARIABLE_PREFIX L"Order"
91
92//
93// BootNext variable name for OC_VENDOR_VARIABLE_GUID
94//
95#define OC_VENDOR_BOOT_NEXT_VARIABLE_NAME OC_VENDOR_BOOT_VARIABLE_PREFIX L"Next"
96
97//
98// 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102
99// This GUID is specifically used for normal variable access by Lilu kernel extension and its plugins.
100//
101#define OC_VENDOR_VARIABLE_GUID \
102 { 0x4D1FDA02, 0x38C7, 0x4A6A, { 0x9C, 0xC6, 0x4B, 0xCC, 0xA8, 0xB3, 0x01, 0x02 } }
103
104//
105// E09B9297-7928-4440-9AAB-D1F8536FBF0A
106// This GUID is specifically used for reading variables by Lilu kernel extension and its plugins.
107// Any writes to this GUID should be prohibited via EFI_RUNTIME_SERVICES after EXIT_BOOT_SERVICES.
108// The expected return code on variable write is EFI_SECURITY_VIOLATION.
109//
110#define OC_READ_ONLY_VARIABLE_GUID \
111 { 0xE09B9297, 0x7928, 0x4440, { 0x9A, 0xAB, 0xD1, 0xF8, 0x53, 0x6F, 0xBF, 0x0A } }
112
113//
114// F0B9AF8F-2222-4840-8A37-ECF7CC8C12E1
115// This GUID is specifically used for reading variables by Lilu and plugins.
116// Any reads from this GUID should be prohibited via EFI_RUNTIME_SERVICES after EXIT_BOOT_SERVICES.
117// The expected return code on variable read is EFI_SECURITY_VIOLATION.
118//
119#define OC_WRITE_ONLY_VARIABLE_GUID \
120 { 0xF0B9AF8F, 0x2222, 0x4840, { 0x8A, 0x37, 0xEC, 0xF7, 0xCC, 0x8C, 0x12, 0xE1 } }
121
122//
123// External global variables with GUID values.
124//
125extern EFI_GUID gOcVendorVariableGuid;
126extern EFI_GUID gOcReadOnlyVariableGuid;
127extern EFI_GUID gOcWriteOnlyVariableGuid;
128
129#endif // OC_VARIABLE_H
EFI_GUID gOcWriteOnlyVariableGuid
EFI_GUID gOcReadOnlyVariableGuid
EFI_GUID gOcVendorVariableGuid