Jump to content
ErmaC

Clover problems report & features request

790 posts in this topic

Recommended Posts

On 5/8/2018 at 10:47 AM, apianti said:

 

The text is based on the EFI console mode, so the reason it's so small is because that's the size your firmware sets. Usually there's only one or two modes and they don't really change the size of the text, they just draw in differently sized rectangles to allow more characters to be drawn. So changing your resolution to something smaller will make the text bigger, there's no other way to  change the size of the text.

 

 

You can inject properties into the _DSM of the device's ACPI with Devices/AddProperties (or you can create your own SSDT that does this and inject it), although not sure that it can do that for those. Also, there is no support for those graphics so you won't be getting it working without another kext to support it. You are confusing the Vega 8 and 11 in those CPUs with the Vega M in the Intels, they are not the same.

 

I am pretty clear on the Intel vs. AMD Vega chips, not confused .   I am testing both and unfortunately both have only 7mb support so far.  

 

The Intel  i7 8705G has HBM2 and HD 630 but it doesn't have native AMD graphics support.   The closest Vega IDs are 0x69A0, and 0x69AF but neither works to activate the graphics.   These Intel chips have 630 graphics but they are not dsesigned to get acceleration only quick synch so accelerators won't load for these Kaby Lake graphics.

 

The AMD 2200g and 2400g vega chips are using DDR4 memory much like Intel chipsets and cost about 1/5 the price.   However I have been able to edit the info.plist of the Kaby Lake graphics kexts and get KBL CRB listing and Intel frame buffers loaded, but again only 7mb support.   I tested all the AMD kexts edits and Intel as well only the Kaby Lake registers.   Having a ig platform for ATI graphics in Clover would be a nice "trick" tool for testing and may get these chips to achieve acceleration.    ig ID 0x59E30003 may link the accelerators and get these working but I have no option for this.    Could you provide an example on how to do this in Add properties using clover?

 

***Look at the device IDs and Vendor info in the DCPIManager it has both AMD and intel codes.

 

 

Screen Shot 2018-05-10 at 9.27.21 AM.png

Screen Shot 2018-05-11 at 12.07.55 AM.png

Edited by Gigamaxx

Share this post


Link to post
Share on other sites
Advertisement

