From 360982d0702dd3d21dc0fb6cd2ff05b0857fde21 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Sun, 30 Aug 2020 20:24:29 +0300 Subject: [PATCH] OcDataHubLib: Add possibility to inject coprocessor info --- Include/Acidanthera/Library/OcDataHubLib.h | 2 ++ Library/OcDataHubLib/OcDataHubLib.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Include/Acidanthera/Library/OcDataHubLib.h b/Include/Acidanthera/Library/OcDataHubLib.h index a6cc7cdd..6ee6cff2 100644 --- a/Include/Acidanthera/Library/OcDataHubLib.h +++ b/Include/Acidanthera/Library/OcDataHubLib.h @@ -30,6 +30,7 @@ #define OC_FSB_FREQUENCY L"FSBFrequency" #define OC_ART_FREQUENCY L"ARTFrequency" #define OC_DEVICE_PATHS_SUPPORTED L"DevicePathsSupported" +#define OC_COPROCESSOR_VERSION L"apple-coprocessor-version" // // These are custom and match VirtualSMC, FakeSMC, and Clover. @@ -57,6 +58,7 @@ typedef struct { CONST UINT8 *SmcRevision; CONST UINT8 *SmcBranch; CONST UINT8 *SmcPlatform; + CONST UINT32 *CoprocessorVersion; } OC_DATA_HUB_DATA; /** diff --git a/Library/OcDataHubLib/OcDataHubLib.c b/Library/OcDataHubLib/OcDataHubLib.c index 5c1ec1ca..964d7ca4 100755 --- a/Library/OcDataHubLib/OcDataHubLib.c +++ b/Library/OcDataHubLib/OcDataHubLib.c @@ -288,6 +288,11 @@ UpdateDataHub ( DataHubSetAppleMiscData (DataHub, OC_SMC_REVISION, Data->SmcRevision, OC_SMC_REVISION_SIZE); DataHubSetAppleMiscData (DataHub, OC_SMC_BRANCH, Data->SmcBranch, OC_SMC_BRANCH_SIZE); DataHubSetAppleMiscData (DataHub, OC_SMC_PLATFORM, Data->SmcPlatform, OC_SMC_PLATFORM_SIZE); + // + // Should normally be 0x20000, but it will cause issues like Recovery OS not booting + // without real coprocessor hardware present. + // + DataHubSetAppleMiscData (DataHub, OC_COPROCESSOR_VERSION, Data->CoprocessorVersion, sizeof (*Data->CoprocessorVersion)); return EFI_SUCCESS; }