** Hackintosh ** Tips to make a bare metal MacOS


Recommended Posts

Reading some web pages around about AppleBusPowerController: it seems that from mac os Sierra some properties related to current and usb are injected in AppleBusPowerController.

From my ioreg I couldn't see AppleBusPowerController loaded so I created SSDT-EC-USBX.aml and put it in CLOVER/acpi/patched folder.

Source of SSDT-EC-USBX is:
 

DefinitionBlock("", "SSDT", 2, "hack", "EC-USBX", 0)
{
    Device(_SB.EC)
    {
        Name(_HID, "EC000000")
    }
    Device(_SB.USBX)
    {
        Name(_ADR, 0)
        Method (_DSM, 4)
        {
            If (!Arg2) { Return (Buffer() { 0x03 } ) }
            Return (Package()
            {
                // these values from iMac17,1
                "kUSBSleepPortCurrentLimit", 2100,
                "kUSBSleepPowerSupply", 5100,
                "kUSBWakePortCurrentLimit", 2100,
                "kUSBWakePowerSupply", 5100,
            })
        }
    }
}

This code is from RehabMan who says that EC and USBX must be injected in ioreg.

However, here:

https://olarila.com/forum/viewtopic.php?t=11144

Ewerd is saying that:

"AppleBusPowerController.kext has changed in Catalina, it no longer matches to EC.

The upshot of this has been that I don't need EC or USBX to get USB power. I've added a section for AppleBusPowerController to the top of my SSDT-UIAC:"

