diff --git a/CHANGELOG.md b/CHANGELOG.md
index 16f7c92e4..330588006 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@
- Add Ethernet Controller detection to build
- Resolve i210/i225 NIC support on pre-Ivy Macs
- Resolve AirPlay to Mac support on Skylake+ Macs in 12.3 Beta 2+
+- Resolve SDXC support in Monterey for Pre-Ivy Bridge Macs
## 0.4.2
- Resolve app crashing on some 3rd party SAS/SATA controllers
diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist
index dffedc522..4aa2950bd 100644
--- a/payloads/Config/config.plist
+++ b/payloads/Config/config.plist
@@ -501,6 +501,24 @@
PlistPath
Contents/Info.plist
+
+ Arch
+ x86_64
+ Comment
+ SDXC Patch for Pre-Ivy
+ Enabled
+
+ MaxKernel
+
+ MinKernel
+ 21.0.0
+ BundlePath
+ BigSurSDXC.kext
+ ExecutablePath
+ Contents/MacOS/BigSurSDXC
+ PlistPath
+ Contents/Info.plist
+
Arch
x86_64
diff --git a/payloads/Kexts/Misc/BigSurSDXC-v1.0.0.zip b/payloads/Kexts/Misc/BigSurSDXC-v1.0.0.zip
new file mode 100644
index 000000000..9c2fb4ef4
Binary files /dev/null and b/payloads/Kexts/Misc/BigSurSDXC-v1.0.0.zip differ
diff --git a/resources/build.py b/resources/build.py
index bdf0b6411..8083240ec 100644
--- a/resources/build.py
+++ b/resources/build.py
@@ -407,6 +407,16 @@ class BuildOpenCore:
self.get_item_by_kv(self.config["ACPI"]["Patch"], "Comment", "BUF0 to BUF1")["Enabled"] = True
shutil.copy(self.constants.windows_ssdt_path, self.constants.acpi_path)
+ # With macOS Monterey, Apple's SDXC driver requires the system to support VT-D
+ # However pre-Ivy Bridge don't support this feature
+ # Big Sur's AppleSDXC driver only supported 14e4:16bc, so ignore other devices (avoids false positives from class code parsing)
+ if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value:
+ if (
+ (self.constants.computer.sdxc_controller and not self.constants.custom_model and self.constants.computer.sdxc_controller.vendor_id == 0x14e4 and self.constants.computer.sdxc_controller.device_id == 0x16bc) or
+ (self.model.startswith("MacBookPro8") or self.model.startswith("Macmini5"))
+ ):
+ self.enable_kext("BigSurSDXC.kext", self.constants.bigsursdxc_version, self.constants.bigsursdxc_path)
+
# USB Map
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
if (
diff --git a/resources/constants.py b/resources/constants.py
index f58c9f701..759f0c8e4 100644
--- a/resources/constants.py
+++ b/resources/constants.py
@@ -62,6 +62,7 @@ class Constants:
self.io80211elcap_version = "2.0.0" # IO80211ElCap
self.io80211high_sierra_version = "1.0.1" # IO80211HighSierra
self.io80211mojave_version = "1.0.1" # IO80211Mojave
+ self.bigsursdxc_version = "1.0.0" # BigSurSDXC
## Dortania
## https://github.com/dortania
@@ -299,6 +300,10 @@ class Constants:
@property
def mce_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleMCEReporterDisabler-v{self.mce_version}.zip")
+
+ @property
+ def bigsursdxc_path(self):
+ return self.payload_kexts_path / Path(f"Misc/BigSurSDXC-v{self.bigsursdxc_version}.zip")
@property
def mousse_path(self):
diff --git a/resources/device_probe.py b/resources/device_probe.py
index faac6c790..0b1ddd904 100644
--- a/resources/device_probe.py
+++ b/resources/device_probe.py
@@ -186,6 +186,10 @@ class OHCIController(PCIDevice):
class UHCIController(PCIDevice):
CLASS_CODE: ClassVar[int] = 0x0c0300
+@dataclass
+class SDXCController(PCIDevice):
+ CLASS_CODE: ClassVar[int] = 0x080501
+
@dataclass
class NVIDIA(GPU):
VENDOR_ID: ClassVar[int] = 0x10DE
@@ -465,6 +469,7 @@ class Computer:
dgpu: Optional[GPU] = None # Shortcut for GFX0
storage: list[PCIDevice] = field(default_factory=list)
usb_controllers: list[PCIDevice] = field(default_factory=list)
+ sdxc_controller: list[PCIDevice] = field(default_factory=list)
ethernet: Optional[EthernetController] = field(default_factory=list)
wifi: Optional[WirelessCard] = None
cpu: Optional[CPU] = None
@@ -483,6 +488,7 @@ class Computer:
computer.wifi_probe()
computer.storage_probe()
computer.usb_controller_probe()
+ computer.sdxc_controller_probe()
computer.ethernet_probe()
computer.smbios_probe()
computer.cpu_probe()
@@ -550,6 +556,19 @@ class Computer:
self.ambient_light_sensor = True
ioreg.IOObjectRelease(device)
+ def sdxc_controller_probe(self):
+ sdxc_controllers = ioreg.ioiterator_to_list(
+ ioreg.IOServiceGetMatchingServices(
+ ioreg.kIOMasterPortDefault,
+ {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(SDXCController.CLASS_CODE)[2:].zfill(8)))}]},
+ None,
+ )[1]
+ )
+
+ for device in sdxc_controllers:
+ self.sdxc_controller.append(SDXCController.from_ioregistry(device))
+ ioreg.IOObjectRelease(device)
+
def usb_controller_probe(self):
xhci_controllers = ioreg.ioiterator_to_list(
ioreg.IOServiceGetMatchingServices(