Jump to content

RehabMan

Developers
  • Content count

    3,301
  • Joined

  • Last visited

  • Days Won

    14

RehabMan last won the day on December 16 2017

RehabMan had the most liked content!

About RehabMan

  • Rank
    InsanelyMacaholic

Profile Information

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

Recent Profile Visitors

35,991 profile views
  1. RehabMan

    Clover Problems and Solutions

    Hmm... When I build AppleSupportPkg from acidanthera current sources (on github), I still end up with ApfsDriverLoad.efi and AppleImageLoader.efi in UDK/Build/RELEASE_XCODE5 (and AppleUiSupport.efi... UsbKbDxe.efi too)
  2. RehabMan

    Clover Problems and Solutions

    Seems there is a problem with current sourceforge Clover build. For example, you have ApfsDriverLoader,-64 but no AppleImageLoader-64. My understanding is that ApfsDriverLoader requires AppleImageLoader.
  3. RehabMan

    Clover Problems and Solutions

    Any of the methods for injecting properties can be mixed provided they are not injecting onto the same device. So, you can use AddProperties to inject on Nvidia + AMD, Devices/Audio/Inject to inject audio, Devices/Properties to inject USB, and then Graphics/Inject/Intel=true to inject IGPU properties. As long as each is separate, it works (note that there is hard-coded conflicts/priority between AddProperties and Arbitrary). But if you try to inject on a given device two or more different ways, only the first way wins (this is especially true if you inject to multiple devices via Devices/Properties... there are exceptions to my rules when you only inject to a single device, and probably even an exception if you end on the device that you plan further injections down the line) because of the quirky way devprop_addvalue works. It is a complete mess. I have it in mind to fix devprop_add_device_pci/devprop_addvalue such that it is a bit smarter, which would allow a much more sensible/less complex result (eg. inject via any method, on any device, and it works). But haven't really looked into it to see how much work it would be nor the backward compatibility issues that might arise.
  4. RehabMan

    Clover Problems and Solutions

    Bug found. Actually thought of the bug on my daily run. Case of full edid specified in Devices/Properties with with Graphics/EDID/Inject=false, no injection happens. Change is this: NUC6i7KYK:Clover rehabman$ git diff diff --git a/rEFIt_UEFI/Platform/Settings.c b/rEFIt_UEFI/Platform/Settings.c index 8c66fd2b..820d5960 100644 --- a/rEFIt_UEFI/Platform/Settings.c +++ b/rEFIt_UEFI/Platform/Settings.c @@ -6988,12 +6988,11 @@ SetDevices (LOADER_ENTRY *Entry) } devprop_add_value(device, Prop2->Key, (UINT8*)&gSettings.IgPlatform, 4); DBG(" Add key=%a valuelen=%d\n", Prop2->Key, Prop2->ValueLen); - } else if (AsciiStrStr(Prop2->Key, "override-no-edid") || AsciiStrStr(Prop2->Key, "override-no-connect")) { + } else if ((AsciiStrStr(Prop2->Key, "override-no-edid") || AsciiStrStr(Prop2->Key, "override-no-connect")) + && gSettings.InjectEDID && gSettings.CustomEDID) { // special case for EDID properties - if (gSettings.InjectEDID && gSettings.CustomEDID) { - devprop_add_value(device, Prop2->Key, gSettings.CustomEDID, 128); - DBG(" Add key=%a from custom EDID\n", Prop2->Key); - } + devprop_add_value(device, Prop2->Key, gSettings.CustomEDID, 128); + DBG(" Add key=%a from custom EDID\n", Prop2->Key); } else { // normal properties, ... devprop_add_value(device, Prop2->Key, (UINT8*)Prop2->Value, Prop2->ValueLen);
  5. RehabMan

    Clover Problems and Solutions

    With the move to WhateverGreen.kext and doing most injections manually (graphics, and usually audio) via config.plist/Devices/Properties, it is unfortunate that the settings in config.plist/Graphics/EDID no longer apply. This commit fixes this problem, similar to how the workaround for AAPL,ig-platform-id and AAPL,snb-platform-id work: https://github.com/RehabMan/Clover/commit/093095541f28e6ff0a4c420a274b58a88b004c26 Basically, it fixes up any properties with "override-no-edid" or "override-no-connect" with the custom EDID if specified with Graphics/EDID/Inject=true (and other applicable EDID settings from that section). Note: There is no need to actually specify any EDID in your Devices/Properties/PciRoot(0)/Pci(0x02,0), but the property must be there. Eg. AAPL00,overrride-no-connect=<> As it looks in Xcode:
  6. SATA is in RAID (iRST) mode. Note 8086:282a in misc/preboot.log: 0:122 0:000 === [ GetDevices ] ======================================== ... 0:122 0:000 PCI (00|00:1F.02) : 8086 282A class=010400 SATA-RAID-unsupported.kext should take care of your booting problem. We are now typically using AptioMemoryFix-64.efi instead of OsxAptioFix*.efi. Also, ApfsDriverLoader-64.efi+AppleImageLoader-64.efi instead of apfs.efi.
  7. Attach full PR files as per Envy guide. Use your USB to boot if needed. Note: If your SATA mode is fixed as RAID (iRST), we can simply add SATA-unsupported.kext. FYI: Added SATA-RAID-unsupported.kext to repo/install_downloads.sh just in case.
  8. RehabMan

    Clover Problems and Solutions

    @Sherlocks Thanks for commit r4694!
  9. RehabMan

    Clover Problems and Solutions

    Now would be a good time to commit my suggested change (previous post in this thread) to kext_patcher.c to handle InjectKexts="Detect" properly when VirtualSMC.kext is used. VOID CheckForFakeSMC(CHAR8 *InfoPlist, LOADER_ENTRY *Entry) { if (OSFLAG_ISSET(Entry->Flags, OSFLAG_CHECKFAKESMC) && OSFLAG_ISSET(Entry->Flags, OSFLAG_WITHKEXTS)) { if (AsciiStrStr(InfoPlist, "<string>org.netkas.driver.FakeSMC</string>") != NULL || AsciiStrStr(InfoPlist, "<string>org.netkas.FakeSMC</string>") != NULL || AsciiStrStr(InfoPlist, "<string>as.vit9696.VirtualSMC</string>") != NULL) { Entry->Flags = OSFLAG_UNSET(Entry->Flags, OSFLAG_WITHKEXTS); if (Entry->KernelAndKextPatches->KPDebug) { DBG_RT(Entry, "\nFakeSMC or VirtualSMC found, UNSET WITHKEXTS\n"); gBS->Stall(5000000); } } } }
  10. RehabMan

    Clover Problems and Solutions

    My comments apply to the current AcpiPatcher.c on sourceforge, r4687. If you look at the current code, you will see the exact bugs I described.
  11. RehabMan

    Clover Problems and Solutions

    Your guess is a good one, as Find/Replace via config.plist/ACPI/DSDT/Patches is much more complex than a simple binary find/replace. The code does actually make an attempt to deal with mismatched find/replace lengths. The extra complexity (and likely resulting bugs) is why I avoid such mismatched length patching.
  12. RehabMan

    Clover Problems and Solutions

    You need to study the ACPI patching code a bit more.
  13. RehabMan

    Clover Problems and Solutions

    Not enough. Personally, I don't use Find/Replace where Replace is larger than Find. But as an example, if you had a find/replace where Replace was larger than Find by 4 bytes, it would only take 5 matches to overrun the buffer.
  14. RehabMan

    Clover Problems and Solutions

    The AcpiPatcher.c in svn has two problems: - function PatchAllTables, initialization of Patched is misplaced (init inside loop, not outside) - function PatchAllTables, should be using Len + 4096 not Len + 19 (for case of patches that Replace is larger than Find) So, this code in my version of AcpiPatcher.c: VOID PatchAllTables() { UINT32 Count = XsdtTableCount(); UINT64* Ptr = XsdtEntryPtrFromIndex(0); UINT64* EndPtr = XsdtEntryPtrFromIndex(Count); for (; Ptr < EndPtr; Ptr++) { BOOLEAN Patched = FALSE; ... Should replace the code in svn: VOID PatchAllTables() { UINT32 Count = XsdtTableCount(); UINT64* Ptr = XsdtEntryPtrFromIndex(0); UINT64* EndPtr = XsdtEntryPtrFromIndex(Count); BOOLEAN Patched = FALSE; for (; Ptr < EndPtr; Ptr++) { ... If you really prefer declaring all locals at the top of the function (a bad habit, IMHO), you must do so without changing the logic: VOID PatchAllTables() { UINT32 Count = XsdtTableCount(); UINT64* Ptr = XsdtEntryPtrFromIndex(0); UINT64* EndPtr = XsdtEntryPtrFromIndex(Count); BOOLEAN Patched; for (; Ptr < EndPtr; Ptr++) { Patched = FALSE; ... And then related to the memory allocation +19 vs. +4096: This: EFI_STATUS Status = gBS->AllocatePages(AllocateMaxAddress, EfiACPIReclaimMemory, EFI_SIZE_TO_PAGES(Len + 4096), &BufferPtr); Instead of this: EFI_STATUS Status = gBS->AllocatePages(AllocateMaxAddress, EfiACPIReclaimMemory, EFI_SIZE_TO_PAGES(Len + 19), &BufferPtr); And this: gBS->FreePages(BufferPtr, EFI_SIZE_TO_PAGES(Len + 4096)); Instead of this: gBS->FreePages(BufferPtr, EFI_SIZE_TO_PAGES(Len + 19));
×