DefinitionBlock ("", "SSDT", 2, "hack", "_UIAC", 0)
{
    Device(UIAC)
    {
        Name(_HID, "UIA00000")

        Name(RMCF, Package()
        {
            "AppleBusPowerController", Package()
            {
                "kUSBSleepPortCurrentLimit", 
                0x0834, 
                "kUSBSleepPowerSupply", 
                0x125C, 
                "kUSBWakePortCurrentLimit", 
                0x0834, 
                "kUSBWakePowerSupply", 
                0x125C   
            },

 

But from ioreg it seems that EC and USBX are loaded and AppleBusPowerController is loaded too, so I should be ok..Am I right?

 

EC:

EC.thumb.png.1dbb6c8fedd709513b736d43e387b8d6.png

 

USBX:

USBX.thumb.png.57e3c4254b82b44a2bf896bf5066915b.png

 

AppleBusPowerController:

AppleBusPowerController.thumb.png.2be269f35d8668420b0c8f5302e2d361.png

SSDT-EC-USBX.aml SSDT-EC-USBX.dsl

Edited by ghost82
Link to comment
22 hours ago, glennv said:

What is the function/purpose of the USBPower kext

I'm not able to see the source inside the attached kext, but from other references online I would say that inside this kext there are the references to the usb ports you are using --> this kext injects some of the usb ports (only the ports you are using) because of the port limit number.

It should have the template of the usbinjectall kext, without injecting all the ports.

Edited by ghost82
Link to comment
19 minutes ago, glennv said:

ah cool. tnx. I am already using the usbinjectall so guess i dont need that. Was just curious.

Just for completeness: UsbInjectAll kext should be used only temporarly: what it does is to inject all the usb ports; if coupled with the port-limit patch you can then map your ports and understand what ports you are using, so to create an SSDT patch to limit to the ports you are using.

It is wrong to apply the port limit patch and use UsbInjectAll, it can cause problems (it causes access outside a fixed array bounds).

Link to comment

Ah, did not realise that. Never learned how to do SSDT patching as never needed it. Had issue with a passedthru USB3 devices only working at USB2 speed . Did lots of things and it started working when i just dropped this kext in the mix. So never looked back . May revisit this at some point but hackintosh lessons from the past say, if it works, dont touch it ;-) 

Edited by glennv
Link to comment
On 11/15/2019 at 1:22 AM, ghost82 said:

But from ioreg it seems that EC and USBX are loaded and AppleBusPowerController is loaded too, so I should be ok..Am I right?

Yeah, if it loaded with some kUSBPower attributes then you don't need the kext.

The USBPower.kext only works in catalina for those have problem with usb power such as phone/iphone charging(you can find some usb power errors in your log), you don't need UIAC SSDT or USBX.kext(but it seems that your controller works OOB) . 

 

And the USBPorts.kext is the mapping for my X570 onboard USB, you have to make it for your own.May be cosmic maybe not, I'm not quite sure now.

Link to comment

Hi all,

I'm trying to understand more about usb in mac os/unraid.

I know that in mac os (starting from 10.11?) there is a 15 ports limit: however, I cannot find anywhere if this 15-ports-limit refers to the total number of usb ports or to the total number of ports for each controller?

This is my setup:

1- EHCI controller in Unraid, used to passthrough single USB devices (USB 2.0) --> HD pro webcam c920 always attached, in the attached picture there's also a mass storage device attached

2- UHCI controller in Unraid, used to passthrough the usb dongle of my microsoft desktop wireless 800 for keyboard/mouse (USB 1.1): always attached (P.S.: I was thinking it was usb 2.0, apparently not...)

3- Fresco logic FL1100 controller (USB 3.0 and USB 2.0): in this case the whole controller is passed through

 

usb.png.d963171a4b11273f4691fe307283d98e.png

 

Total number of ports is 16, so if the 15-ports-limit is referred to total I'm not ok, if it's referred to total for each controller I'm ok..I think (and I hope) that the port limit is referred to each controller..

From all the videos I saw the problem was that not all the ports were listed under the XHC tree (on real hackintosh, not emulated), because of this limit, but since we have different bridges for different controllers it should not be a problem for us (qemu ehci controller has 6 ports, qemu uhci controller has 2 ports, so each controller is always below the limit).

 

By the way, in unraid the code:

    <qemu:arg value='-usb'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='usb-mouse,bus=usb-bus.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='usb-kbd,bus=usb-bus.0'/>

adds a qemu mouse and a qemu keyboard: I deleted it from my template, but for what purpose is it used?Maybe related to override of PS/2 mouse/keyboard?

Edited by ghost82
Link to comment

hey all,

 

ive got a catalina vm running  but having trouble passing through a usb controller, i understand i need to rename EHC1->EH01 and EHC2->EH02, which i have done via clover configuration ACHI patches and i have copied injectallusb.kext and applied the patches following this guide https://hackintosher.com/forums/thread/list-of-hackintosh-usb-port-limit-patches-10-15-updated.467/

 

But when i reboot i get no usb ability? checking the system report on the mac i see no change when plugging in devices either.

 

i have a Gigabyte X79-UP4 if that helps. i can passthrough individual devices fine, but thats a pain haha

 

Do you have any suggestions on anything i may be missing or doing wrong?

 

Thanks in advance!

Link to comment
16 minutes ago, phyzical said:

i understand i need to rename EHC1->EH01 and EHC2->EH02

Hi, I don't think so, vm is different from a real hackintosh, and most probably if you look at your ioreg you will not see any EHC1 nor EHC2.

You should see usb ports into a bridge (for example, look at my image in my previous post for the Fresco logic controller, which is passed through).

I found some difficulties in making usb ports working in mac os: passing through is very easy, making usb ports to work in mac os is another story.

You could try the GenericUSBXHCI.kext : this was buggy for my setup (some kernel panic if usb device was attached to a usb port at boot, usb mass storage not mounted at first time when plugged in), so in the end I bought an Inateck pci card (chipset FL1100) for 19,90 Euro, 5 minutes to install it, no kexts, no headaches, no problems at all. With this setup I'm using 2 emulated controllers in Unraid with usb of my motherboard (UHCI for usb 1.1 and EHCI for usb 2.0) --> devices attached to these controllers are fixed (like webcam, mouse/keyboard dongle), and they do not need to be attached at every boot of the vm (this is achieved by saving the vm settings in xml view). The 4 ports of the Inateck are used for mass storage devices, usb token for digital signatures, usb external wifi.

Link to comment

Just to share some info if anyone has external usb wifi, such as alfa network awus devices.

I have a awus036nh usb wifi: at the time of writing, alfa network does not have any working driver for Catalina (10.15 and 10.15.1).

I found that this package works well and it's stable:

https://github.com/chris1111/WIFI-Dlink-Catalina-Panel-V2

 

It works for these chipsets:
RT3572,RT3072,RT3070,RT3573,MT7610,MT7610,MT7610, RT5370,RT2870,RT3071,RT2770,RT3573,RT5572,RT3573, RT3573,RT5572,RT3572

 

Mine is RT2870.

Edited by ghost82
Link to comment
On 11/17/2019 at 6:05 PM, ghost82 said:

Is the disable x86 cpu topology patch specific to AMD/Ryzen?

Cannot make it to work with intel cpu..

Not only AMD/Ryzen, but also Intels in a VM.

You can find the latest patch from AMD_Vanilla.

 

The behaviors in a VM is quite similar with AMD Vanilla, some patches is useful for us too(like we have wrong CPU package number when passthrough with topology).

I'm trying to get understand of those patches to find out which works for a VM.

  1. <algrey - cpu_topology_sort -disable _x86_validate_topology>: remove the topology check to get our QEMU/Libvirt topology work.
  2. <algrey - cpuid_set_cache_info - don't set cpuid_cores_per_package>: This seems needed by us too, we get wrong "packages count" if we set topology/passthrough of the cpu.But it may need some other patches.
  3. <algrey - cpuid_set_generic_info - disable check to allow leaf7>: use this patch you can get enhancement features(avx2, fmi and etc) works too for using Penryn
On 11/17/2019 at 10:48 PM, phyzical said:

ive got a catalina vm running  but having trouble passing through a usb controller, i understand i need to rename EHC1->EH01 and EHC2->EH02, which i have done via clover configuration ACHI patches and i have copied injectallusb.kext and applied the patches following this guide

I don't recommand to use InjectAllUSB.kext, using XHC USB Kext Creation Guideline instead like I did.

You can get a USBPorts.kext anywhere without InjectAllUSB.kext.

image.thumb.png.ce1a41a64a48211c782d503e58a7ba91.png

image.thumb.png.ff142cbf57aa16204b22a87c0d8e6ec2.png

On 11/17/2019 at 11:28 PM, ghost82 said:

I have a awus036nh usb wifi: at the time of writing, alfa network does not have any working driver for Catalina (10.15 and 10.15.1).

I found that this package works well and it's stable:

Is the handoff working with USB Wifi? I switched the onboard M.2 Wifi to get my handoff work. I don't want to use my only one pcie-1x to be a wifi card because I want to insert a USB controller card too. So if usb wifi works well with handoff, I'll give it a try.

Edited by Leoyzen
Link to comment

Finally, I switched from clover to opencore 0.5.2, as it seems it will be the bootloader of the future with more development.

I started from the qcow2 posted by @Leoyzen

I noticed faster boot and all is working quite good, and finally I'm able to load x86platformplugin (however, I have problems with loading p and c states, has anybody been able to properly inject c and p-states?) instead of acpi_smc_platformplugin.

Moreover I have also AGPM and AppleLPC, so for me it's better than clover.

 

I have a problem related to boot into recovery; at the boot screen I have 2 options: 1 to boot into mac os, 2 to boot into recovery.

If I choose 2, the vm freeze (I can monitor from unraid webui that one cpu is going to 100%): AvoidHighAlloc doesn't solve the problem.

Maybe related to this:

https://github.com/acidanthera/bugtracker/issues/389

 

But not solved for me.

 

EDIT: I suspect the problem is in the apfs driver, here my tests:

apfs.efi (from original catalina): able to boot mac os, not able to boot recovery (dmg)

ApfsDriverLoader.efi (from AppleSupport package v. 2.1.2): drives not seen, no mac os, no recovery

 

EDIT2: ApfsDriverLoader.efi from AppleSupport package 2.0.2 combined with AppleImageLoader.efi from AppleSupport package 2.0.2 is able to list both mac os and recovery drives. They are able to load mac os, not the recovery; when booting mac os it says AppleImageLoader is not AppleEfiFat, but it is able to load mac os.

Definetely a driver problem.

PS: newer version of ApfsDriverLoader.efi includes AppleImageLoader, but it doesn't work at all.

 

Another thing I can't get to work is (apparently) kexts injection for drives different than the primary mac os: if I try to boot from a usb I have no signal to the monitor and this make me think that lilu+weg are not injected properly; however for primary mac os partition they are injected, since I have no additional patches for video.

 

EDIT: maybe related to problem 1

 

 

Does your recovery work?

 

Here is my opencore config if it needs:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>ACPI</key>
	<dict>
		<key>Add</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>CPUS</string>
				<key>Enabled</key>
				<true/>
				<key>Path</key>
				<string>custom/SSDT-cpu.aml</string>
			</dict>
			<dict>
				<key>Comment</key>
				<string>EC and USBX injections</string>
				<key>Enabled</key>
				<true/>
				<key>Path</key>
				<string>custom/SSDT-EC-USBX.aml</string>
			</dict>
		</array>
		<key>Quirks</key>
		<dict>
			<key>FadtEnableReset</key>
			<false/>
			<key>NormalizeHeaders</key>
			<false/>
			<key>RebaseRegions</key>
			<false/>
			<key>ResetHwSig</key>
			<false/>
			<key>ResetLogoStatus</key>
			<false/>
		</dict>
	</dict>
	<key>Booter</key>
	<dict>
		<key>Quirks</key>
		<dict>
			<key>AvoidRuntimeDefrag</key>
			<true/>
			<key>DevirtualiseMmio</key>
			<false/>
			<key>DisableSingleUser</key>
			<false/>
			<key>DisableVariableWrite</key>
			<false/>
			<key>DiscardHibernateMap</key>
			<false/>
			<key>EnableSafeModeSlide</key>
			<true/>
			<key>EnableWriteUnprotector</key>
			<true/>
			<key>ForceExitBootServices</key>
			<false/>
			<key>ProtectCsmRegion</key>
			<false/>
			<key>ProvideCustomSlide</key>
			<false/>
			<key>SetupVirtualMap</key>
			<true/>
			<key>ShrinkMemoryMap</key>
			<false/>
		</dict>
	</dict>
	<key>DeviceProperties</key>
	<dict>
		<key>Add</key>
		<dict>
			<key>PciRoot(0x1)/Pci(0x2,0x0)</key>
			<dict>
				<key>layout-id</key>
				<data>
				BwAAAA==
				</data>
			</dict>
		</dict>
	</dict>
	<key>Kernel</key>
	<dict>
		<key>Add</key>
		<array>
			<dict>
				<key>BundlePath</key>
				<string>Lilu.kext</string>
				<key>Enabled</key>
				<true/>
				<key>ExecutablePath</key>
				<string>Contents/MacOS/Lilu</string>
				<key>PlistPath</key>
				<string>Contents/Info.plist</string>
			</dict>
			<dict>
				<key>BundlePath</key>
				<string>AppleALC.kext</string>
				<key>Comment</key>
				<string>Audio</string>
				<key>Enabled</key>
				<true/>
				<key>ExecutablePath</key>
				<string>Contents/MacOS/AppleALC</string>
				<key>PlistPath</key>
				<string>Contents/Info.plist</string>
			</dict>
			<dict>
				<key>BundlePath</key>
				<string>WhateverGreen.kext</string>
				<key>Comment</key>
				<string>Video card</string>
				<key>Enabled</key>
				<true/>
				<key>ExecutablePath</key>
				<string>Contents/MacOS/WhateverGreen</string>
				<key>PlistPath</key>
				<string>Contents/Info.plist</string>
			</dict>
			<dict>
				<key>BundlePath</key>
				<string>AppleMCEReporterDisabler.kext</string>
				<key>Enabled</key>
				<true/>
				<key>PlistPath</key>
				<string>Contents/Info.plist</string>
			</dict>
			<dict>
				<key>BundlePath</key>
				<string>AGPMInjector.kext</string>
				<key>Comment</key>
				<string>AGPM</string>
				<key>Enabled</key>
				<true/>
				<key>MatchKernel</key>
				<string></string>
				<key>PlistPath</key>
				<string>Contents/Info.plist</string>
			</dict>
		</array>
		<key>Block</key>
		<array>
			<dict>
				<key>Enabled</key>
				<false/>
				<key>Identifier</key>
				<string>com.apple.driver.AppleTyMCEDriver</string>
				<key>MatchKernel</key>
				<string></string>
			</dict>
		</array>
		<key>Quirks</key>
		<dict>
			<key>AppleCpuPmCfgLock</key>
			<false/>
			<key>AppleXcpmCfgLock</key>
			<false/>
			<key>AppleXcpmExtraMsrs</key>
			<false/>
			<key>CustomSMBIOSGuid</key>
			<false/>
			<key>DisableIoMapper</key>
			<false/>
			<key>ExternalDiskIcons</key>
			<false/>
			<key>LapicKernelPanic</key>
			<false/>
			<key>PanicNoKextDump</key>
			<true/>
			<key>PowerTimeoutKernelPanic</key>
			<false/>
			<key>ThirdPartyTrim</key>
			<false/>
			<key>XhciPortLimit</key>
			<false/>
		</dict>
	</dict>
	<key>Misc</key>
	<dict>
		<key>Boot</key>
		<dict>
			<key>ConsoleBehaviourOs</key>
			<string>Graphics</string>
			<key>ConsoleBehaviourUi</key>
			<string>Text</string>
			<key>ConsoleMode</key>
			<string>Max</string>
			<key>HibernateMode</key>
			<string>None</string>
			<key>HideSelf</key>
			<true/>
			<key>PollAppleHotKeys</key>
			<false/>
			<key>Resolution</key>
			<string>1920x1080</string>
			<key>ShowPicker</key>
			<true/>
			<key>Timeout</key>
			<integer>20</integer>
			<key>UsePicker</key>
			<true/>
		</dict>
		<key>Debug</key>
		<dict>
			<key>DisableWatchDog</key>
			<false/>
			<key>DisplayDelay</key>
			<integer>0</integer>
			<key>DisplayLevel</key>
			<integer>2147483650</integer>
			<key>Target</key>
			<integer>0</integer>
		</dict>
		<key>Security</key>
		<dict>
			<key>AllowNvramReset</key>
			<true/>
			<key>ExposeSensitiveData</key>
			<integer>2</integer>
			<key>HaltLevel</key>
			<integer>2147483648</integer>
			<key>RequireSignature</key>
			<false/>
			<key>RequireVault</key>
			<false/>
			<key>ScanPolicy</key>
			<integer>0</integer>
		</dict>
		<key>Tools</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>Not signed for security reasons</string>
				<key>Enabled</key>
				<false/>
				<key>Name</key>
				<string>UEFI Shell</string>
				<key>Path</key>
				<string>Shell.efi</string>
			</dict>
			<dict>
				<key>Comment</key>
				<string>Memory testing utility</string>
				<key>Enabled</key>
				<false/>
				<key>Name</key>
				<string>memcheck</string>
				<key>Path</key>
				<string>memcheck/memcheck.efi</string>
			</dict>
		</array>
	</dict>
	<key>NVRAM</key>
	<dict>
		<key>Add</key>
		<dict>
			<key>4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14</key>
			<dict>
				<key>UIScale</key>
				<data>
				AQ==
				</data>
			</dict>
			<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
			<dict>
				<key>boot-args</key>
				<string>-v keepsyms=1 busratio=31</string>
				<key>csr-active-config</key>
				<data>
				ZwAAAA==
				</data>
				<key>prev-lang:kbd</key>
				<string>it:0</string>
			</dict>
		</dict>
		<key>Block</key>
		<dict>
			<key>4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14</key>
			<array>
				<string>UIScale</string>
			</array>
			<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
			<array>
				<string>boot-args</string>
			</array>
		</dict>
		<key>LegacyEnable</key>
		<false/>
		<key>LegacySchema</key>
		<dict>
			<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
			<array>
				<string>EFIBluetoothDelay</string>
				<string>EFILoginHiDPI</string>
				<string>LocationServicesEnabled</string>
				<string>SystemAudioVolume</string>
				<string>SystemAudioVolumeDB</string>
				<string>bluetoothActiveControllerInfo</string>
				<string>bluetoothInternalControllerInfo</string>
				<string>flagstate</string>
				<string>fmm-computer-name</string>
				<string>nvda_drv</string>
				<string>prev-lang:kbd</string>
			</array>
			<key>8BE4DF61-93CA-11D2-AA0D-00E098032B8C</key>
			<array>
				<string>Boot0080</string>
				<string>Boot0081</string>
				<string>Boot0082</string>
				<string>BootNext</string>
				<string>BootOrder</string>
			</array>
		</dict>
	</dict>
	<key>PlatformInfo</key>
	<dict>
		<key>Automatic</key>
		<true/>
		<key>DataHub</key>
		<dict>
			<key>BoardProduct</key>
			<string>Mac-7BA5B2D9E42DDD94</string>
			<key>SystemProductName</key>
			<string>iMacPro1,1</string>
			<key>SystemSerialNumber</key>
			<string>REDACTED</string>
			<key>SystemUUID</key>
			<string>REDACTED</string>
		</dict>
		<key>Generic</key>
		<dict>
			<key>MLB</key>
			<string>REDACTED</string>
			<key>ROM</key>
			<data>
			</data>
			<key>SpoofVendor</key>
			<true/>
			<key>SystemProductName</key>
			<string>iMacPro1,1</string>
			<key>SystemSerialNumber</key>
			<string>REDACTED</string>
			<key>SystemUUID</key>
			<string>REDACTED</string>
		</dict>
		<key>PlatformNVRAM</key>
		<dict>
			<key>FirmwareFeatures</key>
			<string>3FF58FFD 00000000</string>
			<key>FirmwareFeaturesMask</key>
			<string>3FFF9FFF 00000000</string>
			<key>MLB</key>
			<string>REDACTED</string>
			<key>ROM</key>
			<data>
			</data>
		</dict>
		<key>SMBIOS</key>
		<dict>
			<key>BIOSReleaseDate</key>
			<string>09/17/2019</string>
			<key>BIOSVendor</key>
			<string>Apple Inc.</string>
			<key>BIOSVersion</key>
			<string>1037.0.78.0.0</string>
			<key>BoardAssetTag</key>
			<string></string>
			<key>BoardLocationInChassis</key>
			<string>Part Component</string>
			<key>BoardManufacturer</key>
			<string>Apple Inc.</string>
			<key>BoardProduct</key>
			<string>Mac-7BA5B2D9E42DDD94</string>
			<key>BoardSerialNumber</key>
			<string>REDACTED</string>
			<key>BoardType</key>
			<integer>10</integer>
			<key>BoardVersion</key>
			<string>1.0</string>
			<key>ChassisAssetTag</key>
			<string>iMacPro-Aluminum</string>
			<key>ChassisManufacturer</key>
			<string>Apple Inc.</string>
			<key>ChassisSerialNumber</key>
			<string>REDACTED</string>
			<key>ChassisType</key>
			<integer>9</integer>
			<key>ChassisVersion</key>
			<string>Mac-7BA5B2D9E42DDD94</string>
			<key>FirmwareFeatures</key>
			<string>3FF58FFD 00000000</string>
			<key>FirmwareFeaturesMask</key>
			<string>3FFF9FFF 00000000</string>
			<key>MemoryFormFactor</key>
			<string></string>
			<key>PlatformFeature</key>
			<integer>0</integer>
			<key>ProcessorType</key>
			<integer>0</integer>
			<key>SystemFamily</key>
			<string>iMac Pro</string>
			<key>SystemManufacturer</key>
			<string>Apple Inc.</string>
			<key>SystemProductName</key>
			<string>iMacPro1,1</string>
			<key>SystemSKUNumber</key>
			<string>Mac-7BA5B2D9E42DDD94</string>
			<key>SystemSerialNumber</key>
			<string>REDACTED</string>
			<key>SystemUUID</key>
			<string>REDACTED</string>
			<key>SystemVersion</key>
			<string>1.0</string>
		</dict>
		<key>UpdateDataHub</key>
		<true/>
		<key>UpdateNVRAM</key>
		<true/>
		<key>UpdateSMBIOS</key>
		<true/>
		<key>UpdateSMBIOSMode</key>
		<string>Create</string>
	</dict>
	<key>UEFI</key>
	<dict>
		<key>ConnectDrivers</key>
		<true/>
		<key>Drivers</key>
		<array>
			<string>apfs.efi</string>
			<string>VBoxHfs.efi</string>
			<string>ApfsDriverLoader.efi</string>
			<string>AppleGenericInput.efi</string>
			<string>AptioInputFix.efi</string>
			<string>FwRuntimeServices.efi</string>
			<string>UsbKbDxe.efi</string>
		</array>
		<key>Input</key>
		<dict>
			<key>KeyForgetThreshold</key>
			<integer>5</integer>
			<key>KeyMergeThreshold</key>
			<integer>2</integer>
			<key>KeySupport</key>
			<false/>
			<key>KeySupportMode</key>
			<string></string>
			<key>KeySwap</key>
			<false/>
			<key>PointerSupport</key>
			<false/>
			<key>PointerSupportMode</key>
			<string></string>
			<key>TimerResolution</key>
			<integer>50000</integer>
		</dict>
		<key>Protocols</key>
		<dict>
			<key>AppleBootPolicy</key>
			<false/>
			<key>AppleEvent</key>
			<false/>
			<key>AppleImageConversion</key>
			<false/>
			<key>AppleKeyMap</key>
			<false/>
			<key>AppleUserInterfaceTheme</key>
			<false/>
			<key>ConsoleControl</key>
			<true/>
			<key>DataHub</key>
			<false/>
			<key>DeviceProperties</key>
			<false/>
			<key>FirmwareVolume</key>
			<false/>
			<key>HashServices</key>
			<false/>
			<key>UnicodeCollation</key>
			<false/>
		</dict>
		<key>Quirks</key>
		<dict>
			<key>AvoidHighAlloc</key>
			<true/>
			<key>ClearScreenOnModeSwitch</key>
			<false/>
			<key>ExitBootServicesDelay</key>
			<integer>0</integer>
			<key>IgnoreInvalidFlexRatio</key>
			<false/>
			<key>IgnoreTextInGraphics</key>
			<true/>
			<key>ProvideConsoleGop</key>
			<true/>
			<key>ReconnectOnResChange</key>
			<false/>
			<key>ReleaseUsbOwnership</key>
			<false/>
			<key>ReplaceTabWithSpace</key>
			<false/>
			<key>RequestBootVarRouting</key>
			<false/>
			<key>SanitiseClearScreen</key>
			<true/>
			<key>UnblockFsConnect</key>
			<false/>
		</dict>
	</dict>
</dict>
</plist>

 

Edited by ghost82
Link to comment

Ok, here is what I found:

I was thinking the hfs+ driver was not needed as I'm running Catalina on apfs, but to boot recovery you need hfs driver.

1) VBoxHfs.efi (latest developer version compiled by me at the time of writing) is very slow, it took 3 minutes to boot the recovery, and it works only if in opencore there are ProvideCustomSlide=true and EnableSafeModeSlide=true (without these I have memory allocating 0xa00 type 2 error to boot into recovery).

2) Replacing VBoxHfs.efi with older HFSPlus.efi makes the boot into recovery faster (istantaneous), without the need of ProvideCustomSlide=true.

3) Latest ApfsDriverLoader.efi and AppleImageLoader.efi (latest developer version compiled by me at the time of writing) do not show any drive: I'm using apfs.efi from Catalina.

