From 7327d95aba6d7ef433bdeec05b4ee4dbda14d89a Mon Sep 17 00:00:00 2001 From: SergeySlice Date: Sun, 13 Dec 2020 11:51:50 +0300 Subject: [PATCH] adding data for iMac20 Signed-off-by: SergeySlice --- .../CloverV2/EFI/CLOVER/config-sample.plist | 6 +----- rEFIt_UEFI/Platform/Settings.cpp | 6 +++--- rEFIt_UEFI/Platform/platformdata.cpp | 18 ++++++++++++++++++ rEFIt_UEFI/Platform/platformdata.h | 2 ++ rEFIt_UEFI/Platform/usbfix.cpp | 6 +++--- rEFIt_UEFI/refit/lib.cpp | 4 ++-- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist b/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist index 70ff26239..c007eb468 100644 --- a/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist +++ b/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist @@ -1130,8 +1130,6 @@ ProtectUefiServices - ProvideConsoleGopEnable - ProvideCustomSlide ProvideMaxSlide @@ -1156,8 +1154,6 @@ DisableLinkeditJettison - DisableRtcChecksum - DummyPowerManagement ExternalDiskIcons @@ -1172,4 +1168,4 @@ - \ No newline at end of file + diff --git a/rEFIt_UEFI/Platform/Settings.cpp b/rEFIt_UEFI/Platform/Settings.cpp index 20d6f198d..1cc798625 100755 --- a/rEFIt_UEFI/Platform/Settings.cpp +++ b/rEFIt_UEFI/Platform/Settings.cpp @@ -5918,9 +5918,9 @@ GetUserSettings(const TagDict* CfgDict) } Prop2 = SlotsDict->propertyForKey("Name"); if (Prop2 && (Prop2->isString()) && Prop2->getString()->stringValue().notEmpty()) { - snprintf (SlotDevice->SlotName, 31, "%s", Prop2->getString()->stringValue().c_str()); + snprintf (SlotDevice->SlotName, 31, "%s", Prop2->getString()->stringValue().c_str()); } else { - snprintf (SlotDevice->SlotName, 31, "PCI Slot %lld", DeviceN); + snprintf (SlotDevice->SlotName, 31, "PCI Slot %lld", DeviceN); } DBG(" - %s\n", SlotDevice->SlotName); @@ -7006,7 +7006,7 @@ GetDevices () NULL) //NULL: get from generic lists ); - DBG(" - GFX: Model=%s family %hX (%s)\n", gfx->Model, gfx->Family, CardFamily); + DBG(" - GFX: Model=%s family %hX (%s)\n", gfx->Model, gfx->Family, CardFamily); gfx->Ports = 0; SlotDevice = &SlotDevices[1]; diff --git a/rEFIt_UEFI/Platform/platformdata.cpp b/rEFIt_UEFI/Platform/platformdata.cpp index 4b50440db..a005fad49 100644 --- a/rEFIt_UEFI/Platform/platformdata.cpp +++ b/rEFIt_UEFI/Platform/platformdata.cpp @@ -524,6 +524,14 @@ PLATFORMDATA ApplePlatformData[] = { "iMac19,2"_XS8, "IM191.88Z.F000.B00.2004232100"_XS8, "1037.120.79.0.0"_XS8, "Mac-63001698E7A34814"_XS8, // Intel Core i7-8700B @ 3.20 GHz "iMac"_XS8, "1.0"_XS8, "C02Y9HACJWDW"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x47, 0x0f, 0, 0, 0x03, "j138_9"_XS8, "j138"_XS8, 0xf0d009 }, + //iMac20,1 / iMac (Retina 5K, 27-inch, 2020) Intel Core i5-10500 @ 3.10 GHz + { "iMac20,1"_XS8, "IM201.88Z.F000.B00.2008092228"_XS8, "1554.40.9.0.0"_XS8, "Mac-CFF7D910A743CAAF"_XS8, + "iMac"_XS8, "1.0"_XS8, "C02D38RCPN5T"_XS8, "iMac-Aluminum"_XS8, + 0x02, 0x46, 0x0f, 0, 0, 0x12, "j185"_XS8, "j185"_XS8, 0xf0d009 }, + //iMac20,2 / iMac (Retina 4K, 21.5-inch, 2020) Intel Core i9-10910 @ 3.60 GHz + { "iMac20,2"_XS8, "IM201.88Z.F000.B00.2008092228"_XS8, "1554.40.9.0.0"_XS8, "Mac-AF89B6D9451A490B"_XS8, + "iMac"_XS8, "1.0"_XS8, "C02D201H046M"_XS8, "iMac-Aluminum"_XS8, + 0x02, 0x47, 0x0f, 0, 0, 0x03, "j185f"_XS8, "j185f"_XS8, 0xf0d009 }, //iMacPro1,1 /iMac Pro (2017) { "iMacPro1,1"_XS8, "IMP11.88Z.F000.B00.2005132136"_XS8, "1037.120.87.0.0"_XS8, "Mac-7BA5B2D9E42DDD94"_XS8, // Intel Xeon W-2140B CPU @ 3.20 GHz "iMac Pro"_XS8, "1.0"_XS8, "C02VVHACHX87"_XS8, "iMacPro-Aluminum"_XS8, @@ -745,6 +753,8 @@ void SetDMISettingsForModel(MACHINE_TYPES Model, BOOLEAN Redefine) break; case iMac191: case iMac192: + case iMac201: + case iMac202: gFwFeatures = 0xFD8FF576; break; case MacBookPro162: @@ -866,6 +876,8 @@ void SetDMISettingsForModel(MACHINE_TYPES Model, BOOLEAN Redefine) break; case iMac191: case iMac192: + case iMac201: + case iMac202: case MacMini81: gFwFeaturesMask = 0xFFDFFF7F; break; @@ -974,6 +986,8 @@ void SetDMISettingsForModel(MACHINE_TYPES Model, BOOLEAN Redefine) case MacMini81: case iMac191: case iMac192: + case iMac201: + case iMac202: gPlatformFeature = 0x20; break; case MacBookPro151: @@ -1086,6 +1100,8 @@ void SetDMISettingsForModel(MACHINE_TYPES Model, BOOLEAN Redefine) case iMac183: case iMac191: case iMac192: + case iMac201: + case iMac202: case iMacPro11: gSettings.ChassisType = MiscChassisTypeLapTop; //0x09; switch (Model) { @@ -1098,6 +1114,8 @@ void SetDMISettingsForModel(MACHINE_TYPES Model, BOOLEAN Redefine) case iMac183: case iMac191: case iMac192: + case iMac201: + case iMac202: case iMacPro11: gSettings.Mobile = FALSE; break; diff --git a/rEFIt_UEFI/Platform/platformdata.h b/rEFIt_UEFI/Platform/platformdata.h index 1e6bdc51d..77c521a4c 100644 --- a/rEFIt_UEFI/Platform/platformdata.h +++ b/rEFIt_UEFI/Platform/platformdata.h @@ -120,6 +120,8 @@ typedef enum { iMac183, iMac191, iMac192, + iMac201, + iMac202, iMacPro11, MacPro11, MacPro21, diff --git a/rEFIt_UEFI/Platform/usbfix.cpp b/rEFIt_UEFI/Platform/usbfix.cpp index 493e02214..a8d2cc6d0 100644 --- a/rEFIt_UEFI/Platform/usbfix.cpp +++ b/rEFIt_UEFI/Platform/usbfix.cpp @@ -176,7 +176,7 @@ DBG("FixOwnership() -> begin\n"); // read PCI Config 32bit USBLEGCTLSTS (eecp+4) PciIo->Pci.Read (PciIo, EfiPciIoWidthUint32, ExtendCap + 0x4, 1, &usblegctlsts); - DBG("usblegsup=%08X isOSowned=%llu isBIOSowned=%llu usblegctlsts=%08X\n", usblegsup, isOSowned, isBIOSowned, usblegctlsts); + DBG("usblegsup=%08X isOSowned=%llu isBIOSowned=%llu usblegctlsts=%08X\n", usblegsup, isOSowned, isBIOSowned, usblegctlsts); // // Disable the SMI in USBLEGCTLSTS firstly // @@ -216,7 +216,7 @@ DBG("FixOwnership() -> begin\n"); // read 32bit USBLEGCTLSTS (eecp+4) PciIo->Pci.Read (PciIo, EfiPciIoWidthUint32, ExtendCap + 0x4, 1, &usblegctlsts); - DBG("usblegsup=%08X isOSowned=%llu isBIOSowned=%llu usblegctlsts=%08X\n", usblegsup, isOSowned, isBIOSowned, usblegctlsts); + DBG("usblegsup=%08X isOSowned=%llu isBIOSowned=%llu usblegctlsts=%08X\n", usblegsup, isOSowned, isBIOSowned, usblegctlsts); MsgLog("Legacy USB Off Done\n"); @@ -282,7 +282,7 @@ DBG("FixOwnership() -> begin\n"); Status = EFI_NOT_FOUND; //Slice - why? :) break; } - MsgLog("USB EHCI Ownership for device %04hX value=%X\n", Pci.Hdr.DeviceId, Value); + MsgLog("USB EHCI Ownership for device %04hX value=%X\n", Pci.Hdr.DeviceId, Value); break; case PCI_IF_XHCI: diff --git a/rEFIt_UEFI/refit/lib.cpp b/rEFIt_UEFI/refit/lib.cpp index e28ae5edb..b3e61ef9b 100644 --- a/rEFIt_UEFI/refit/lib.cpp +++ b/rEFIt_UEFI/refit/lib.cpp @@ -1054,7 +1054,7 @@ void ScanVolumes(void) if (Volume->BlockIO != NULL && Volume->WholeDiskBlockIO != NULL && Volume->BlockIO == Volume->WholeDiskBlockIO && Volume->BlockIOOffset == 0 && Volume->MbrPartitionTable != NULL) { - DBG(" Volume %llu has MBR\n", VolumeIndex); + DBG(" Volume %llu has MBR\n", VolumeIndex); MbrTable = Volume->MbrPartitionTable; for (PartitionIndex = 0; PartitionIndex < 4; PartitionIndex++) { if (IS_EXTENDED_PART_TYPE(MbrTable[PartitionIndex].Type)) { @@ -1146,7 +1146,7 @@ void ReinitVolumes(void) EFI_STATUS Status; REFIT_VOLUME *Volume; UINTN VolumeIndex; - UINTN VolumesFound = 0; + UINTN VolumesFound = 0; const EFI_DEVICE_PATH *RemainingDevicePath; EFI_HANDLE DeviceHandle, WholeDiskHandle;