Jump to content

RehabMan

Developers
  • Content count

    3,271
  • Joined

  • Last visited

  • Days Won

    14

RehabMan last won the day on December 16 2017

RehabMan had the most liked content!

2 Followers

About RehabMan

  • Rank
    InsanelyMacaholic

Profile Information

  • Gender
    Male
  • Location
    Bellingham, WA
  • Interests
    skiing, software, classic cars

Recent Profile Visitors

34,165 profile views
  1. RehabMan

    Clover Bug/Issue Report and Patch

    @Slice The commit for r4468 breaks the ACPI patcher. On my NUC, had to roll back to previously working Clover as it was not bootable with those changes you made. Here are my fixes: https://github.com/RehabMan/Clover/commit/d0507a6b352fb2c8f85da70836b1bac08ecf0cec NUC6i7KYK:Clover rehabman$ git diff rEFIt_UEFI/Platform/AcpiPatcher.c diff --git a/rEFIt_UEFI/Platform/AcpiPatcher.c b/rEFIt_UEFI/Platform/AcpiPatcher.c index f0b20eee..03535d04 100644 --- a/rEFIt_UEFI/Platform/AcpiPatcher.c +++ b/rEFIt_UEFI/Platform/AcpiPatcher.c @@ -487,8 +487,8 @@ VOID PatchAllTables() UINT32 Count = XsdtTableCount(); UINT64* Ptr = XsdtEntryPtrFromIndex(0); UINT64* EndPtr = XsdtEntryPtrFromIndex(Count); - BOOLEAN Patched = FALSE; for (; Ptr < EndPtr; Ptr++) { + BOOLEAN Patched = FALSE; EFI_ACPI_DESCRIPTION_HEADER* Table = (EFI_ACPI_DESCRIPTION_HEADER*)(UINTN)ReadUnaligned64(Ptr); if (!Table) { // skip NULL entry @@ -498,10 +498,6 @@ VOID PatchAllTables() // may be also EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE? continue; // will be patched elsewhere } - if (!CheckTableHeader(Table)) { - // header does not need patching - continue; - } if (IsXsdtEntryMerged(IndexFromXsdtEntryPtr(Ptr))) { // table header already patched continue; @@ -511,7 +507,7 @@ VOID PatchAllTables() EFI_PHYSICAL_ADDRESS BufferPtr = EFI_SYSTEM_TABLE_MAX_ADDRESS; EFI_STATUS Status = gBS->AllocatePages(AllocateMaxAddress, EfiACPIReclaimMemory, - EFI_SIZE_TO_PAGES(Len + 19), + EFI_SIZE_TO_PAGES(Len + 4096), &BufferPtr); if(EFI_ERROR(Status)) { //DBG(" ... not patched\n"); @@ -520,12 +516,12 @@ VOID PatchAllTables() EFI_ACPI_DESCRIPTION_HEADER* NewTable = (EFI_ACPI_DESCRIPTION_HEADER*)(UINTN)BufferPtr; CopyMem(NewTable, Table, Len); if ((gSettings.FixDsdt & FIX_HEADERS) || gSettings.FixHeaders) { - CopyMem(NewTable, Table, Len); - PatchTableHeader(NewTable); - Patched = TRUE; + if (CheckTableHeader(NewTable)) { + PatchTableHeader(NewTable); + Patched = TRUE; + } } if (NewTable->Signature == EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) { - CopyMem(NewTable, Table, Len); if (gSettings.PatchDsdtNum > 0) { //DBG("Patching SSDT:\n"); UINT32 i; @@ -548,20 +544,24 @@ VOID PatchAllTables() NewTable->Length = Len; RenameDevices((UINT8*)NewTable); GetBiosRegions((UINT8*)NewTable); //take Regions from SSDT even if they will be dropped - Patched = TRUE;; + Patched = TRUE; } if (NewTable->Signature == MCFG_SIGN && gSettings.FixMCFG) { INTN Len1 = ((Len + 4 - 1) / 16 + 1) * 16 - 4; - CopyMem(NewTable, Table, Len1); //Len increased but less then EFI_PAGE + CopyMem(NewTable, Table, Len1); //Len increased but less than EFI_PAGE NewTable->Length = Len1; Patched = TRUE; } if (Patched) { + // in case we need to free it, keep track of table size + SaveMergedXsdtEntrySize(IndexFromXsdtEntryPtr(Ptr), Len + 4096); + + // write patched table pointer into the XSDT WriteUnaligned64(Ptr, BufferPtr); FixChecksum(NewTable); } else { - gBS->FreePages(BufferPtr, EFI_SIZE_TO_PAGES(Len + 19)); + gBS->FreePages(BufferPtr, EFI_SIZE_TO_PAGES(Len + 4096)); } } }
  2. RehabMan

    intel hades canyon nuc nuc8i7hvk

    If you wanted to spoof 0x15dd, you would set RM,device-id = <dd150000> What you have there is a 0x69a0 spoof, but matching on 0x15dd or 0x694e.
  3. RehabMan

    intel hades canyon nuc nuc8i7hvk

    Your RM,device-id data is wrong. You wanted 0x69af, right? In Intel byte order, it would be <af690000> (32-bit, byte reversed/little endian). Also, if you're injecting fake device-id 0x69af, you'll need an IOPCIPrimaryMatch for 0x69af10002.
  4. RehabMan

    intel hades canyon nuc nuc8i7hvk

    Just putting my reply outside the quote... Inject FakeID 0x69aX (X=0|1|2|3|f) and have FakePCIID match against whichever id you're testing, and setting RM,device-id to the same. This new site software is complete garbage. This site has become very frustrating to use.
  5. RehabMan

    intel hades canyon nuc nuc8i7hvk

    Your intention is to spoof 1002:694e and 1002:15dd as 1002:a069? (second one as 1002:af69)? Why multiple PCI matches? You have not determined what the native ID actually is? Note that if you're injecting a fake device-id (to get the system kext to even load), you will need to have the FakePCIID injector match against that ID as well. I assume you're injecting fake device-id 0x694e or 0x15dd.
  6. RehabMan

    intel hades canyon nuc nuc8i7hvk

    Use a plist editor such as Xcode... then you won't need to mess with base64. You should be able to match just on device/vendor-id. Look at how the Apple provided AMD graphics kexts match and go from there.
  7. RehabMan

    intel hades canyon nuc nuc8i7hvk

    Look at the examples in the repo... You can see how FakePCIID_Intel_HD_Graphics.kext works just by looking at the Info.plist in Xcode.
  8. RehabMan

    Clover General discussion

    Dangerous advice there... Using the drop/add method causes SSDTs to be re-ordered. And SSDTs can be order dependent. Better to set config.plist/ACPI/AutoMerge=true, then name SSDTs in ACPI/patched with the same name they had from ACPI/origin. The AutoMerge feature will take care of replacing the SSDT in its original index, preserving the original order.
  9. RehabMan

    intel hades canyon nuc nuc8i7hvk

    FakePCIID.kext (and appropriate injector) can be used to spoof PCI IDs if needed...
  10. There are two "expected" md5 values... one prior to patching, and one after patching (note that if the pre-patch one matches, the post-patch always will match, unless I made some sort of mistake in the plist). HackrNVMeFamily spoofing has nothing to do with NVMe power management.
  11. The log you provided clearly shows no mismatch. In fact, it says "matches expected MD5". Why do you think there is a mismatch?
  12. You should run patch_nvme.sh with no parameters... (only --spoof). This will let it pick the correct plist for patching.
  13. RehabMan

    AptioMemoryFix

    R16 is latest as of today: NUC6i7KYK:aptiofix.git rehabman$ git pull Already up to date. NUC6i7KYK:aptiofix.git rehabman$ grep REVISION Include/Protocol/AptioMemoryFixProtocol.h #define APTIOMEMORYFIX_PROTOCOL_REVISION 16
  14. Note that I commented out the class-code spoof part, and just left the built-in inject. DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0) { External(_SB.PCI0, DeviceObj) // create identities for the bridge @1b and SSD0 @0 Device(_SB.PCI0.BR1B) { Name(_ADR, 0x001b0000) // corresponds to #PCI(1B00), MSW byte reversed Device(SSD0) { Name(_ADR, 0) } // corresponds to #PCI(0000) } // now we can inject the _DSM at the newly created ACPI path Method(_SB.PCI0.BR1B.SSD0._DSM, 4) { If (!Arg2) { Return (Buffer() { 0x03 } ) } Return(Package() { //"class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 }, "built-in", Buffer() { 0 }, }) } } //EOF
  15. RehabMan

    Clover General discussion

    Why not just leave it there? It does no harm when booting a macOS/OS X that doesn't need it (eg. ML and later). Yeah... I know. The commit comment makes more sense for the other change that was part of the same commit, which does have something to do with some CPU related stuff. In this case, I had no idea what file the change might have happened in. In fact, initially I didn't understand that the Clover installer was removing a file, and then older versions were adding it back. Not until I started using diff to compare EFI/Clover from working vs. non-working did I discover the difference in the drivers64UEFI content... Given I didn't know where the change was, just that it was broken between r4369 and r4380 (those two builds were on sourceforge), I was looking at the commit log for meaningful commit comments...
×