4) Latest UsbKbDxe.efi (latest developer version compiled by me at the time of writing) doesn't work: opencore hangs at tiano core logo.

 

Edited by ghost82
  • Thanks 1
Link to comment
On 11/17/2019 at 5:06 PM, Leoyzen said:

Not only AMD/Ryzen, but also Intels in a VM.

Finally, by applying the patch in opencore mac os boots successfully and I can apply topology in the xml of the vm.

However, mac os system profiler shows 16 cores/16 processors..

 

sp.png.a5d1b04c6f7114c720270f546ef93378.png

 

Without the patch there's a kernel panic related to x86_validate_topology, so the patch works, but for some reasons this does not make any difference in mac os.

 

PS: shouldn't be not needed this patch in opencore after @Leoyzen commit to github? Latest compiled developer opencore is not able to boot without this kernel patch for me.

Edited by ghost82
Link to comment
4 hours ago, ghost82 said:

Finally, by applying the patch in opencore mac os boots successfully and I can apply topology in the xml of the vm.

However, mac os system profiler shows 16 cores/16 processors..

 

sp.png.a5d1b04c6f7114c720270f546ef93378.png

 

Without the patch there's a kernel panic related to x86_validate_topology, so the patch works, but for some reasons this does not make any difference in mac os.

 

