mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-19 05:40:01 +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):
|
||||
|
||||
Reference in New Issue
Block a user