├── .gitignore
├── Create_app.command
├── LICENSE
├── README.md
├── Sources
├── Info.plist
├── MacOS
│ └── Config Validator
└── Resources
│ ├── AppIcon.icns
│ ├── AppIconOff.icns
│ ├── AppSettings.plist
│ ├── Hero.aiff
│ ├── MainMenu.nib
│ ├── designable.nib
│ └── keyedobjects.nib
│ ├── ocvalidate
│ └── script
└── Technical background.md
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/Create_app.command:
--------------------------------------------------------------------------------
1 |
2 | # Config Validator
3 | # (c) Copyright 2023 chris1111
4 | # This will create a Apple Bundle App Config Validator
5 | PARENTDIR=$(dirname "$0")
6 | cd "$PARENTDIR"
7 |
8 |
9 |
10 | # Declare some VARS
11 | APP_NAME="Config Validator.app"
12 |
13 |
14 | echo "= = = = = = = = = = = = = = = = = = = = = = = = = "
15 | echo "Create Config Validator"
16 | echo "= = = = = = = = = = = = = = = = = = = = = = = = = "
17 | echo " "
18 | Sleep 2
19 | # Remove app
20 | rm -rf "$APP_NAME"
21 | # Create the dir structure
22 | mkdir -p "$APP_NAME"
23 | Sleep 1
24 | mkdir -p "$APP_NAME/Contents"
25 | # Copying sources
26 | cp -rp ./Sources/* "$APP_NAME/Contents"
27 | echo "= = = = = = = = = = = = = = = = = = = = = = = = = "
28 | echo "Create Done"
29 | echo "= = = = = = = = = = = = = = = = = = = = = = = = = "
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 chris1111
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Config-Validator
2 | - For OpenCore 0.6 / 0.7 / 0.8 / 0.9
3 |
4 | - [Technical background](https://github.com/chris1111/Config-Validator/blob/main/Technical%20background.md)
5 |
6 | #### Credit:⬇︎
7 | - [chris1111](https://github.com/chris1111)
8 | - [Create from Platypus](https://github.com/sveinbjornt/Platypus)
9 | - [ocvalidate Acidanthera](https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/ocvalidate)
10 |
11 | Latest Update 08 October 2023 Config Validator 0.9.5
12 |
13 | #### Download Release V-33 ➤ [Config Validator 0.9.8](https://github.com/chris1111/Config-Validator/releases/tag/V33)
14 | #### Download Release V-32 ➤ [Config Validator 0.9.7](https://github.com/chris1111/Config-Validator/releases/tag/V32)
15 | #### Download Release V-31 ➤ [Config Validator 0.9.6](https://github.com/chris1111/Config-Validator/releases/tag/V31)
16 | #### Download Release V-30 ➤ [Config Validator 0.9.5](https://github.com/chris1111/Config-Validator/releases/tag/V30)
17 | #### Download Release V-29 ➤ [Config Validator 0.9.4](https://github.com/chris1111/Config-Validator/releases/tag/V29)
18 | #### Download Release V-28 ➤ [Config Validator 0.9.3](https://github.com/chris1111/Config-Validator/releases/tag/V28)
19 | #### Download Release V-27 ➤ [Config Validator 0.9.2](https://github.com/chris1111/Config-Validator/releases/tag/V27)
20 | #### Download Release V-26 ➤ [Config Validator 0.9.1](https://github.com/chris1111/Config-Validator/releases/tag/V26)
21 | #### Download Release V-25 ➤ [Config Validator 0.9.0](https://github.com/chris1111/Config-Validator/releases/tag/V25)
22 | #### Download Release V-24 ➤ [Config Validator 0.8.9](https://github.com/chris1111/Config-Validator/releases/tag/V24)
23 | #### Download Release V-23 ➤ [Config Validator 0.8.8](https://github.com/chris1111/Config-Validator/releases/tag/V23)
24 | #### Download Release V-22 ➤ [Config Validator 0.8.7](https://github.com/chris1111/Config-Validator/releases/tag/V22)
25 | #### Download Release V-21 ➤ [Config Validator 0.8.6](https://github.com/chris1111/Config-Validator/releases/tag/V21)
26 | #### Download Release V-20 ➤ [Config Validator 0.8.5](https://github.com/chris1111/Config-Validator/releases/tag/V20)
27 | #### Download Release V-19 ➤ [Config Validator 0.8.4](https://github.com/chris1111/Config-Validator/releases/tag/V19)
28 | #### Download Release V-18 ➤ [Config Validator 0.8.3](https://github.com/chris1111/Config-Validator/releases/tag/V18)
29 | #### Download Release V-17 ➤ [Config Validator 0.8.2](https://github.com/chris1111/Config-Validator/releases/tag/V17)
30 | #### Download Release V-16 ➤ [Config Validator 0.8.1](https://github.com/chris1111/Config-Validator/releases/tag/V16)
31 | #### Download Release V-15 ➤ [Config Validator 0.8.0](https://github.com/chris1111/Config-Validator/releases/tag/V15)
32 | #### Download Release V-14 ➤ [Config Validator 0.7.9](https://github.com/chris1111/Config-Validator/releases/tag/V14)
33 | #### Download Release V-13 ➤ [Config Validator 0.7.8](https://github.com/chris1111/Config-Validator/releases/tag/V13)
34 | #### Download Release V-12 ➤ [Config Validator 0.7.7](https://github.com/chris1111/Config-Validator/releases/tag/V12)
35 | #### Download Release V-11 ➤ [Config Validator 0.7.6](https://github.com/chris1111/Config-Validator/releases/tag/V11)
36 | #### Download Release V-10 ➤ [Config Validator 0.7.5](https://github.com/chris1111/Config-Validator/releases/tag/V10)
37 | #### Download Release V-9 ➤ [Config Validator 0.7.4](https://github.com/chris1111/Config-Validator/releases/tag/V9)
38 | #### Download Release V-8 ➤ [Config Validator 0.7.3](https://github.com/chris1111/Config-Validator/releases/tag/V8)
39 | #### Download Release V-7 ➤ [Config Validator 0.7.2](https://github.com/chris1111/Config-Validator/releases/tag/V7)
40 | #### Download Release V-6 ➤ [Config Validator 0.7.1](https://github.com/chris1111/Config-Validator/releases/tag/V6)
41 | #### Download Release V-5 ➤ [Config Validator 0.7.0](https://github.com/chris1111/Config-Validator/releases/tag/V5)
42 | #### Download Release V-4 ➤ [Config Validator 0.7.0](https://github.com/chris1111/Config-Validator/releases/tag/V4)
43 | #### Download Release V-3 ➤ [Config Validator 0.6.8 and 0.6.9](https://github.com/chris1111/Config-Validator/releases/tag/V3)
44 | #### Download Release V-2 ➤ [Config Validator 0.6.7](https://github.com/chris1111/Config-Validator/releases/tag/V2)
45 | #### Download Release V-1 ➤ [Config Validator 0.6.6](https://github.com/chris1111/Config-Validator/releases/tag/V1)
46 |
47 |
48 |
49 | 
50 |
51 | 
52 |
53 | ### Create App sources Video ⇩
54 | https://github.com/chris1111/Config-Validator/assets/6248794/1be165f9-b385-4d34-ae2e-635b53265036
55 |
56 |
57 |
58 | ### Follow Video ⇩
59 | [](https://youtu.be/KYuYnhAMZi8)
60 |
--------------------------------------------------------------------------------
/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDocumentTypes
8 |
9 |
10 | CFBundleTypeExtensions
11 |
12 | CFBundleTypeRole
13 | Viewer
14 | LSItemContentTypes
15 |
16 | public.item
17 | public.folder
18 |
19 |
20 |
21 | CFBundleExecutable
22 | Config Validator
23 | CFBundleIconFile
24 | AppIcon.icns
25 | CFBundleIdentifier
26 | com.chris1111.ConfigValidator
27 | CFBundleInfoDictionaryVersion
28 | 6.0
29 | CFBundleName
30 | Config Validator
31 | CFBundleShortVersionString
32 | 1.0
33 | CFBundleVersion
34 | 6
35 | LSMinimumSystemVersion
36 | 10.11.0
37 | LSUIElement
38 |
39 | NSAppTransportSecurity
40 |
41 | NSAllowsArbitraryLoads
42 |
43 |
44 | NSHumanReadableCopyright
45 | © 2023 chris1111
46 | NSMainNibFile
47 | MainMenu
48 | NSPrincipalClass
49 | NSApplication
50 |
51 |
52 |
--------------------------------------------------------------------------------
/Sources/MacOS/Config Validator:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris1111/Config-Validator/96727f5a039bc8fc11bb317f00dc5761dc7f0bd6/Sources/MacOS/Config Validator
--------------------------------------------------------------------------------
/Sources/Resources/AppIcon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris1111/Config-Validator/96727f5a039bc8fc11bb317f00dc5761dc7f0bd6/Sources/Resources/AppIcon.icns
--------------------------------------------------------------------------------
/Sources/Resources/AppIconOff.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris1111/Config-Validator/96727f5a039bc8fc11bb317f00dc5761dc7f0bd6/Sources/Resources/AppIconOff.icns
--------------------------------------------------------------------------------
/Sources/Resources/AppSettings.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris1111/Config-Validator/96727f5a039bc8fc11bb317f00dc5761dc7f0bd6/Sources/Resources/AppSettings.plist
--------------------------------------------------------------------------------
/Sources/Resources/Hero.aiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris1111/Config-Validator/96727f5a039bc8fc11bb317f00dc5761dc7f0bd6/Sources/Resources/Hero.aiff
--------------------------------------------------------------------------------
/Sources/Resources/MainMenu.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris1111/Config-Validator/96727f5a039bc8fc11bb317f00dc5761dc7f0bd6/Sources/Resources/MainMenu.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/Sources/Resources/ocvalidate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris1111/Config-Validator/96727f5a039bc8fc11bb317f00dc5761dc7f0bd6/Sources/Resources/ocvalidate
--------------------------------------------------------------------------------
/Sources/Resources/script:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Config Validator
3 | # Copyright (c) 2021, 2023 chris1111. All Right Reserved
4 | # Credit: Acidanthera
5 | # Permission to use, copy, modify, and/or distribute this software for any
6 | # purpose with or without fee is hereby granted, provided that the above
7 | # copyright notice and this permission notice appear in all copies.
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | # Vars
16 | apptitle="Config Validator"
17 | version="1.8"
18 | echo " "
19 | echo "
20 | ******************************************************
21 | Config Validator OpenCore 0.9.8
22 | Drag config.plist file to verify it
23 | ******************************************************"
24 | # Set Droping directory and file
25 | for files in "$@" ;do
26 | echo "Start of verification:"
27 | Sleep 1
28 | osascript -e 'do shell script "afplay './Hero.aiff' &> /dev/null &"'
29 |
30 | # Activate App
31 | osascript <` complained by `OcSerializeLib` indicates unknown keys that can be deprecated in new versions of OpenCore. Such keys should be ***removed*** in order to avoid undefined behaviours.
7 | - Under active development, newer versions of OpenCore hardly have backward compatibility at this moment. As a result, please first run `ocvalidate --version` to check which version of OpenCore is supported, and thus please only use the specific version.
8 |
9 | ### Global Rules
10 | - All entries must be set once only. Duplication is strictly prohibited.
11 | - All strings (fields with plist `String` format) throughout the whole config only accept ASCII printable characters at most. Stricter rules may apply. For instance, some fields only accept specified values, as indicated in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf).
12 | - Most binary patches must have `Find`, `Replace`, `Mask` (if used), and `ReplaceMask` (if used) identical size set. Also, `Find` requires `Mask` (or `Replace` requires `ReplaceMask`) to be active (set to non-zero) for corresponding bits.
13 | - `MinKernel` and `MaxKernel` entries should follow conventions specified in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf). (TODO: Bring decent checks for this)
14 | - Entries taking file system path only accept `0-9, A-Z, a-z, '_', '-', '.', '/', and '\'`.
15 | - Device Paths (e.g. `PciRoot(0x0)/Pci(0x1b,0x0)`) only accept strings in canonic string format.
16 | - Paths of UEFI Drivers only accept `0-9, A-Z, a-z, '_', '-', '.', and '/'`.
17 | - Entries requiring bitwise operations (e.g. `ConsoleAttributes`, `PickerAttributes`, or `ScanPolicy`) only allow known bits stated in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf) to be set.
18 | - Entries involving GUID (mainly in Section `NVRAM`) must have correct format set.
19 |
20 | ### ACPI
21 | #### Add
22 | - Entry[N]->Path: Only `.aml` and `.bin` filename suffix are accepted.
23 |
24 | ### Booter
25 | #### MmioWhitelist
26 | - Entry[N]->Enabled: When at least one entry is enabled, `DevirtualiseMmio` in `Booter->Quirks` should be enabled.
27 | #### Patch
28 | - Entry[N]->Arch: Only `Any`, `i386`, or `x86_64` are accepted.
29 | - Entry[N]->Identifier: Only `Any`, `Apple`, or a specified bootloader with `.efi` sufffix, are accepted.
30 | #### Quirks
31 | - When `AllowRelocationBlock` is enabled, `ProvideCustomSlide` should be enabled altogether.
32 | - When `EnableSafeModeSlide` is enabled, `ProvideCustomSlide` should be enabled altogether.
33 | - If `ProvideMaxSlide` is set to a number greater than zero, `ProvideCustomSlide` should be enabled altogether.
34 | - When `DisableVariableWrite`, `EnableWriteUnprotector`, or `ProvideCustomSlide` is enabled, `OpenRuntime.efi` should be loaded in `UEFI->Drivers`.
35 |
36 | ### DeviceProperties
37 | - Requirements here all follow Global Rules.
38 |
39 | ### Kernel
40 | #### Add
41 | - Entry[N]->Arch: Only `Any`, `i386`, or `x86_64` are accepted.
42 | - Entry[N]->BundlePath: Filename should have `.kext` suffix.
43 | - Entry[N]->PlistPath: Filename should have `.plist` suffix.
44 | - Entry[N]: If `Lilu.kext` is used, `DisableLinkeditJettison` should be enabled in `Kernel->Quirks`.
45 | - For some known kexts, their `BundlePath`, `ExecutablePath`, and `PlistPath` must match against each other. Current list of rules can be found [here](https://github.com/acidanthera/OpenCorePkg/blob/master/Utilities/ocvalidate/KextInfo.c).
46 | - Plugin kext must be placed after parent kext. For example, [plugins of Lilu](https://github.com/acidanthera/Lilu/blob/master/KnownPlugins.md) must be placed after `Lilu.kext`.
47 | #### Delete
48 | - Entry[N]->Arch: Only `Any`, `i386`, or `x86_64` are accepted.
49 | - Entry[N]->Identifier: At least one dot (`.`) should exist, because any identifier looks like a domain sequence (`vendor.product`).
50 | #### Quirks
51 | - `CustomSMBIOSGuid` requires `PlatformInfo->UpdateSMBIOSMode` set to `Custom`.
52 | - `SetApfsTrimTimeout` cannot be a value that is greater than `MAX_UINT32`, or less than `-1`.
53 | #### Scheme
54 | - KernelArch: Only `Auto`, `i386`, `i386-user32`, or `x86_64` are accepted.
55 | - KernelCache: Only `Auto`, `Cacheless`, `Mkext`, or `Prelinked` are accepted.
56 |
57 | ### Misc
58 | #### BlessOverride
59 | - Entries cannot be `\EFI\Microsoft\Boot\bootmgfw.efi` or `\System\Library\CoreServices\boot.efi` since OpenCore knows these paths.
60 | #### Boot
61 | - HibernateMode: Only `None`, `Auto`, `RTC`, or `NVRAM` are accepted.
62 | - PickerMode: Only `Builtin`, `External`, or `Apple` are accepted.
63 | - `PickerAudioAssist` requires `AudioSupport` in `UEFI->Audio` to be enabled.
64 | - LauncherOption: Only `Disabled`, `Full`, or `Short` are accepted.
65 | - `LauncherPath` cannot be empty string.
66 | #### Security
67 | - AuthRestart: If enabled, `VirtualSMC.kext` should be present in `Kernel->Add`.
68 | - DmgLoading: Only `Disabled`, `Signed`, or `Any` are accepted.
69 | - Vault: Only `Optional`, `Basic`, or `Secure` are accepted.
70 | - SecureBootModel: Only `Default`, `Disabled`, `j137`, `j680`, `j132`, `j174`, `j140k`, `j780`, `j213`, `j140a`, `j152f`, `j160`, `j230k`, `j214k`, `j223`, `j215`, `j185`, `j185f`, or `x86legacy` are accepted.
71 |
72 | ### NVRAM
73 | - Requirements here all follow Global Rules. In addition, the following keys and values are checked:
74 | #### gAppleBootVariableGuid (`7C436110-AB2A-4BBB-A880-FE41995C9F82`)
75 | - `nvda_drv` must have type `Plist Data` with the value of `0x30` or `0x31`.
76 | - `boot-args` must be an ASCII string (thus `Plist String`) without trailing `\0`.
77 | - `bootercfg` must be an ASCII string (thus `Plist String`) without trailing `\0`.
78 | - `csr-active-config` must have type `Plist Data` and have length of 4 bytes.
79 | - `StartupMute` must have type `Plist Data` and have length of 1 byte.
80 | - `SystemAudioVolume` must have type `Plist Data` and have length of 1 byte.
81 | #### gAppleVendorVariableGuid (`4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14`)
82 | - `UIScale` must have type `Plist Data` with the value of `0x01` or `0x02`.
83 | - `FirmwareFeatures` must have type `Plist Data` and have length of 4 bytes.
84 | - `ExtendedFirmwareFeatures` must have type `Plist Data` and have length of 8 bytes.
85 | - `FirmwareFeaturesMask` must have type `Plist Data` and have length of 4 bytes.
86 | - `ExtendedFirmwareFeatures` must have type `Plist Data` and have length of 8 bytes.
87 | - `DefaultBackgroundColor` must have type `Plist Data` and have length of 4 bytes. Also, its last byte must be `0x00`.
88 |
89 | ### PlatformInfo
90 | - UpdateSMBIOSMode: Only `TryOverwrite`, `Create`, `Overwrite`, or `Custom` are accepted.
91 | #### Generic
92 | - SystemProductName: Only real Mac models are accepted.
93 | - SystemMemoryStatus: Only `Auto`, `Upgradable`, or `Soldered` are accepted.
94 | - SystemUUID: Only empty string, `OEM` or valid UUID are accepted.
95 | - ProcessorType: Only known first byte can be set.
96 |
97 | ### UEFI
98 | #### APFS
99 | - When `EnableJumpstart` is enabled, `ScanPolicy` in `Misc->Security` should have `OC_SCAN_ALLOW_FS_APFS` (bit 8) set, together with `OC_SCAN_FILE_SYSTEM_LOCK` (bit 0) set. Or `ScanPolicy` should be `0` (failsafe value).
100 | #### Audio
101 | - When `AudioSupport` is enabled, AudioDevice cannot be empty and must be a valid path.
102 | #### Quirks
103 | - When `RequestBootVarRouting` is enabled, `OpenRuntime.efi` should be loaded in `UEFI->Drivers`.
104 | #### Drivers
105 | - When `OpenUsbKbDxe.efi` is in use, `KeySupport` in `UEFI->Input` should never be enabled altogether.
106 | - When `Ps2KeyboardDxe.efi` is in use, `KeySupport` in `UEFI->Input` should always be enabled altogether.
107 | - `OpenUsbKbDxe.efi` and `Ps2KeyboardDxe.efi` should never co-exist.
108 | - When HFS+ filesystem driver or `AudioDxe.efi` is in use, `ConnectDrivers` should be enabled altogether.
109 | - When `OpenCanopy.efi` is in use, `PickerMode` in `Misc->Boot` should be set to `External`.
110 | #### Input
111 | - KeySupportMode: Only `Auto`, `V1`, `V2`, or `AMI` are accepted.
112 | - When `PointerSupport` is enabled, the value of `PointerSupportMode` should only be `ASUS`.
113 | #### Output
114 | - `ClearScreenOnModeSwitch`, `IgnoreTextInGraphics`, `ReplaceTabWithSpace`, and `SanitiseClearScreen` only apply to `System` TextRenderer
115 | - `Resolution` should match `NUMBERxNUMBER` or `NUMBERxNUMBER@NUMBER` sequences (unless it is an `Empty string` or is set to `Max`).
116 | #### ReservedMemory
117 | - Type: Only `Reserved`, `LoaderCode`, `LoaderData`, `BootServiceCode`, `BootServiceData`, `RuntimeCode`, `RuntimeData`, `Available`, `Persistent`, `UnusableMemory`, `ACPIReclaimMemory`, `ACPIMemoryNVS`, `MemoryMappedIO`, `MemoryMappedIOPortSpace`, or `PalCode` are accepted.
118 |
119 |
120 | ### At a glance
121 | - ocvalidate firstly calls `OcSerializeLib` which performs fundamental checks in terms of syntax and semantics. After that, the following will be checked.
122 | - The error message `` complained by `OcSerializeLib` indicates unknown keys that can be deprecated in new versions of OpenCore. Such keys should be ***removed*** in order to avoid undefined behaviours.
123 | - Under active development, newer versions of OpenCore hardly have backward compatibility at this moment. As a result, please first run `ocvalidate --version` to check which version of OpenCore is supported, and thus please only use the specific version.
124 |
125 | ### Global Rules
126 | - All entries must be set once only. Duplication is strictly prohibited.
127 | - All strings (fields with plist `String` format) throughout the whole config only accept ASCII printable characters at most. Stricter rules may apply. For instance, some fields only accept specified values, as indicated in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf).
128 | - Most binary patches must have `Find`, `Replace`, `Mask` (if used), and `ReplaceMask` (if used) identical size set. Also, `Find` requires `Mask` (or `Replace` requires `ReplaceMask`) to be active (set to non-zero) for corresponding bits.
129 | - `MinKernel` and `MaxKernel` entries should follow conventions specified in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf). (TODO: Bring decent checks for this)
130 | - Entries taking file system path only accept `0-9, A-Z, a-z, '_', '-', '.', '/', and '\'`.
131 | - Device Paths (e.g. `PciRoot(0x0)/Pci(0x1b,0x0)`) only accept strings in canonic string format.
132 | - Paths of UEFI Drivers only accept `0-9, A-Z, a-z, '_', '-', '.', and '/'`.
133 | - Entries requiring bitwise operations (e.g. `ConsoleAttributes`, `PickerAttributes`, or `ScanPolicy`) only allow known bits stated in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf) to be set.
134 | - Entries involving GUID (mainly in Section `NVRAM`) must have correct format set.
135 |
136 | ### ACPI
137 | #### Add
138 | - Entry[N]->Path: Only `.aml` and `.bin` filename suffix are accepted.
139 |
140 | ### Booter
141 | #### MmioWhitelist
142 | - Entry[N]->Enabled: When at least one entry is enabled, `DevirtualiseMmio` in `Booter->Quirks` should be enabled.
143 | #### Patch
144 | - Entry[N]->Arch: Only `Any`, `i386`, or `x86_64` are accepted.
145 | - Entry[N]->Identifier: Only `Any`, `Apple`, or a specified bootloader with `.efi` sufffix, are accepted.
146 | #### Quirks
147 | - When `AllowRelocationBlock` is enabled, `ProvideCustomSlide` should be enabled altogether.
148 | - When `EnableSafeModeSlide` is enabled, `ProvideCustomSlide` should be enabled altogether.
149 | - If `ProvideMaxSlide` is set to a number greater than zero, `ProvideCustomSlide` should be enabled altogether.
150 | - When `DisableVariableWrite`, `EnableWriteUnprotector`, or `ProvideCustomSlide` is enabled, `OpenRuntime.efi` should be loaded in `UEFI->Drivers`.
151 |
152 | ### DeviceProperties
153 | - Requirements here all follow Global Rules.
154 |
155 | ### Kernel
156 | #### Add
157 | - Entry[N]->Arch: Only `Any`, `i386`, or `x86_64` are accepted.
158 | - Entry[N]->BundlePath: Filename should have `.kext` suffix.
159 | - Entry[N]->PlistPath: Filename should have `.plist` suffix.
160 | - Entry[N]: If `Lilu.kext` is used, `DisableLinkeditJettison` should be enabled in `Kernel->Quirks`.
161 | - For some known kexts, their `BundlePath`, `ExecutablePath`, and `PlistPath` must match against each other. Current list of rules can be found [here](https://github.com/acidanthera/OpenCorePkg/blob/master/Utilities/ocvalidate/KextInfo.c).
162 | - Plugin kext must be placed after parent kext. For example, [plugins of Lilu](https://github.com/acidanthera/Lilu/blob/master/KnownPlugins.md) must be placed after `Lilu.kext`.
163 | #### Delete
164 | - Entry[N]->Arch: Only `Any`, `i386`, or `x86_64` are accepted.
165 | - Entry[N]->Identifier: At least one dot (`.`) should exist, because any identifier looks like a domain sequence (`vendor.product`).
166 | #### Quirks
167 | - `CustomSMBIOSGuid` requires `PlatformInfo->UpdateSMBIOSMode` set to `Custom`.
168 | - `SetApfsTrimTimeout` cannot be a value that is greater than `MAX_UINT32`, or less than `-1`.
169 | #### Scheme
170 | - KernelArch: Only `Auto`, `i386`, `i386-user32`, or `x86_64` are accepted.
171 | - KernelCache: Only `Auto`, `Cacheless`, `Mkext`, or `Prelinked` are accepted.
172 |
173 | ### Misc
174 | #### BlessOverride
175 | - Entries cannot be `\EFI\Microsoft\Boot\bootmgfw.efi` or `\System\Library\CoreServices\boot.efi` since OpenCore knows these paths.
176 | #### Boot
177 | - HibernateMode: Only `None`, `Auto`, `RTC`, or `NVRAM` are accepted.
178 | - PickerMode: Only `Builtin`, `External`, or `Apple` are accepted.
179 | - `PickerAudioAssist` requires `AudioSupport` in `UEFI->Audio` to be enabled.
180 | - LauncherOption: Only `Disabled`, `Full`, or `Short` are accepted.
181 | - `LauncherPath` cannot be empty string.
182 | #### Security
183 | - AuthRestart: If enabled, `VirtualSMC.kext` should be present in `Kernel->Add`.
184 | - DmgLoading: Only `Disabled`, `Signed`, or `Any` are accepted.
185 | - Vault: Only `Optional`, `Basic`, or `Secure` are accepted.
186 | - SecureBootModel: Only `Default`, `Disabled`, `j137`, `j680`, `j132`, `j174`, `j140k`, `j780`, `j213`, `j140a`, `j152f`, `j160`, `j230k`, `j214k`, `j223`, `j215`, `j185`, `j185f`, or `x86legacy` are accepted.
187 |
188 | ### NVRAM
189 | - Requirements here all follow Global Rules. In addition, the following keys and values are checked:
190 | #### gAppleBootVariableGuid (`7C436110-AB2A-4BBB-A880-FE41995C9F82`)
191 | - `nvda_drv` must have type `Plist Data` with the value of `0x30` or `0x31`.
192 | - `boot-args` must be an ASCII string (thus `Plist String`) without trailing `\0`.
193 | - `bootercfg` must be an ASCII string (thus `Plist String`) without trailing `\0`.
194 | - `csr-active-config` must have type `Plist Data` and have length of 4 bytes.
195 | - `StartupMute` must have type `Plist Data` and have length of 1 byte.
196 | - `SystemAudioVolume` must have type `Plist Data` and have length of 1 byte.
197 | #### gAppleVendorVariableGuid (`4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14`)
198 | - `UIScale` must have type `Plist Data` with the value of `0x01` or `0x02`.
199 | - `FirmwareFeatures` must have type `Plist Data` and have length of 4 bytes.
200 | - `ExtendedFirmwareFeatures` must have type `Plist Data` and have length of 8 bytes.
201 | - `FirmwareFeaturesMask` must have type `Plist Data` and have length of 4 bytes.
202 | - `ExtendedFirmwareFeatures` must have type `Plist Data` and have length of 8 bytes.
203 | - `DefaultBackgroundColor` must have type `Plist Data` and have length of 4 bytes. Also, its last byte must be `0x00`.
204 |
205 | ### PlatformInfo
206 | - UpdateSMBIOSMode: Only `TryOverwrite`, `Create`, `Overwrite`, or `Custom` are accepted.
207 | #### Generic
208 | - SystemProductName: Only real Mac models are accepted.
209 | - SystemMemoryStatus: Only `Auto`, `Upgradable`, or `Soldered` are accepted.
210 | - ProcessorType: Only known first byte can be set.
211 |
212 | ### UEFI
213 | #### APFS
214 | - When `EnableJumpstart` is enabled, `ScanPolicy` in `Misc->Security` should have `OC_SCAN_ALLOW_FS_APFS` (bit 8) set, together with `OC_SCAN_FILE_SYSTEM_LOCK` (bit 0) set. Or `ScanPolicy` should be `0` (failsafe value).
215 | #### Audio
216 | - When `AudioSupport` is enabled, AudioDevice cannot be empty and must be a valid path.
217 | #### Quirks
218 | - When `RequestBootVarRouting` is enabled, `OpenRuntime.efi` should be loaded in `UEFI->Drivers`.
219 | #### Drivers
220 | - When `OpenUsbKbDxe.efi` is in use, `KeySupport` in `UEFI->Input` should never be enabled altogether.
221 | - When `Ps2KeyboardDxe.efi` is in use, `KeySupport` in `UEFI->Input` should always be enabled altogether.
222 | - `OpenUsbKbDxe.efi` and `Ps2KeyboardDxe.efi` should never co-exist.
223 | - When HFS+ filesystem driver or `AudioDxe.efi` is in use, `ConnectDrivers` should be enabled altogether.
224 | - When `OpenCanopy.efi` is in use, `PickerMode` in `Misc->Boot` should be set to `External`.
225 | #### Input
226 | - KeySupportMode: Only `Auto`, `V1`, `V2`, or `AMI` are accepted.
227 | - When `PointerSupport` is enabled, the value of `PointerSupportMode` should only be `ASUS`.
228 | #### Output
229 | - `ClearScreenOnModeSwitch`, `IgnoreTextInGraphics`, `ReplaceTabWithSpace`, and `SanitiseClearScreen` only apply to `System` TextRenderer
230 | - `Resolution` should match `NUMBERxNUMBER` or `NUMBERxNUMBER@NUMBER` sequences (unless it is an `Empty string` or is set to `Max`).
231 | #### ReservedMemory
232 | - Type: Only `Reserved`, `LoaderCode`, `LoaderData`, `BootServiceCode`, `BootServiceData`, `RuntimeCode`, `RuntimeData`, `Available`, `Persistent`, `UnusableMemory`, `ACPIReclaimMemory`, `ACPIMemoryNVS`, `MemoryMappedIO`, `MemoryMappedIOPortSpace`, or `PalCode` are accepted.
233 |
--------------------------------------------------------------------------------