Fix for 32-bit builds with CLANG38 (stock EDK2, no patches; same as vit's fix for kernel_patcher.c):

 

Spoiler

diff --git a/rEFIt_UEFI/Platform/kext_patcher.c b/rEFIt_UEFI/Platform/kext_patcher.c
index c1b46e82..ddcbf182 100755
--- a/rEFIt_UEFI/Platform/kext_patcher.c
+++ b/rEFIt_UEFI/Platform/kext_patcher.c
@@ -28,7 +28,7 @@ UINTN SearchAndCount(UINT8 *Source, UINT64 SourceSize, UINT8 *Search, UINTN Sear
 {
   UINTN     NumFounds = 0;
   UINT8     *End = Source + SourceSize;
-  
+
   while (Source < End) {
     if (CompareMem(Source, Search, SearchSize) == 0) {
       NumFounds++;
@@ -55,7 +55,7 @@ UINTN SearchAndReplace(UINT8 *Source, UINT64 SourceSize, UINT8 *Search, UINTN Se
   if (!Source || !Search || !Replace || !SearchSize) {
     return 0;
   }
-  
+
   while ((Source < End) && (NoReplacesRestriction || (MaxReplaces > 0))) {
     if (CompareMem(Source, Search, SearchSize) == 0) {
       CopyMem(Source, Replace, SearchSize);
@@ -81,7 +81,7 @@ UINTN SearchAndReplaceTxt(UINT8 *Source, UINT64 SourceSize, UINT8 *Search, UINTN
   if (!Source || !Search || !Replace || !SearchSize) {
     return 0;
   }
-  
+
   while (((Source + SearchSize) <= End) &&
          (NoReplacesRestriction || (MaxReplaces > 0))) { // num replaces
     while (*Source != '\0') {  //comparison
@@ -101,19 +101,19 @@ UINTN SearchAndReplaceTxt(UINT8 *Source, UINT64 SourceSize, UINT8 *Search, UINTN
         Source++;
         Pos++;
       }
-      
+
       if (Pos == SearchEnd) { // pattern found
         Pos = FirstMatch;
         break;
       }
       else
         Pos = NULL;
-      
+
       Source = FirstMatch + 1;
 /*      if (Pos != Search) {
         AsciiPrint("\n");
       } */
-      
+
     }
 
     if (!Pos) {
@@ -138,10 +138,10 @@ VOID ExtractKextBundleIdentifier(CHAR8 *Plist)
   CHAR8     *BIStart;
   CHAR8     *BIEnd;
   INTN      DictLevel = 0;
-  
-  
+
+
   gKextBundleIdentifier[0] = '\0';
-  
+
   // start with first <dict>
   Tag = AsciiStrStr(Plist, "<dict>");
   if (Tag == NULL) {
@@ -149,19 +149,19 @@ VOID ExtractKextBundleIdentifier(CHAR8 *Plist)
   }
   Tag += 6;
   DictLevel++;
-  
+
   while (*Tag != '\0') {
-    
+
     if (AsciiStrnCmp(Tag, "<dict>", 6) == 0) {
       // opening dict
       DictLevel++;
       Tag += 6;
-      
+
     } else if (AsciiStrnCmp(Tag, "</dict>", 7) == 0) {
       // closing dict
       DictLevel--;
       Tag += 7;
-      
+
     } else if (DictLevel == 1 && AsciiStrnCmp(Tag, "<key>CFBundleIdentifier</key>", 29) == 0) {
       // BundleIdentifier is next <string>...</string>
       BIStart = AsciiStrStr(Tag + 29, "<string>");
@@ -178,7 +178,7 @@ VOID ExtractKextBundleIdentifier(CHAR8 *Plist)
     } else {
       Tag++;
     }
-    
+
     // advance to next tag
     while (*Tag != '<' && *Tag != '\0') {
       Tag++;
@@ -221,7 +221,7 @@ VOID ATIConnectorsPatchInit(LOADER_ENTRY *Entry)
   //
   // prepar boundle ids
   //
-  
+
   // Lion, SnowLeo 10.6.7 2011 MBP
   AsciiSPrint(ATIKextBundleId[0],
               sizeof(ATIKextBundleId[0]),
@@ -234,9 +234,9 @@ VOID ATIConnectorsPatchInit(LOADER_ENTRY *Entry)
               "com.apple.kext.AMD%sController",
               Entry->KernelAndKextPatches->KPATIConnectorsController
               );
-  
+
   ATIConnectorsPatchInited = TRUE;
-  
+
   //DBG(L"Bundle1: %a\n", ATIKextBundleId[0]);
   //DBG(L"Bundle2: %a\n", ATIKextBundleId[1]);
   //gBS->Stall(10000000);
@@ -247,7 +247,7 @@ VOID ATIConnectorsPatchInit(LOADER_ENTRY *Entry)
 //
 VOID ATIConnectorsPatchRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_LIST *ForceLoadKexts, LOADER_ENTRY *Entry)
 {
-  
+
   // for future?
   FSInject->AddStringToList(ForceLoadKexts,
                             PoolPrint(L"\\AMD%sController.kext\\Contents\\Info.plist", Entry->KernelAndKextPatches->KPATIConnectorsController)
@@ -259,7 +259,7 @@ VOID ATIConnectorsPatchRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_
   // SnowLeo
   FSInject->AddStringToList(ForceLoadKexts, L"\\ATIFramebuffer.kext\\Contents\\Info.plist");
   FSInject->AddStringToList(ForceLoadKexts, L"\\AMDFramebuffer.kext\\Contents\\Info.plist");
-  
+
   // dependencies
   FSInject->AddStringToList(ForceLoadKexts, L"\\IOGraphicsFamily.kext\\Info.plist");
   FSInject->AddStringToList(ForceLoadKexts, L"\\ATISupport.kext\\Contents\\Info.plist");
@@ -274,14 +274,14 @@ VOID ATIConnectorsPatchRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_
 //
 VOID ATIConnectorsPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
 {
-  
+
   UINTN   Num = 0;
-  
+
   DBG_RT(Entry, "\nATIConnectorsPatch: driverAddr = %x, driverSize = %x\nController = %s\n",
          Driver, DriverSize, Entry->KernelAndKextPatches->KPATIConnectorsController);
   ExtractKextBundleIdentifier(InfoPlist);
   DBG_RT(Entry, "Kext: %a\n", gKextBundleIdentifier);
-  
+
   // number of occurences od Data should be 1
   Num = SearchAndCount(Driver, DriverSize, Entry->KernelAndKextPatches->KPATIConnectorsData, Entry->KernelAndKextPatches->KPATIConnectorsDataLen);
   if (Num > 1) {
@@ -290,7 +290,7 @@ VOID ATIConnectorsPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT
     gBS->Stall(5*1000000);
     return;
   }
-  
+
   // patch
   Num = SearchAndReplace(Driver,
                          DriverSize,
@@ -322,9 +322,9 @@ VOID ATIConnectorsPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT
 // Rehabman corrections 2014
 //
 
-UINT8   MovlE2ToEcx[] = { 0xB9, 0xE2, 0x00, 0x00, 0x00 };
-UINT8   MovE2ToCx[]   = { 0x66, 0xB9, 0xE2, 0x00 };
-UINT8   Wrmsr[]       = { 0x0F, 0x30 };
+STATIC UINT8   MovlE2ToEcx[] = { 0xB9, 0xE2, 0x00, 0x00, 0x00 };
+STATIC UINT8   MovE2ToCx[]   = { 0x66, 0xB9, 0xE2, 0x00 };
+STATIC UINT8   Wrmsr[]       = { 0x0F, 0x30 };
 
 VOID AppleIntelCPUPMPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
 {
@@ -397,18 +397,18 @@ VOID AppleIntelCPUPMPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UI
 // http://www.insanelymac.com/forum/index.php?showtopic=276066
 //
 
-UINT8   LionSearch_X64[]  = { 0x75, 0x30, 0x44, 0x89, 0xf8 };
-UINT8   LionReplace_X64[] = { 0xeb, 0x30, 0x44, 0x89, 0xf8 };
+STATIC UINT8   LionSearch_X64[]  = { 0x75, 0x30, 0x44, 0x89, 0xf8 };
+STATIC UINT8   LionReplace_X64[] = { 0xeb, 0x30, 0x44, 0x89, 0xf8 };
 
-UINT8   LionSearch_i386[]  = { 0x75, 0x3d, 0x8b, 0x75, 0x08 };
-UINT8   LionReplace_i386[] = { 0xeb, 0x3d, 0x8b, 0x75, 0x08 };
+STATIC UINT8   LionSearch_i386[]  = { 0x75, 0x3d, 0x8b, 0x75, 0x08 };
+STATIC UINT8   LionReplace_i386[] = { 0xeb, 0x3d, 0x8b, 0x75, 0x08 };
 
-UINT8   MLSearch[]  = { 0x75, 0x30, 0x89, 0xd8 };
-UINT8   MLReplace[] = { 0xeb, 0x30, 0x89, 0xd8 };
+STATIC UINT8   MLSearch[]  = { 0x75, 0x30, 0x89, 0xd8 };
+STATIC UINT8   MLReplace[] = { 0xeb, 0x30, 0x89, 0xd8 };
 
 //SunKi
-UINT8   MavSearch[]  = { 0x75, 0x2e, 0x0f, 0xb6 };
-UINT8   MavReplace[] = { 0xeb, 0x2e, 0x0f, 0xb6 };
+STATIC UINT8   MavSearch[]  = { 0x75, 0x2e, 0x0f, 0xb6 };
+STATIC UINT8   MavReplace[] = { 0xeb, 0x2e, 0x0f, 0xb6 };
 
 //
 // We can not rely on OSVersion global variable for OS version detection,
@@ -420,19 +420,19 @@ UINT8   MavReplace[] = { 0xeb, 0x2e, 0x0f, 0xb6 };
 
 VOID AppleRTCPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
 {
-  
+
   UINTN   Num = 0;
   UINTN   NumLion_X64 = 0;
   UINTN   NumLion_i386 = 0;
   UINTN   NumML = 0;
   UINTN   NumMav = 0;
-  
+
   DBG_RT(Entry, "\nAppleRTCPatch: driverAddr = %x, driverSize = %x\n", Driver, DriverSize);
   if (Entry->KernelAndKextPatches->KPDebug) {
     ExtractKextBundleIdentifier(InfoPlist);
   }
   DBG_RT(Entry, "Kext: %a\n", gKextBundleIdentifier);
-  
+
   if (is64BitKernel) {
     NumLion_X64 = SearchAndCount(Driver, DriverSize, LionSearch_X64, sizeof(LionSearch_X64));
     NumML  = SearchAndCount(Driver, DriverSize, MLSearch,  sizeof(MLSearch));
@@ -440,7 +440,7 @@ VOID AppleRTCPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 In
   } else {
     NumLion_i386 = SearchAndCount(Driver, DriverSize, LionSearch_i386, sizeof(LionSearch_i386));
   }
-  
+
   if (NumLion_X64 + NumLion_i386 + NumML + NumMav > 1) {
     // more then one pattern found - we do not know what to do with it
     // and we'll skipp it
@@ -449,7 +449,7 @@ VOID AppleRTCPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 In
     gBS->Stall(5000000);
     return;
   }
-  
+
   if (NumLion_X64 == 1) {
     Num = SearchAndReplace(Driver, DriverSize, LionSearch_X64, sizeof(LionSearch_X64), LionReplace_X64, 1);
     DBG_RT(Entry, "==> Lion X64: %d replaces done.\n", Num);
@@ -508,8 +508,8 @@ VOID CheckForFakeSMC(CHAR8 *InfoPlist, LOADER_ENTRY *Entry)
 //
 // EB9D2D31-2D88-11D3-9A16-0090273F -> EB9D2D35-2D88-11D3-9A16-0090273F
 //
-UINT8   DELL_SMBIOS_GUID_Search[]  = { 0x45, 0x42, 0x39, 0x44, 0x32, 0x44, 0x33, 0x31 };
-UINT8   DELL_SMBIOS_GUID_Replace[] = { 0x45, 0x42, 0x39, 0x44, 0x32, 0x44, 0x33, 0x35 };
+STATIC STATIC UINT8   DELL_SMBIOS_GUID_Search[]  = { 0x45, 0x42, 0x39, 0x44, 0x32, 0x44, 0x33, 0x31 };
+STATIC STATIC UINT8   DELL_SMBIOS_GUID_Replace[] = { 0x45, 0x42, 0x39, 0x44, 0x32, 0x44, 0x33, 0x35 };
 
 //
 // EB9D2D31-2D88-11D3-9A16-0090273F is the standard SMBIOS Table Type 1 for
@@ -525,19 +525,19 @@ VOID DellSMBIOSPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
     // than Yosemite, they are all pure 64bit platforms
     //
     UINTN gPatchCount = 0;
-    
+
     DBG_RT(Entry, "\nDellSMBIOSPatch: driverAddr = %x, driverSize = %x\n", Driver, DriverSize);
     if (Entry->KernelAndKextPatches->KPDebug)
     {
         ExtractKextBundleIdentifier(InfoPlist);
     }
     DBG_RT(Entry, "Kext: %a\n", gKextBundleIdentifier);
-    
+
     //
     // now, let's patch it!
     //
     gPatchCount = SearchAndReplace(Driver, DriverSize, DELL_SMBIOS_GUID_Search, sizeof(DELL_SMBIOS_GUID_Search), DELL_SMBIOS_GUID_Replace, 1);
-    
+
     if (gPatchCount == 1)
     {
         DBG_RT(Entry, "==> AppleSMBIOS: %d replaces done.\n", gPatchCount);
@@ -564,24 +564,24 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
 {
     UINT32 i;
     UINT64 os_ver = AsciiOSVersionToUint64(Entry->OSVersion);
-    
+
     DBG_RT(Entry, "\nSNBE_AICPUPatch: driverAddr = %x, driverSize = %x\n", Driver, DriverSize);
     if (Entry->KernelAndKextPatches->KPDebug) {
         ExtractKextBundleIdentifier(InfoPlist);
     }
-    
+
     DBG_RT(Entry, "Kext: %a\n", gKextBundleIdentifier);
-    
+
     // now let's patch it
     if (os_ver < AsciiOSVersionToUint64("10.9") || os_ver >= AsciiOSVersionToUint64("10.14")) {
         DBG("Unsupported macOS.\nSandyBridge-E requires macOS 10.9 - 10.13.x, aborted\n");
         DBG("SNBE_AICPUPatch() <===FALSE\n");
         return;
     }
-    
+
     if (os_ver < AsciiOSVersionToUint64("10.10")) {
         // 10.9.x
-        UINT8 find[][3] = {
+        STATIC UINT8 find[][3] = {
             { 0x84, 0x2F, 0x01 },
             { 0x3E, 0x75, 0x3A },
             { 0x84, 0x5F, 0x01 },
@@ -590,7 +590,7 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
             { 0xFC, 0x02, 0x74 },
             { 0x01, 0x74, 0x58 }
         };
-        UINT8 repl[][3] = {
+        STATIC UINT8 repl[][3] = {
             { 0x85, 0x2F, 0x01 },
             { 0x3E, 0x90, 0x90 },
             { 0x85, 0x5F, 0x01 },
@@ -599,7 +599,7 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
             { 0xFC, 0x02, 0xEB },
             { 0x01, 0xEB, 0x58 }
         };
-        
+
         for (i = 0; i < 7; i++) {
             if (SearchAndReplace(Driver, DriverSize, find[i], sizeof(find[i]), repl[i], 0)) {
                 DBG("SNBE_AICPUPatch (%d/7) applied\n", i);
@@ -609,12 +609,12 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
         }
     } else if (os_ver < AsciiOSVersionToUint64("10.11")) {
         // 10.10.x
-        UINT8 find[][3] = {
+        STATIC UINT8 find[][3] = {
             { 0x3E, 0x75, 0x39 },
             { 0x74, 0x11, 0xB9 },
             { 0x01, 0x74, 0x56 }
         };
-        UINT8 repl[][3] = {
+        STATIC UINT8 repl[][3] = {
             { 0x3E, 0x90, 0x90 },
             { 0xEB, 0x11, 0xB9 },
             { 0x01, 0xEB, 0x56 }
@@ -626,34 +626,34 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
                 DBG("SNBE_AICPUPatch (%d/7) not apply\n", i);
             }
         }
-        
-        UINT8 find_1[] = { 0xFF, 0x0F, 0x84, 0x2D };
-        UINT8 repl_1[] = { 0xFF, 0x0F, 0x85, 0x2D };
+
+        STATIC UINT8 find_1[] = { 0xFF, 0x0F, 0x84, 0x2D };
+        STATIC UINT8 repl_1[] = { 0xFF, 0x0F, 0x85, 0x2D };
         if (SearchAndReplace(Driver, DriverSize, find_1, sizeof(find_1), repl_1, 0)) {
             DBG("SNBE_AICPUPatch (4/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (4/7) not apply\n");
         }
-        
-        
-        UINT8 find_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x84 };
-        UINT8 repl_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x85 };
+
+
+        STATIC UINT8 find_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x84 };
+        STATIC UINT8 repl_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x85 };
         if (SearchAndReplace(Driver, DriverSize, find_2, sizeof(find_2), repl_2, 0)) {
             DBG("SNBE_AICPUPatch (5/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (5/7) not apply\n");
         }
-        
-        UINT8 find_3[] = { 0x02, 0x74, 0x0B, 0x41, 0x83, 0xFC, 0x03, 0x75, 0x22, 0xB9, 0x02, 0x06 };
-        UINT8 repl_3[] = { 0x02, 0xEB, 0x0B, 0x41, 0x83, 0xFC, 0x03, 0x75, 0x22, 0xB9, 0x02, 0x06 };
+
+        STATIC UINT8 find_3[] = { 0x02, 0x74, 0x0B, 0x41, 0x83, 0xFC, 0x03, 0x75, 0x22, 0xB9, 0x02, 0x06 };
+        STATIC UINT8 repl_3[] = { 0x02, 0xEB, 0x0B, 0x41, 0x83, 0xFC, 0x03, 0x75, 0x22, 0xB9, 0x02, 0x06 };
         if (SearchAndReplace(Driver, DriverSize, find_3, sizeof(find_3), repl_3, 0)) {
             DBG("SNBE_AICPUPatch (6/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (6/7) not apply\n");
         }
-        
-        UINT8 find_4[] = { 0x74, 0x0B, 0x41, 0x83, 0xFC, 0x03, 0x75, 0x11, 0xB9, 0x42, 0x06, 0x00 };
-        UINT8 repl_4[] = { 0xEB, 0x0B, 0x41, 0x83, 0xFC, 0x03, 0x75, 0x11, 0xB9, 0x42, 0x06, 0x00 };
+
+        STATIC UINT8 find_4[] = { 0x74, 0x0B, 0x41, 0x83, 0xFC, 0x03, 0x75, 0x11, 0xB9, 0x42, 0x06, 0x00 };
+        STATIC UINT8 repl_4[] = { 0xEB, 0x0B, 0x41, 0x83, 0xFC, 0x03, 0x75, 0x11, 0xB9, 0x42, 0x06, 0x00 };
         if (SearchAndReplace(Driver, DriverSize, find_4, sizeof(find_4), repl_4, 0)) {
             DBG("SNBE_AICPUPatch (7/7) applied\n");
         } else {
@@ -661,12 +661,12 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
         }
     } else if (os_ver < AsciiOSVersionToUint64("10.12")) {
         // 10.11
-        UINT8 find[][3] = {
+        STATIC UINT8 find[][3] = {
             { 0x3E, 0x75, 0x39 },
             { 0x75, 0x11, 0xB9 },
             { 0x01, 0x74, 0x5F }
         };
-        UINT8 repl[][3] = {
+        STATIC UINT8 repl[][3] = {
             { 0x3E, 0x90, 0x90 },
             { 0xEB, 0x11, 0xB9 },
             { 0x01, 0xEB, 0x5F }
@@ -678,33 +678,33 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
                 DBG("SNBE_AICPUPatch (%d/7) not apply\n", i);
             }
         }
-        
-        UINT8 find_1[] = { 0xFF, 0x0F, 0x84, 0x2D };
-        UINT8 repl_1[] = { 0xFF, 0x0F, 0x85, 0x2D };
+
+        STATIC UINT8 find_1[] = { 0xFF, 0x0F, 0x84, 0x2D };
+        STATIC UINT8 repl_1[] = { 0xFF, 0x0F, 0x85, 0x2D };
         if (SearchAndReplace(Driver, DriverSize, find_1, sizeof(find_1), repl_1, 0)) {
             DBG("SNBE_AICPUPatch (4/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (4/7) not apply\n");
         }
-        
-        UINT8 find_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x84 };
-        UINT8 repl_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x85 };
+
+        STATIC UINT8 find_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x84 };
+        STATIC UINT8 repl_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x85 };
         if (SearchAndReplace(Driver, DriverSize, find_2, sizeof(find_2), repl_2, 0)) {
             DBG("SNBE_AICPUPatch (5/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (5/7) not apply\n");
         }
-        
-        UINT8 find_3[] = { 0xC9, 0x74, 0x16, 0x0F, 0x32, 0x48, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x48 };
-        UINT8 repl_3[] = { 0xC9, 0xEB, 0x16, 0x0F, 0x32, 0x48, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x48 };
+
+        STATIC UINT8 find_3[] = { 0xC9, 0x74, 0x16, 0x0F, 0x32, 0x48, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x48 };
+        STATIC UINT8 repl_3[] = { 0xC9, 0xEB, 0x16, 0x0F, 0x32, 0x48, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x48 };
         if (SearchAndReplace(Driver, DriverSize, find_3, sizeof(find_3), repl_3, 0)) {
             DBG("SNBE_AICPUPatch (6/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (6/7) not apply\n");
         }
-        
-        UINT8 find_4[] = { 0xC9, 0x74, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
-        UINT8 repl_4[] = { 0xC9, 0xEB, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
+
+        STATIC UINT8 find_4[] = { 0xC9, 0x74, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
+        STATIC UINT8 repl_4[] = { 0xC9, 0xEB, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
         if (SearchAndReplace(Driver, DriverSize, find_4, sizeof(find_4), repl_4, 0)) {
             DBG("SNBE_AICPUPatch (7/7) applied\n");
         } else {
@@ -712,12 +712,12 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
         }
     } else if (os_ver < AsciiOSVersionToUint64("10.13")) {
         // 10.12
-        UINT8 find[][3] = {
+        STATIC UINT8 find[][3] = {
             { 0x01, 0x74, 0x61 },
             { 0x3E, 0x75, 0x38 },
             { 0x75, 0x11, 0xB9 }
         };
-        UINT8 repl[][3] = {
+        STATIC UINT8 repl[][3] = {
             { 0x01, 0xEB, 0x61 },
             { 0x3E, 0x90, 0x90 },
             { 0xEB, 0x11, 0xB9 }
@@ -729,33 +729,33 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
                 DBG("SNBE_AICPUPatch (%d/7) not apply\n", i);
             }
         }
-        
-        UINT8 find_1[] = { 0xFF, 0x0F, 0x84, 0x2D };
-        UINT8 repl_1[] = { 0xFF, 0x0F, 0x85, 0x2D };
+
+        STATIC UINT8 find_1[] = { 0xFF, 0x0F, 0x84, 0x2D };
+        STATIC UINT8 repl_1[] = { 0xFF, 0x0F, 0x85, 0x2D };
         if (SearchAndReplace(Driver, DriverSize, find_1, sizeof(find_1), repl_1, 0)) {
             DBG("SNBE_AICPUPatch (4/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (4/7) not apply\n");
         }
 
-        UINT8 find_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x84 };
-        UINT8 repl_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x85 };
+        STATIC UINT8 find_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x84 };
+        STATIC UINT8 repl_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x85 };
         if (SearchAndReplace(Driver, DriverSize, find_2, sizeof(find_2), repl_2, 0)) {
             DBG("SNBE_AICPUPatch (5/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (5/7) not apply\n");
         }
-        
-        UINT8 find_3[] = { 0xC9, 0x74, 0x15, 0x0F, 0x32, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x48 };
-        UINT8 repl_3[] = { 0xC9, 0xEB, 0x15, 0x0F, 0x32, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x48 };
+
+        STATIC UINT8 find_3[] = { 0xC9, 0x74, 0x15, 0x0F, 0x32, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x48 };
+        STATIC UINT8 repl_3[] = { 0xC9, 0xEB, 0x15, 0x0F, 0x32, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x48 };
         if (SearchAndReplace(Driver, DriverSize, find_3, sizeof(find_3), repl_3, 0)) {
             DBG("SNBE_AICPUPatch (6/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (6/7) not apply\n");
         }
 
-        UINT8 find_4[] = { 0xC9, 0x74, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
-        UINT8 repl_4[] = { 0xC9, 0xEB, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
+        STATIC UINT8 find_4[] = { 0xC9, 0x74, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
+        STATIC UINT8 repl_4[] = { 0xC9, 0xEB, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
         if (SearchAndReplace(Driver, DriverSize, find_4, sizeof(find_4), repl_4, 0)) {
             DBG("SNBE_AICPUPatch (7/7) applied\n");
         } else {
@@ -763,12 +763,12 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
         }
     } else if (os_ver < AsciiOSVersionToUint64("10.14")) {
         // 10.13
-        UINT8 find[][3] = {
+        STATIC UINT8 find[][3] = {
             { 0x01, 0x74, 0x61 },
             { 0x3E, 0x75, 0x38 },
             { 0x75, 0x11, 0xB9 }
         };
-        UINT8 repl[][3] = {
+        STATIC UINT8 repl[][3] = {
             { 0x01, 0xEB, 0x61 },
             { 0x3E, 0x90, 0x90 },
             { 0xEB, 0x11, 0xB9 }
@@ -780,40 +780,40 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
                 DBG("SNBE_AICPUPatch (%d/7) not apply\n", i);
             }
         }
-        
-        UINT8 find_1[] = { 0xFF, 0x0F, 0x84, 0xD3 };
-        UINT8 repl_1[] = { 0xFF, 0x0F, 0x85, 0xD3 };
+
+        STATIC UINT8 find_1[] = { 0xFF, 0x0F, 0x84, 0xD3 };
+        STATIC UINT8 repl_1[] = { 0xFF, 0x0F, 0x85, 0xD3 };
         if (SearchAndReplace(Driver, DriverSize, find_1, sizeof(find_1), repl_1, 0)) {
             DBG("SNBE_AICPUPatch (4/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (4/7) not apply\n");
         }
-        
-        UINT8 find_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x84 };
-        UINT8 repl_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x85 };
+
+        STATIC UINT8 find_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x84 };
+        STATIC UINT8 repl_2[] = { 0x01, 0x00, 0x01, 0x0F, 0x85 };
         if (SearchAndReplace(Driver, DriverSize, find_2, sizeof(find_2), repl_2, 0)) {
             DBG("SNBE_AICPUPatch (5/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (5/7) not apply\n");
         }
-        
-        UINT8 find_3[] = { 0xC9, 0x74, 0x14, 0x0F, 0x32, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x6B };
-        UINT8 repl_3[] = { 0xC9, 0xEB, 0x14, 0x0F, 0x32, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x6B};
+
+        STATIC UINT8 find_3[] = { 0xC9, 0x74, 0x14, 0x0F, 0x32, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x6B };
+        STATIC UINT8 repl_3[] = { 0xC9, 0xEB, 0x14, 0x0F, 0x32, 0x25, 0xFF, 0x0F, 0x00, 0x00, 0x6B};
         if (SearchAndReplace(Driver, DriverSize, find_3, sizeof(find_3), repl_3, 0)) {
             DBG("SNBE_AICPUPatch (6/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (6/7) not apply\n");
         }
-        
-        UINT8 find_4[] = { 0xC9, 0x74, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
-        UINT8 repl_4[] = { 0xC9, 0xEB, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
+
+        STATIC UINT8 find_4[] = { 0xC9, 0x74, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
+        STATIC UINT8 repl_4[] = { 0xC9, 0xEB, 0x0C, 0x0F, 0x32, 0x83, 0xE0, 0x1F, 0x42, 0x89, 0x44, 0x3B };
         if (SearchAndReplace(Driver, DriverSize, find_4, sizeof(find_4), repl_4, 0)) {
             DBG("SNBE_AICPUPatch (7/7) applied\n");
         } else {
             DBG("SNBE_AICPUPatch (7/7) not apply\n");
         }
     }
-    
+
     if (Entry->KernelAndKextPatches->KPDebug) {
         gBS->Stall(5000000);
     }
@@ -828,31 +828,31 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
 // find: 0x48, 0x81, 0xFB, 0x00, 0x00, 0x00, 0x40
 // repl: 0x48, 0x81, 0xFB, 0x00, 0x00, 0x00, 0x80
 //
-UINT8 BroadwellE_IOPCI_Find[] = { 0x48, 0x81, 0xFB, 0x00, 0x00, 0x00, 0x40 };
-UINT8 BroadwellE_IOPCI_Repl[] = { 0x48, 0x81, 0xFB, 0x00, 0x00, 0x00, 0x80 };
+STATIC UINT8 BroadwellE_IOPCI_Find[] = { 0x48, 0x81, 0xFB, 0x00, 0x00, 0x00, 0x40 };
+STATIC UINT8 BroadwellE_IOPCI_Repl[] = { 0x48, 0x81, 0xFB, 0x00, 0x00, 0x00, 0x80 };
 
 VOID BDWE_IOPCIPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
 {
     UINTN count = 0;
-    
+
     DBG_RT(Entry, "\nBDWE_IOPCIPatch: driverAddr = %x, driverSize = %x\n", Driver, DriverSize);
     if (Entry->KernelAndKextPatches->KPDebug) {
         ExtractKextBundleIdentifier(InfoPlist);
     }
-    
+
     DBG_RT(Entry, "Kext: %a\n", gKextBundleIdentifier);
     //
     // now, let's patch it!
     //
     count = SearchAndReplace(Driver, DriverSize, BroadwellE_IOPCI_Find, sizeof(BroadwellE_IOPCI_Find), BroadwellE_IOPCI_Repl, 0);
-    
+
     if (count) {
         DBG_RT(Entry, "==> IOPCIFamily: %d replaces done.\n", count);
     }
     else {
         DBG_RT(Entry, "==> Patterns not found - patching NOT done.\n");
     }
-    
+
     if (Entry->KernelAndKextPatches->KPDebug) {
         gBS->Stall(5000000);
     }
@@ -878,7 +878,7 @@ VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 Inf
 {
   UINTN   Num = 0;
   INTN    Ind;
-  
+
   DBG_RT(Entry, "\nAnyKextPatch %d: driverAddr = %x, driverSize = %x\nAnyKext = %a\n",
          N, Driver, DriverSize, Entry->KernelAndKextPatches->KextPatches[N].Label);
 
@@ -914,7 +914,7 @@ VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 Inf
       DBG_RT(Entry, "%c", Entry->KernelAndKextPatches->KextPatches[N].Patch[Ind]);
     }
     DBG_RT(Entry, "' \n");
-    
+
     Num = SearchAndReplaceTxt((UINT8*)InfoPlist,
                            InfoPlistSize,
                            Entry->KernelAndKextPatches->KextPatches[N].Data,
@@ -922,7 +922,7 @@ VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 Inf
                            Entry->KernelAndKextPatches->KextPatches[N].Patch,
                            -1);
   }
-  
+
   if (Entry->KernelAndKextPatches->KPDebug) {
     if (Num > 0) {
       DBG_RT(Entry, "==> patched %d times!\n", Num);
@@ -940,17 +940,17 @@ VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 Inf
 VOID KextPatcherRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_LIST *ForceLoadKexts, LOADER_ENTRY *Entry)
 {
   INTN i;
-  
+
   if (Entry->KernelAndKextPatches->KPATIConnectorsController != NULL) {
     ATIConnectorsPatchRegisterKexts(FSInject, ForceLoadKexts, Entry);
   }
-  
+
   for (i = 0; i < Entry->KernelAndKextPatches->NrKexts; i++) {
     FSInject->AddStringToList(ForceLoadKexts,
                               PoolPrint(L"\\%a.kext\\Contents\\Info.plist",
                                         Entry->KernelAndKextPatches->KextPatches[i].Name) );
   }
-  
+
 }
 
 //
@@ -960,7 +960,7 @@ VOID KextPatcherRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_LIST *F
 VOID PatchKext(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
 {
   INT32 i;
-  
+
   if (Entry->KernelAndKextPatches->KPATIConnectorsController != NULL) {
     //
     // ATIConnectors
@@ -977,9 +977,9 @@ VOID PatchKext(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPl
       return;
     }
   }
-  
+
   ExtractKextBundleIdentifier(InfoPlist);
-  
+
   if (Entry->KernelAndKextPatches->KPAppleIntelCPUPM &&
       (AsciiStrStr(InfoPlist,
                    "<string>com.apple.driver.AppleIntelCPUPowerManagement</string>") != NULL)) {
@@ -1034,7 +1034,7 @@ VOID PatchKext(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPl
       }
     }
 //  }
-  
+
   //
   // Check for FakeSMC (InjectKexts if no FakeSMC)
   //
@@ -1071,43 +1071,43 @@ UINT64 GetPlistHexValue(CHAR8 *Plist, CHAR8 *Key, CHAR8 *WholePlist)
   UINTN     IDLen;
   CHAR8     Buffer[48];
   //static INTN   DbgCount = 0;
-  
+
   // search for Key
   Value = AsciiStrStr(Plist, Key);
   if (Value == NULL) {
     //DBG(L"\nNo key: %a\n", Key);
     return 0;
   }
-  
+
   // search for <integer
   IntTag = AsciiStrStr(Value, "<integer");
   if (IntTag == NULL) {
     DBG(L"\nNo integer\n");
     return 0;
   }
-  
+
   // find <integer end
   Value = AsciiStrStr(IntTag, ">");
   if (Value == NULL) {
     DBG(L"\nNo <integer end\n");
     return 0;
   }
-  
+
   if (Value[-1] != '/') {
-    
+
     // normal case: value is here
     NumValue = AsciiStrHexToUint64(Value + 1);
     return NumValue;
-    
+
   }
-  
+
   // it might be a reference: IDREF="173"/>
   Value = AsciiStrStr(IntTag, "<integer IDREF=\"");
   if (Value != IntTag) {
     DBG(L"\nNo <integer IDREF=\"\n");
     return 0;
   }
-  
+
   // compose <integer ID="xxx" in the Buffer
   IDStart = AsciiStrStr(IntTag, "\"") + 1;
   IDEnd = AsciiStrStr(IDStart, "\"");
@@ -1130,14 +1130,14 @@ UINT64 GetPlistHexValue(CHAR8 *Plist, CHAR8 *Key, CHAR8 *WholePlist)
    DBG(L"Searching: '%a'\n", Buffer);
    }
    */
-  
+
   // and search whole plist for ID
   IntTag = AsciiStrStr(WholePlist, Buffer);
   if (IntTag == NULL) {
     DBG(L"\nNo %a\n", Buffer);
     return 0;
   }
-  
+
   // got it. find closing >
   /*
    if (DbgCount < 3) {
@@ -1154,10 +1154,10 @@ UINT64 GetPlistHexValue(CHAR8 *Plist, CHAR8 *Key, CHAR8 *WholePlist)
     DBG(L"\nInvalid <integer IDREF end\n");
     return 0;
   }
-  
+
   // we should have value now
   NumValue = AsciiStrHexToUint64(Value + 1);
-  
+
   /*
    if (DbgCount < 3) {
    AsciiStrnCpy(Buffer, IntTag, sizeof(Buffer) - 1);
@@ -1166,7 +1166,7 @@ UINT64 GetPlistHexValue(CHAR8 *Plist, CHAR8 *Key, CHAR8 *WholePlist)
    }
    DbgCount++;
    */
-  
+
   return NumValue;
 }
 
@@ -1208,10 +1208,10 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
   //INTN      DbgCount = 0;
   UINT32    KextAddr;
   UINT32    KextSize;
-  
-  
+
+
   WholePlist = (CHAR8*)(UINTN)PrelinkInfoAddr;
-  
+
   //
   // Detect FakeSMC and if present then
   // disable kext injection InjectKexts().
@@ -1222,12 +1222,12 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
   // But searching through the whole prelink info
   // works and that's the reason why it is here.
   //
-  
+
   //Slice
   // I see no reason to disable kext injection if FakeSMC found in cache
   //since rev4240 we have manual kext inject disable
   CheckForFakeSMC(WholePlist, Entry);
-  
+
   DictPtr = WholePlist;
   while ((DictPtr = AsciiStrStr(DictPtr, "dict>")) != NULL) {
     if (DictPtr[-1] == '<') {
@@ -1238,16 +1238,16 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
         InfoPlistStart = DictPtr - 1;
       }
     } else if (DictPtr[-2] == '<' && DictPtr[-1] == '/') {
-      
+
       // closing dict
       if (DictLevel == 2 && InfoPlistStart != NULL) {
         // kext end
         InfoPlistEnd = DictPtr + 5 /* "dict>" */;
-        
+
         // terminate Info.plist with 0
         SavedValue = *InfoPlistEnd;
         *InfoPlistEnd = '\0';
-        
+
         // get kext address from _PrelinkExecutableSourceAddr
         // truncate to 32 bit to get physical addr
         KextAddr = (UINT32)GetPlistHexValue(InfoPlistStart, kPrelinkExecutableSourceKey, WholePlist);
@@ -1256,9 +1256,9 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
         KextAddr += KernelSlide;
         // and adjust for AptioFixDrv's KernelRelocBase
         KextAddr += (UINT32)KernelRelocBase;
-        
+
         KextSize = (UINT32)GetPlistHexValue(InfoPlistStart, kPrelinkExecutableSizeKey, WholePlist);
-        
+
         /*if (DbgCount < 3
          || DbgCount == 100 || DbgCount == 101 || DbgCount == 102
          ) {
@@ -1267,7 +1267,7 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
          gBS->Stall(20000000);
          }
          */
-        
+
         // patch it
         PatchKext(
                   (UINT8*)(UINTN)KextAddr,
@@ -1276,7 +1276,7 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
                   (UINT32)(InfoPlistEnd - InfoPlistStart),
                   Entry
                   );
-        
+
         // return saved char
         *InfoPlistEnd = SavedValue;
         //DbgCount++;
@@ -1302,16 +1302,16 @@ VOID PatchLoadedKexts(LOADER_ENTRY *Entry)
 	struct OpaqueDTPropertyIterator OPropIter;
 	DTPropertyIterator	PropIter = &OPropIter;
 	//UINTN               DbgCount = 0;
-  
-  
+
+
   DBG(L"\nPatchLoadedKexts ... dtRoot = %p\n", dtRoot);
-  
+
   if (!dtRoot) {
     return;
   }
-  
+
   DTInit(dtRoot);
-  
+
   if (DTLookupEntry(NULL,"/chosen/memory-map", &MMEntry) == kSuccess) {
     if (DTCreatePropertyIteratorNoAlloc(MMEntry, PropIter) == kSuccess) {
       while (DTIterateProperties(PropIter, &PropName) == kSuccess) {
@@ -1320,15 +1320,15 @@ VOID PatchLoadedKexts(LOADER_ENTRY *Entry)
           // PropEntry _DeviceTreeBuffer is the value of Driver-XXXXXX property
           PropEntry = (_DeviceTreeBuffer*)(((UINT8*)PropIter->currentProperty) + sizeof(DeviceTreeNodeProperty));
           //if (DbgCount < 3) DBG(L"%a: paddr = %x, length = %x\n", PropName, PropEntry->paddr, PropEntry->length);
-          
+
           // PropEntry->paddr points to _BooterKextFileInfo
           KextFileInfo = (_BooterKextFileInfo *)(UINTN)PropEntry->paddr;
-          
+
           // Info.plist should be terminated with 0, but will also do it just in case
           InfoPlist = (CHAR8*)(UINTN)KextFileInfo->infoDictPhysAddr;
           SavedValue = InfoPlist[KextFileInfo->infoDictLength];
           InfoPlist[KextFileInfo->infoDictLength] = '\0';
-          
+
           PatchKext(
                     (UINT8*)(UINTN)KextFileInfo->executablePhysAddr,
                     KextFileInfo->executableLength,

 

 

Edited by TheRacerMaster

Share this post


Link to post
Share on other sites

Clover 4482 has broken kext injection of my ApplePS2SmartTouchPad.kext so i have no touchpad. External mouse works fine but trackpad is no longer detected. Was working fine with 4480 not sure about 4481 as i don't have it.

Edited by SavageAUS

Share this post


Link to post
Share on other sites

32-bit builds appear to be broken with GCC 8:

Clover/rEFIt_UEFI/Platform/AcpiPatcher.c:222:22: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       gBS->FreePages((EFI_PHYSICAL_ADDRESS)XsdtEntryFromIndex(Index), XsdtReplaceSizes[Index]);
                      ^
#define XsdtEntryFromIndex(index) (EFI_ACPI_DESCRIPTION_HEADER*)(UINTN)ReadUnaligned64(XsdtEntryPtrFromIndex(index))

EFI_PHYSICAL_ADDRESS is 64-bit, so this is casting from a 32-bit pointer to a 64-bit integer.

 

Also, r4482's plist.c changes (specifically, the "end of cache" freeing) appear to cause memory corruption. Removing this fixes kext injection issues (plist.c memory corruption causes some kext versions to display <null string> in bdmesg).

Edited by TheRacerMaster

Share this post


Link to post
Share on other sites
1 hour ago, TheRacerMaster said:

32-bit builds appear to be broken with GCC 8:


Clover/rEFIt_UEFI/Platform/AcpiPatcher.c:222:22: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       gBS->FreePages((EFI_PHYSICAL_ADDRESS)XsdtEntryFromIndex(Index), XsdtReplaceSizes[Index]);
                      ^

#define XsdtEntryFromIndex(index) (EFI_ACPI_DESCRIPTION_HEADER*)(UINTN)ReadUnaligned64(XsdtEntryPtrFromIndex(index))

EFI_PHYSICAL_ADDRESS is 64-bit, so this is casting from a 32-bit pointer to a 64-bit integer.

 

Also, r4482's plist.c changes (specifically, the "end of cache" freeing) appear to cause memory corruption. Removing this fixes kext injection issues (plist.c memory corruption causes some kext versions to display <null string> in bdmesg).

Thanks,

STATIC arrays accepted in 4484,

plist.c fixed in 4483.

EFI_PHYSICAL_ADDRESS will be fixed.  EDITED: 4485

Share this post


Link to post
Share on other sites

Hi,

it appears that 

        <key>FakeID</key>
        <dict>
            <key>LAN</key>
            <string>0x435411ab</string>
        </dict>

is broken since rev 4497

OK with 4495.

Is it a bug in new injection method ?

 

Share this post


Link to post
Share on other sites

Zenith432, why did you change architecture 32+64 to 64 in clover utilities? This breaks 32-bit compilation I still use. 10.14 has nothing to do to fat binaries, please revert the change back.

Share this post


Link to post
Share on other sites
9 hours ago, vit9696 said:

Zenith432, why did you change architecture 32+64 to 64 in clover utilities? This breaks 32-bit compilation I still use. 10.14 has nothing to do to fat binaries, please revert the change back.

Explained here

Which compilation did it break?

 

FWIW: I know why 32-bit build of clover-genconfig defines MDE_CPU_X64.  It's because in project.pbxproj, HEADER_SEARCH_PATHS is always MdePkg/Include/X64, so ProcessorBind.h is taken from there and code always uses 64 EDK2 defs.  In particular, the lines

Quote
#if defined(MDE_CPU_IA32)
printf("32 bit generator\n");
#elif defined(MDE_CPU_X64)
printf("64 bit generator\n");

in clover-genconfig.c are a joke.

 

PS: So it seems even 32-bit build of clover-genconfig wants to parse binary format of SETTINGS_DATA used by 64-bit Clover.  Is this right?  Are we looking for version to parse SETTINGS_DATA for 32-bit Clover?  Should 32-bit support be fully discontinued?  I need to know what the intention was to decide on resolution.

 

PPS: Including X64 version of ProcessorBind.h is 32-bit build of clover-genconfig cannot work anyway.  The struct SETTINGS_DATA has pointers in it, which are a different size, so 32-bit build will not end up with correct structure for 64-bit Clover.

 

@Slice: did you bother to test new code in r4501?  I see in main() in clover-genconfig.c call to GetOFVariable("device-properties", ...) which uses global gPlatform before it's been initialized.

Edited by Zenith432

Share this post


Link to post
Share on other sites

@Zenith432, the obvious issue here is that you enforced clover-genconfig being 64-bit, and thus it does not run on a 32-bit only CPU (and yes, that is my case, which I still rarely use for testing some really old legacy projects). So it is very clear how and why this is broken :).

 

Sure, nobody did request you to support a 32-bit only binary (which I agree is inadequate), yet a fat binary should successfully be able to generate a 32-bit config on a 32-bit only system, and a 64-bit config on a 64-bit system. For hybrid ones there have always been an arch util (man arch).

 

To fix the actual header paths bug you need to change the Xcode project header inclusion paths. If you click on + in Xcode project prefs it would let you define different header paths depending on the architecture. This should have been done right previously, yet some crazy attempts to make it "64-bit only" must have borked it.

 

Thanks~

Share this post


Link to post
Share on other sites

The 32-bit build of clover-genconfig didn't work before.  It was built, but it didn't do anything. It used arch i386 and X64/ProcessorBind.h which gives a different sizeof(SETTINGS_DATA) than compiling with arch x86_64.  In clover-genconfig.c there is a sanity check for sizeof(SETTINGS_DATA) being the same as the size of the data being parsed and it exited with an error message.

The reason for removal of 32-bit build was that after reversion of MdePke/Include/Base.h, it needs MDE_CPU_IA32 for arch i386 or it generates a compile error.  Right now, both xcodeproj and Makefile for clover-genconfig do not result in any errors, but do not build 32-bitnary either.

I'll only have access to macos on Monday, but when I do I'll change xcodeproj to use IA32/ProcessorBind.h for arch i386, return 32-bit into fat binary.  It is the only workable solution, because hybrid option does not yield a usable program.

Share this post


Link to post
Share on other sites
On 5/26/2018 at 8:19 AM, Zenith432 said:

 

@Slice: did you bother to test new code in r4501?  I see in main() in clover-genconfig.c call to GetOFVariable("device-properties", ...) which uses global gPlatform before it's been initialized.

4501 is not working version. I commit it to have an ability get my draft from other place.

I want to seriously advance clover-genconfig.

Share this post


Link to post
Share on other sites
On 5/26/2018 at 2:28 AM, Mr MagOO said:

Hi,

it appears that 

        <key>FakeID</key>
        <dict>
            <key>LAN</key>
            <string>0x435411ab</string>
        </dict>

is broken since rev 4497

OK with 4495.

Is it a bug in new injection method ?

 

@Slice : is there a chance the FakeID injection is broken or do I need to change syntax or something to make it work post rev 4496 ?

Share this post


Link to post
Share on other sites
6 hours ago, Mr MagOO said:

@Slice : is there a chance the FakeID injection is broken or do I need to change syntax or something to make it work post rev 4496 ?

Yes, you have to add

Quote

    <key>Devices</key>
    <dict>

        <key>LANInject</key>
        <true/>

 

Sorry for the back incompatibility.

I have to disable automatic injection to not mix with new method of Properties injection.

Share this post


Link to post
Share on other sites

@Slice

The latest config-sample.plist you committed has embedded nulls in it.  For example, after the string "Apple WiFi card".  There are others.

Also, the file was previously sorted.  It makes it hard to merge changes when each commit is randomly sorted from previous one.

Share this post


Link to post
Share on other sites
15 hours ago, Slice said:

Yes, you have to add

Sorry for the back incompatibility.

I have to disable automatic injection to not mix with new method of Properties injection.

 

Well, something is really happening with LANInjection=true ...

but I don't know what because I lost my video with a black screen boot :)

I've got this in Devices and Graphics :

	<key>Devices</key>
	<dict>
		<key>Audio</key>
		<dict>
			<key>Inject</key>
			<string>no</string>
		</dict>
        <key>LANInjection</key>
		<true/>
		<key>FakeID</key>
		<dict>
			<key>LAN</key>
			<string>0x435411ab</string>
		</dict>
		<key>USB</key>
		<dict>
			<key>AddClockID</key>
			<true/>
			<key>FixOwnership</key>
			<true/>
			<key>HighCurrent</key>
			<true/>
			<key>Inject</key>
			<true/>
		</dict>
	</dict>

	<key>Graphics</key>
	<dict>
		<key>Inject</key>
		<dict>
			<key>ATI</key>
			<false/>
			<key>Intel</key>
			<false/>
			<key>NVidia</key>
			<true/>
		</dict>
		<key>NvidiaGeneric</key>
		<true/>
		<key>VideoPorts</key>
		<integer>3</integer>
	</dict>

Is there any change for video injection ?

edit : {censored}, my fault, all is OK now with rev 4507.

Thank you Slice!

 

Edited by Mr MagOO

Share this post


Link to post
Share on other sites
3 hours ago, Zenith432 said:

@Slice

The latest config-sample.plist you committed has embedded nulls in it.  For example, after the string "Apple WiFi card".  There are others.

Also, the file was previously sorted.  It makes it hard to merge changes when each commit is randomly sorted from previous one.

It is PlistEditPro mischief. I corrected this in 4507. I will no more use this strange application.

Share this post


Link to post
Share on other sites
5 hours ago, Zenith432 said:

@Slice

The latest config-sample.plist you committed has embedded nulls in it.  For example, after the string "Apple WiFi card".  There are others.

 

It looks like nulls are known problem

Quote

  CopyMem(configBuffer, buffer, bufferSize);
  for (i=0; i<bufferSize; i++) {
    if (configBuffer == 0) {
      configBuffer = 0x20;  //replace random zero bytes to spaces
    }
  }

 

But I am not sure if this is good solution. Anyway we live with this workaround some years.

Share this post


Link to post
Share on other sites
13 hours ago, Zenith432 said:

@Slice

The latest config-sample.plist you committed has embedded nulls in it.  For example, after the string "Apple WiFi card".  There are others.

 

clover-genconfig corrected to not produce nulls. rev 4508.

 

Sorry about 32 bits, Xcode 9.3.1 don't like it.

Share this post


Link to post
Share on other sites
On 5/29/2018 at 7:29 AM, Slice said:

Sorry about 32 bits, Xcode 9.3.1 don't like it.

-arch i386 builds fine with Xcode 9.4, but after removed 10.11 sdk which I don't have.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Klaidonis
      I am making a minimal Clover build for the fastest boot possible with the boot6 file in legacy mode.
      While looking at the preboot.log, I noticed that there is a line without explanation (at 0:892). Apparently, whatever it is, the execution time of it is close to 2 seconds, more than 55% of the total logged boot time in the current configuration. This does not change whether I use USB 2 or USB 3 port.
       
      Is there a way to eliminate or speed up the above? Also, is there anything else you can suggest to improve the performance based on the below log file? Which moment in the boot process corresponds to the start time in preboot.log?  
      The last thing I would like to understand is the delay/timeout after the boot6 file has loaded, and the number 6 disappears from the screen. For about 2 seconds or slightly less, I can press any key, and then it will enter the BIOS-like interface from the boot6 file. Without further knowledge, it seems like those 2 seconds are just delay time, and only after that is CLOVERX64.efi actually started, which, I presume, is approximately when the preboot.log timer starts. So, if the aforementioned is correct, can I get rid of this delay as well? Note that I am using the boot1f32 file to chain-load boot6, which does not include the initial 2-second wait period for a keypress.
       
      === preboot.log ===
      0:100 0:100 MemLog inited, TSC freq: 2394459554 0:100 0:000 CPU was calibrated with ACPI PM Timer 0:100 0:000 LegacyRegion2: Chipset/proc: 0x0A048086 0:100 0:000 Next Generation Core processors (PAM 0x80-0x86) 0:100 0:000 Test PAM1=(0x41=90, 0x5a=90, 0x81=11, 0x91=00) at chipset 0A048086 0:100 0:000 , Install = Success 0:112 0:012 BiosVideoDriverBindingStart! 0:112 0:000 BiosVideoCheckForVbe 0:112 0:000 EdidOverride not found 0:121 0:009 Edid1+ 0:121 0:000 found Detail Timing 1920x1080 0:121 0:000 timing string after 0xFE:AUO 0:121 0:000 timing string after 0xFE:B156HAN01.2 0:122 0:000 0 1280x1024 attr=9B - ok, edid- 0:122 0:000 1 1024x768 attr=9B - ok, edid-, 1024x768, working, highest, pref=1 0:122 0:000 2 640x480 attr=9B - ok, edid-, 640x480, working 0:122 0:000 3 800x600 attr=9B - ok, edid-, 800x600, working 0:123 0:000 4 1920x1080 attr=9B - ok, edid+, working, highest, pref=4 0:123 0:000 BV new mode: 4 1920x1080 0:398 0:275 SetMode pref 4 (4) = Success 0:892 0:493 VGA Pci.Hdr.Command=6 - not enabled 2:623 1:731 2:623 0:000 Now is 21.02.2020, 13:03:21 (GMT) 2:623 0:000 Starting Clover revision: 5103 (master, commit 3f3b85da0) on CLOVER EFI 2:623 0:000 Build with: [Args: -D NO_GRUB_DRIVERS_EMBEDDED -t GCC53 | -D NO_GRUB_DRIVERS_EMBEDDED --conf=/Users/sergey/src/CloverHackyColor/Conf -D USE_LOW_EBDA -a X64 -b RELEASE -t GCC53 -n 5 | OS: 10.14.6] 2:623 0:000 SelfDevicePath=PcieRoot(0x0)\Pci(0x1D,0x0)\USB(0x0,0x0)\USB(0x4,0x0)\HD(1,MBR,0x04944021,0x3F,0x3BC1042) @940C9698 2:623 0:000 SelfDirPath = \EFI\CLOVER 2:623 0:000 SimpleTextEx Status=Success 2:623 0:000 === [ Get Smbios ] ======================================== 2:623 0:000 Type 16 Index = 0 2:623 0:000 Total Memory Slots Count = 2 2:623 0:000 Type 17 Index = 0 2:623 0:000 SmbiosTable.Type17->Speed = 1600MHz 2:623 0:000 SmbiosTable.Type17->Size = 4096MB 2:623 0:000 SmbiosTable.Type17->Bank/Device = BANK 0 DIMM0 2:623 0:000 SmbiosTable.Type17->Vendor = Hynix 2:623 0:000 SmbiosTable.Type17->SerialNumber = 00000000 2:623 0:000 SmbiosTable.Type17->PartNumber = HMT451S6MFR6A-PB 2:623 0:000 Type 17 Index = 1 2:623 0:000 SmbiosTable.Type17->Speed = 1600MHz 2:623 0:000 SmbiosTable.Type17->Size = 8192MB 2:623 0:000 SmbiosTable.Type17->Bank/Device = BANK 2 DIMM1 2:623 0:000 SmbiosTable.Type17->Vendor = Kingston 2:623 0:000 SmbiosTable.Type17->SerialNumber = 5A060A8A 2:623 0:000 SmbiosTable.Type17->PartNumber = KHX1600C9S3L/8G 2:623 0:000 Boot status=0 2:623 0:000 Running on: 'Aspire V5-573G' with board 'Dazzle_HW' 2:623 0:000 === [ GetCPUProperties ] ================================== 2:623 0:000 CPU Vendor = 756E6547 Model=40651 2:623 0:000 The CPU supported SSE4.1 2:623 0:000 BrandString = Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz 2:623 0:000 The CPU supported turbo 2:623 0:000 MSR 0x35 20004 2:623 0:000 MSR 0xE2 before patch 1E008405 2:623 0:000 MSR 0xE2 is locked, PM patches will be turned on 2:623 0:000 MSR 0xCE 0008083D_F3011800 2:623 0:000 corrected FLEX_RATIO = 0 2:623 0:000 MSR 0x1B0 00000000 2:623 0:000 FSBFrequency = 71 MHz, DMI FSBFrequency = 100 MHz, Corrected FSBFrequency = 100 MHz 2:623 0:000 MaxDiv/MinDiv: 24.0/8 2:623 0:000 Turbo: 27/27/27/30 2:623 0:000 Features: 0xBFEBFBFF 2:623 0:000 Threads: 4 2:623 0:000 Cores: 2 2:623 0:000 FSB: 100 MHz 2:623 0:000 CPU: 1700 MHz 2:623 0:000 TSC: 1700 MHz 2:623 0:000 PIS: 100 MHz 2:623 0:000 ExternalClock: 25 MHz 2:623 0:000 === [ GetDevices ] ======================================== 2:623 0:000 GOP found at: PcieRoot(0x0)/Pci(0x2,0x0)/AcpiAdr(0x80010100) 2:623 0:000 PCI (00|00:00.00) : 8086 0A04 class=060000 2:623 0:000 PCI (00|00:02.00) : 8086 0A16 class=030000 2:623 0:000 - GOP: Provided by device 2:623 0:000 - GFX: Model=Intel HD Graphics 4400 (Intel) 2:623 0:000 PCI (00|00:03.00) : 8086 0A0C class=040300 2:623 0:000 PCI (00|00:14.00) : 8086 9C31 class=0C0330 2:623 0:000 PCI (00|00:16.00) : 8086 9C3A class=078000 2:623 0:000 PCI (00|00:1B.00) : 8086 9C20 class=040300 2:623 0:000 PCI (00|00:1C.00) : 8086 9C10 class=060400 2:623 0:000 PCI (00|00:1C.02) : 8086 9C14 class=060400 2:623 0:000 PCI (00|04:00.00) : 168C 0034 class=028000 2:623 0:000 - WIFI: Vendor=Atheros 2:623 0:000 PCI (00|00:1C.03) : 8086 9C16 class=060400 2:623 0:000 PCI (00|05:00.00) : 10EC 5287 class=FF0000 2:623 0:000 PCI (00|05:00.01) : 10EC 8168 class=020000 2:623 0:000 - LAN: 0 Vendor=Realtek 2:623 0:000 PCI (00|00:1C.04) : 8086 9C18 class=060400 2:624 0:000 PCI (00|01:00.00) : 10DE 0FE4 class=030200 2:624 0:000 PCI (00|00:1D.00) : 8086 9C26 class=0C0320 2:624 0:000 PCI (00|00:1F.00) : 8086 9C43 class=060100 2:624 0:000 PCI (00|00:1F.02) : 8086 9C03 class=010601 2:624 0:000 PCI (00|00:1F.03) : 8086 9C22 class=0C0500 2:624 0:000 === [ GetDefaultSettings ] ================================ 2:624 0:000 Clover load options size = 0 bytes 2:624 0:000 CheckOEMPathExists tried EFI\CLOVER\OEM\Aspire V5-573G--00-00-00-00-00-00. Dir not exists 2:624 0:000 CheckOEMPathExists tried EFI\CLOVER\OEM\Aspire V5-573G. Dir not exists 2:624 0:000 CheckOEMPathExists tried EFI\CLOVER\OEM\Aspire V5-573G-1700. Dir not exists 2:624 0:000 CheckOEMPathExists tried EFI\CLOVER\OEM\Dazzle_HW. Dir not exists 2:624 0:000 CheckOEMPathExists tried EFI\CLOVER\OEM\Dazzle_HW-1700. Dir not exists 2:624 0:000 set OEMPath by default: EFI\CLOVER 2:637 0:012 EFI\CLOVER\config.plist loaded: Success 2:637 0:000 === [ GetListOfThemes ] =================================== 2:637 0:000 === [ Found config plists ] =============================== 2:637 0:000 - config.plist 2:637 0:000 === [ GetEarlyUserSettings ] ============================== 2:637 0:000 timeout set to 0 2:637 0:000 Custom boot CUSTOM_BOOT_DISABLED (0x0) 2:637 0:000 Default theme: embedded 2:637 0:000 === [ LoadDrivers ] ======================================= 2:637 0:000 === [ InitScreen ] ======================================== 2:637 0:000 Console modes reported: 4, available modes: 2:637 0:000 - [01]: 80x25 2:637 0:000 - [02]: 80x50 2:637 0:000 - [03]: 100x31 2:637 0:000 - [04]: 240x56 (current mode) 2:637 0:000 SetScreenResolution: 1920x1080 - already set 2:637 0:000 SetScreenResolution: 1920x1080 - already set 2:637 0:000 reinit: self device path=PcieRoot(0x0)\Pci(0x1D,0x0)\USB(0x0,0x0)\USB(0x4,0x0)\HD(1,MBR,0x04944021,0x3F,0x3BC1042) 2:637 0:000 === [ GetMacAddress ] ===================================== 2:637 0:000 === [ ScanSPD ] =========================================== 2:637 0:000 Scanning SMBus [8086:9C22], mmio: 0xB3619004, ioport: 0x5040, hostc: 0x1 2:656 0:018 Slot: 2 Type 24 8192MB 1600MHz Vendor=Kingston PartNo=KHX1600C9S3L8G SerialNo=050A0006000A080A 2:657 0:000 === [ GetAcpiTablesList ] ================================= 2:657 0:000 Get Acpi Tables List from RSDT: 2:657 0:000 - [00]: FACP ACRPRDCT len=268 2:657 0:000 - [01]: UEFI ACRPRDCT len=566 2:657 0:000 - [02]: FPDT ACRPRDCT len=68 2:657 0:000 - [03]: ASF! ACRPRDCT len=165 2:657 0:000 - [04]: HPET ACRPRDCT len=56 2:657 0:000 - [05]: APIC ACRPRDCT len=140 2:657 0:000 - [06]: MCFG ACRPRDCT len=60 2:657 0:000 - [07]: BOOT ACRPRDCT len=40 2:657 0:000 - [08]: LPIT ACRPRDCT len=148 2:657 0:000 - [09]: ASPT ACRPRDCT len=52 2:657 0:000 - [10]: DBGP ACRPRDCT len=52 2:657 0:000 - [11]: SSDT ACRPRDCT len=1337 2:657 0:000 - [12]: SSDT ACRPRDCT len=2776 2:657 0:000 - [13]: SSDT ACRPRDCT len=12013 2:657 0:000 - [14]: SSDT ACRPRDCT len=11433 2:657 0:000 - [15]: SSDT ACRPRDCT len=2230 2:657 0:000 Calibrated TSC Frequency = 2394459554 = 2394MHz 2:657 0:000 === [ GetUserSettings ] =================================== 2:657 0:000 === [ Found DSDT tables ] ================================= 2:657 0:000 === [ ScanVolumes ] ======================================= 2:657 0:000 Found 8 volumes with blockIO 2:657 0:000 - [00]: Volume: PcieRoot(0x0)\Pci(0x1F,0x2)\Sata(0x0,0x0,0x0) 2:659 0:001 Result of bootcode detection: bootable Linux (grub,linux) 2:659 0:000 - [01]: Volume: PcieRoot(0x0)\Pci(0x1F,0x2)\Sata(0x1,0x0,0x0) 2:660 0:001 Result of bootcode detection: bootable unknown (legacy) 2:660 0:000 - [02]: Volume: PcieRoot(0x0)\Pci(0x1F,0x2)\Sata(0x0,0x0,0x0)\HD(1,GPT,8017BD66-1E24-4B31-8E09-BC49BECD6CC4,0x800,0x21330000) 2:661 0:001 Result of bootcode detection: bootable Windows (vista,win) 2:661 0:000 - [03]: Volume: PcieRoot(0x0)\Pci(0x1F,0x2)\Sata(0x0,0x0,0x0)\HD(2,GPT,82F3B738-65E9-458E-B2F1-BB55D4F00885,0x21331000,0x3D0800) 2:663 0:001 - [04]: Volume: PcieRoot(0x0)\Pci(0x1F,0x2)\Sata(0x0,0x0,0x0)\HD(3,GPT,E701DCD8-E3C5-4BFA-B61B-BFF4D80153FD,0x21701800,0x18C4F000) 2:664 0:001 - [05]: Volume: PcieRoot(0x0)\Pci(0x1F,0x2)\Sata(0x0,0x0,0x0)\HD(4,GPT,4DB1239A-A9D7-4045-A162-7EF1B3A5913B,0x3A350C21,0x3A3B616E) 2:665 0:001 Result of bootcode detection: bootable Windows (vista,win) 2:665 0:000 - [06]: Volume: PcieRoot(0x0)\Pci(0x1D,0x0)\USB(0x0,0x0)\USB(0x4,0x0) 2:677 0:011 Result of bootcode detection: bootable unknown (legacy) 2:677 0:000 USB volume 2:677 0:000 USB volume 2:677 0:000 - [07]: Volume: PcieRoot(0x0)\Pci(0x1D,0x0)\USB(0x0,0x0)\USB(0x4,0x0)\HD(1,MBR,0x04944021,0x3F,0x3BC1042) 2:688 0:011 Result of bootcode detection: bootable unknown (legacy) 2:688 0:000 USB volume 2:688 0:000 USB volume 2:688 0:000 This is SelfVolume !! 2:688 0:000 PutNvramPlistToRtVars: nvram.plist not found 2:689 0:000 No AudioIoProtocols, status=Not Found 2:689 0:000 === [ InitTheme ] ========================================= 2:689 0:000 use daylight theme 2:689 0:000 using embedded theme 2:689 0:000 got embedded sound 2:689 0:000 Channels: 2 Sample rate: 8000 Hz Bits: 16 2:689 0:000 output to channel 0 with volume 70, len=25600 2:689 0:000 sound channels=2 bits=16 freq=8000 2:689 0:000 sound converted to 48kHz 2:689 0:000 not found AudioIo to play 2:689 0:000 sound play end with status=Not Found 2:690 0:001 Using embedded font: Success 2:691 0:000 theme inited 2:691 0:000 Chosen embedded theme 2:691 0:000 after NVRAM boot-args= 2:691 0:000 === [ Dump SMC keys from NVRAM ] ========================== 2:691 0:000 no AppleSMC protocol 2:691 0:000 Entry scan disabled 2:691 0:000 === [ AddCustomTool ] ===================================== 2:692 0:000 === [ GetEfiBootDeviceFromNvram ] ========================= 2:692 0:000 Default boot entry not found 2:692 0:000 DefaultIndex=-1 and MainMenu.EntryCount=4 2:973 0:281 GUI ready  
    • By Jancey
      I used this command: diskutil info disk0s2 | grep -i "Partition UUID" | rev | cut -d' ' -f 1 | rev

      But I accidentally removed the wrong disk and now my main windows drive is not appearing in the bootloader. I can't figure out how to get it back. I tried resetting my windows drive, but I kept getting an error. I also reset my mac and reinstalled Catalina.
    • By gengstapo
      @Hervé
       
      Im having similar issue with my HS setup, dell latitute 3480, i5-7200U
      Once the hdmi plugged in, the laptop display went blank, only could see the external tv
      But, when i put my laptop to sleep & wake up again, both screen got display (hdmi still connected)
      Even the hdmi could be plugged off & in (after sleep), the laptop display is fine
       
      What could be the culprit?
      Dell’s MacBook Pro IORegistry.zip
      config.plist.zip
    • By TomZanna
      Hi, I'm trying to install Mac Os Catalina on a HP 550-132NL.
      The system has:
      i7-6700
      RAM 12 GB
      GT 730
      LAN Realtek RTL8161
      ALC3863
       
      It passes the verbose phase but after the Apple logo goes away, it gets stuck on a grey screen and I can only move the pointer.
      Can I try to boot with the iGPU?
       
      origin.zip
      CLOVER_dGPU_USB_3.zip
    • By kevin_1351
      tl;dr: VirtualSMC causes me a flood of log messages and correlated cpu spikes. FakeSMC doesn't.
       
      Hi, I have almost finalized my Huawei Matebook X Pro Opencore setup and everything is working very well besides wifi/bt ofc (which is about to change).
       
      However, I noticed how the cpu usage sometimes went up a little and when looking at the Console I could see a never-ending flood of:
      default 14:05:05.983292+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:05.982975+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:05.982996+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:06.985932+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:06.985949+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:06.986134+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:39.426574+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:39.426729+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:39.426585+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:41.431085+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:41.431097+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:41.431246+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:42.433068+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:42.433227+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:42.433078+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:43.434453+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:43.434465+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:43.434622+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:44.436155+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:44.436166+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0  
      As you can see, multiple of these per second. Another guy with the same computer is also having this issue and posted a dsdt change to fix it. This fix didn't solve anything though
      He tried to limit the Notify call by implementing a state change requirement before calling Notify.
       
      Here is the original acpi:
      Scope (_SB) { Device (LID) { Name (_HID, EisaId ("PNP0C0D") /* Lid Device */) // _HID: Hardware ID Method (_LID, 0, NotSerialized) // _LID: Lid Status { Local0 = One Local0 = ^^PCI0.LPCB.EC0.RPIN (0x05, 0x06) If ((Local0 == 0x55)) { Local0 = Zero } Else { Local0 = One } ^^PCI0.GFX0.CLID = Local0 Return (Local0) } } Device (PWRB) { Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */) // _HID: Hardware ID Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0B) } } } Scope (_SB.PCI0.LPCB.EC0) { Method (_Q81, 0, NotSerialized) // _Qxx: EC Query, xx=0x00-0xFF { Local0 = ^^^^LID._LID () If ((Local0 == Zero)) { ADBG ("LID-OFF") SGOV (0x02030009, Zero) SGOV (0x02060000, Zero) } Else { ADBG ("LID-ON") SGOV (0x02030009, One) SGOV (0x02060000, One) Notify (ALSD, 0x80) // Status Change } Notify (LID, 0x80) // Status Change } } Which he changed to: 
      Scope (_SB) { Device (LID) { Name (_OLD, One) // assuming everything else.. the lid should start open? Name (_HID, EisaId ("PNP0C0D") /* Lid Device */) // _HID: Hardware ID Method (_LID, 0, NotSerialized) // _LID: Lid Status { Local0 = One Local0 = ^^PCI0.LPCB.EC0.RPIN (0x05, 0x06) If ((Local0 == 0x55)) { Local0 = Zero } Else { Local0 = One } Return (Local0) } } Device (PNLF) { Name (_HID, EisaId ("APP0002")) // _HID: Hardware ID Name (_CID, "backlight") // _CID: Compatible ID Name (_UID, 0x0A) // _UID: Unique ID Name (_STA, 0x0B) // _STA: Status } Device (PWRB) { Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */) // _HID: Hardware ID Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0B) } } } Scope (_SB.PCI0.LPCB.EC0) { Method (_Q81, 0, NotSerialized) // _Qxx: EC Query, xx=0x00-0xFF { Local0 = ^^^^LID._LID () If ((Local0 == Zero)) { ADBG ("LID-OFF") SGOV (0x02030009, Zero) SGOV (0x02060000, Zero) } Else { ADBG ("LID-ON") SGOV (0x02030009, One) SGOV (0x02060000, One) Notify (ALSD, 0x80) // Status Change } If ((^^^^LID._OLD != Local0)) { Notify (LID, 0x80) // Status Change ^^^^LID._OLD = Local0 } } } Besides me not seeing any reason to declare _OLD in LID. The idea itself shouldn't be too bad right? Well, as I said, his fix didn't work.
       
      In fact, to prove that Method _Q81 doesn't have anything to do with the issue at all, I created a Clover/Opencore patch to change _Q81 to XQ81. This resulted in my lid not working at all of course, but the log flooding still persisted!
      So _Q81 doesn't have anything to do with the issue afaik.
       
      Now, further Google searches led me to a chinese post where he tied the issue to VirtualSMC. And indeed, by migrating to FakeSMC the issue is no more.
       
      Unfortunately, I'm very fond of VirtualSMC for various reasons. So I would very much like to keep it. If not I'd have to implement the old way of doing Battery monitoring etcetc. Which isn't very elegant and update proof as it requires DSDT patching.
       
      So, I do believe that the issue may very well be in the DSDT code, perhaps in the ambient light part. I'm not very skilled at this and just started studying the ACPI spec 3 days ago.
       
      Could someone please help me out? Thanks a lot in advance
       
       
      origin.zip
      OC.zip
×