mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-18 21:30:00 +10:00
device_probe.py: Add UHCI detection
This commit is contained in:
@@ -173,6 +173,10 @@ class EHCIController(PCIDevice):
|
||||
class OHCIController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x0c0310
|
||||
|
||||
@dataclass
|
||||
class UHCIController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x0c0300
|
||||
|
||||
@dataclass
|
||||
class NVIDIA(GPU):
|
||||
VENDOR_ID: ClassVar[int] = 0x10DE
|
||||
@@ -451,6 +455,14 @@ class Computer:
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
|
||||
uhci_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault,
|
||||
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(UHCIController.CLASS_CODE)[2:].zfill(8)))}]},
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
for device in xhci_controllers:
|
||||
self.usb_controllers.append(XHCIController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
@@ -460,6 +472,9 @@ class Computer:
|
||||
for device in ohci_controllers:
|
||||
self.usb_controllers.append(OHCIController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
for device in uhci_controllers:
|
||||
self.usb_controllers.append(UHCIController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
|
||||
def storage_probe(self):
|
||||
|
||||
@@ -13,6 +13,7 @@ def validate(settings):
|
||||
example_data.iMac.iMac81_Stock,
|
||||
example_data.iMac.iMac112_Stock,
|
||||
example_data.iMac.iMac122_Upgraded,
|
||||
example_data.iMac.iMac122_Upgraded_Nvidia,
|
||||
example_data.iMac.iMac151_Stock,
|
||||
example_data.MacPro.MacPro31_Stock,
|
||||
example_data.MacPro.MacPro31_Upgrade,
|
||||
|
||||
Reference in New Issue
Block a user