PS: shouldn't be not needed this patch in opencore after @Leoyzen commit to github? Latest compiled developer opencore is not able to boot without this kernel patch for me.

The kernel patch is still needed in hackintosh VM.

The wrong process number is about the thing I mentioned before, we should use some other patches to make it work by digging the xnu source code but I don't have much time recently.

 

6 hours ago, ghost82 said:

Latest UsbKbDxe.efi (latest developer version compiled by me at the time of writing) doesn't work: opencore hangs at tiano core logo.

The same for me. I can't use my keyboard during Opencore booting procedure.

  • Like 1
Link to comment
10 minutes ago, Leoyzen said:

The kernel patch is still needed in hackintosh VM.

The wrong process number is about the thing I mentioned before, we should use some other patches to make it work by digging the xnu source code but I don't have much time recently.

Ok, thank you, just to make sure I'm in the same boat as all of you :)

I'm not a great guru, but I will try to understand what's happening.

Link to comment

Sorry but for me only being able to read clover in English regarding the original post image what is the topology patch to be able to boot with defined topology I’ve tried looking for an identical tab in clover with no luck. I’m having very stuttered audio from Bluetooth USB Card and HDMI outputs so I’m thinking this is a clock issue which topology may fix?

Link to comment
44 minutes ago, tpruszin said:

