AppleVTD_English - Stick-Study/Universal-EFI-for-Intel-Hybrid-Architecture GitHub Wiki
This guide explains the features of AppleVTD and provides step-by-step instructions for enabling it on a Hackintosh system.
Device Type | Requirement |
---|---|
Motherboard | Supports Intel VT-d |
CPU | Compatible with Intel VT-d |
macOS Version | macOS Monterey or newer |
AppleVTD and DriverKit
AppleVTD is Apple's virtualization technology, primarily powered by Intel VT-d. It enables DMA remapping for Apple-native hardware using DriverKit drivers.
- Starting with macOS Monterey, Thunderbolt controllers require AppleVTD to be enabled.
- From macOS Ventura onward, network adapters may also use this feature.
DriverKit allows drivers to run in user space instead of as kernel extensions, which is intended to improve system stability and security.
Note: In practice, DriverKit drivers can be unstable. Although running in user space should prevent kernel panics, crashes may still occur, and troubleshooting can be difficult due to unclear crash logs.
DriverKit also helps prepare for Apple Silicon. For example, Apollo Thunderbolt and Blackmagic Design drivers use DriverKit on Apple Silicon Macs, while they remain kernel extensions on Intel Macs.
Make sure VT-d is enabled in your system's BIOS or UEFI settings.
- Mount your EFI partition.
- Open
config.plist
from the EFI/OC directory. - In the Kernel > Quirks section:
-
DisableIoMapper: Set to
false
to enable AppleVTD. -
DisableIoMapperMapping (macOS 13.3+ only): Set to
true
if any of the following apply:- You have 16GB or more RAM.
- Integrated graphics is enabled.
- Your DMAR table contains Reserved Memory Regions. For details, see Fix DMAR Tables.
-
DisableIoMapper: Set to
- Remove
dart=0
from theboot-args
inconfig.plist
. - Save your changes.
After rebooting, some systems will have AppleVTD enabled. If not, continue with the steps below.
There are two scenarios for fixing the DMAR table:
- Scenario 1: Intel 12th gen (600 series motherboards) or newer, without integrated graphics enabled.
- Scenario 2: Intel 11th gen (500 series) or older, or Intel 12th gen (600 series) or newer with integrated graphics enabled.
If you fall into Scenario 1, AppleVTD should work. If you're in Scenario 2, follow these steps to fix your DMAR table.
Use MaciASL to extract your DMAR table:
- Download and open MaciASL.
- Go to File > Get from ACPI to open the DMAR table.
After extracting the DMAR table:
- Delete all sections labeled "Reserved Memory Region" and the two blank lines below each.
- Save the file as SSDT-DMAR in ACPI Machine Language Binary format.
- Mount your EFI partition.
- Copy
SSDT-DMAR.aml
to the EFI/OC/ACPI directory. - Add an entry for SSDT-DMAR in the ACPI > Add section of
config.plist
. - Save your changes.
- Open
config.plist
in the EFI/OC directory. - In ACPI > Delete, add
DMAR
to the TableSignature list and enable it. - Save your changes.
After rebooting, verify that AppleVTD is loaded in macOS.
1. Download and Open IORegistryExplorer
Check for AppleVTD under the AppleACPIPlatformExpert
node.
Note: If AppleVTD is missing, you may need to add SSDT-DMAC.
If AppleVTD still does not work, adding a DMAC device via SSDT-DMAC may help. This allows macOS to access all memory regions. Most systems do not require DMAC injection.
DMAC applies to the following SMBIOS:
iMac: 5,1 to 20,x
iMacPro1,1
MacBook: 1,1 to 9,1
MacBookAir: 1,1 to 9,1
MacBookPro: 1,1 to 16,1
MacMini: 1,1 to 8,1
MacPro: 1,1 to 7,1
Xserve: 1,3 to 3,1
SSDT-DMAC Example:
//Add DMAC
DefinitionBlock ("", "SSDT", 2, "OCLT", "DMAC", 0)
{
External(_SB.PCI0.LPCB, DeviceObj)
Scope (_SB.PCI0.LPCB)
{
Device (DMAC)
{
Name (_HID, EisaId ("PNP0200"))
Name (_CRS, ResourceTemplate ()
{
IO (Decode16, 0x0000, 0x0000, 0x01, 0x20)
IO (Decode16, 0x0081, 0x0081, 0x01, 0x11)
IO (Decode16, 0x0093, 0x0093, 0x01, 0x0D)
IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
DMA (Compatibility, NotBusMaster, Transfer8_16, ) {4}
})
Method (_STA, 0, NotSerialized)
{
If (_OSI ("Darwin")) {
Return (0x0F)
} Else {
Return (Zero)
}
}
}
}
}
Notes:
- If
PNP0200
orDMAC
already exists in your DSDT, do not add it again. If missing, add this patch and export as.aml
. - Ensure the ACPI path for the LPC Bus (
LPC
orLPCB
) matches your system's DSDT.
- Add
SSDT-DMAC.aml
to your EFI/OC/ACPI folder and reference it inconfig.plist
. - Reboot.
- Open IORegistryExplorer and search for DMAC.
- If successful, the
IODeviceMemory
array should show more entries:
© 杆杆只爱学习, Released under the MIT License.
-- May 27, 2023