提交 b439f0a5 编写于 作者: P PMheart

Utilities: Check for ConnectDrivers if HfsPlus or AudioDxe are present in ocvalidate

上级 94c40b1a
......@@ -66,6 +66,7 @@ Utility to validate whether a `config.plist` matches requirements and convention
- HibernateMode: Only `None`, `Auto`, `RTC`, or `NVRAM` are accepted.
- PickerMode: Only `Builtin`, `External`, or `Apple` are accepted.
#### Security
- AuthRestart: If enabled, `VirtualSMC.kext` should be present in `Kernel->Add`.
- BootProtect: Only `None`, `Bootstrap`, or `BootstrapShort` are accepted. When set to the latter two, `RequestBootVarRouting` should be enabled in `UEFI->Quirks`.
- DmgLoading: Only `Disabled`, `Signed`, or `Any` are accepted.
- Vault: Only `Optional`, `Basic`, or `Secure` are accepted.
......@@ -89,6 +90,7 @@ Utility to validate whether a `config.plist` matches requirements and convention
- When `OpenUsbKbDxe.efi` is in use, `KeySupport` in `UEFI->Input` should never be enabled altogether.
- When `Ps2KeyboardDxe.efi` is in use, `KeySupport` in `UEFI->Input` should always be enabled altogether.
- `OpenUsbKbDxe.efi` and `Ps2KeyboardDxe.efi` should never co-exist.
- When `HfsPlus.efi` or `AudioDxe.efi` is in use, `ConnectDrivers` should be enabled altogether.
#### Input
- KeySupportMode: Only `Auto`, `V1`, `V2`, or `AMI` are accepted.
- When `PointerSupport` is enabled, the value of `PointerSupportMode` should only be `ASUS`.
......
......@@ -130,6 +130,9 @@ CheckUEFI (
BOOLEAN HasOpenRuntimeEfiDriver;
BOOLEAN HasOpenUsbKbDxeEfiDriver;
BOOLEAN HasPs2KeyboardDxeEfiDriver;
BOOLEAN HasHfsPlusEfiDriver;
BOOLEAN HasAudioDxeEfiDriver;
BOOLEAN IsConnectDriversEnabled;
BOOLEAN IsRequestBootVarRoutingEnabled;
BOOLEAN IsKeySupportEnabled;
BOOLEAN IsTextRendererSystem;
......@@ -158,6 +161,9 @@ CheckUEFI (
HasOpenRuntimeEfiDriver = FALSE;
HasOpenUsbKbDxeEfiDriver = FALSE;
HasPs2KeyboardDxeEfiDriver = FALSE;
HasHfsPlusEfiDriver = FALSE;
HasAudioDxeEfiDriver = FALSE;
IsConnectDriversEnabled = UserUefi->ConnectDrivers;
IsRequestBootVarRoutingEnabled = UserUefi->Quirks.RequestBootVarRouting;
IsKeySupportEnabled = UserUefi->Input.KeySupport;
IsPointerSupportEnabled = UserUefi->Input.PointerSupport;
......@@ -228,6 +234,12 @@ CheckUEFI (
HasPs2KeyboardDxeEfiDriver = TRUE;
IndexPs2KeyboardDxeEfiDriver = Index;
}
if (AsciiStrCmp (Driver, "HfsPlus.efi") == 0) {
HasHfsPlusEfiDriver = TRUE;
}
if (AsciiStrCmp (Driver, "AudioDxe.efi")) {
HasAudioDxeEfiDriver = TRUE;
}
}
//
......@@ -282,6 +294,17 @@ CheckUEFI (
++ErrorCount;
}
if (!IsConnectDriversEnabled) {
if (HasHfsPlusEfiDriver) {
DEBUG ((DEBUG_WARN, "HfsPlus.efi is loaded, but UEFI->ConnectDrivers is not enabled!\n"));
++ErrorCount;
}
if (HasAudioDxeEfiDriver) {
DEBUG ((DEBUG_WARN, "AudioDevice.efi is loaded, but UEFI->ConnectDrivers is not enabled!\n"));
++ErrorCount;
}
}
if (!IsTextRendererSystem) {
if (IsClearScreenOnModeSwitchEnabled) {
DEBUG ((DEBUG_WARN, "UEFI->Output->ClearScreenOnModeSwitch is enabled on non-System TextRenderer (currently %a)!\n", TextRenderer));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册