I’ve tried looking for an identical tab in clover with no luck

In clover go to kernel and kext patches --> KernelToPatch

This wasn't working for me in clover, no problems in opencore.

However, if I understood well and if your read the posts above, you will be able to set topology in xml, but you won't be able to make mac os recognize the correct topology; Penryn is the only cpu that works with topology.

I don't think your problems are related to topology, maybe related to power management.

Link to comment
52 minutes ago, tpruszin said:

I’m having very stuttered audio from Bluetooth USB Card and HDMI outputs so I’m thinking this is a clock issue which topology may fix?

It may related to wrong CPU frequency or busratio. Use opencore instead to see if it works(Opencore read the freq/busratio correctly)

Link to comment

What about c and p-states?

I'm not sure it is working properly, rather I think there's something broken (actually I'm not sure if states can be controlled in the guest)..

In ioreg I don't have any value for c and p-states:

 

cpstates.thumb.png.c5442b47d2fa6938895cd99ab02d99aa.png

 

Also, from mac os terminal, command: sudo powermetrics

returns:

Core 0 C-state residency: 0.00% (C3: 0.00% C6: 0.00% C7: 0.00% )
Core 1 C-state residency: 0.00% (C3: 0.00% C6: 0.00% C7: 0.00% )
......

for all the cores.

 

I'm using cpufriend kext + cpufrienddataprovider kext: cpufrienddataprovider kext was generated with ResourceConverter by feeding to it the ssdt generated with Pike's script (for cpu E5-2687W).

Emulated cpu is Ivy Bridge.

Data seem to be correctly injected:

 

frequency.thumb.png.dba9f21230255d3cac085876777fd263.png

 

What about your values?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.