AppleVTD_English - Stick-Study/Universal-EFI-for-Intel-Hybrid-Architecture GitHub Wiki

Overview

This guide explains the features of AppleVTD and provides step-by-step instructions for enabling it on a Hackintosh system.

Requirements

Device Type Requirement
Motherboard Supports Intel VT-d
CPU Compatible with Intel VT-d
macOS Version macOS Monterey or newer

AppleVTD and DriverKit

AppleVTD

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.

How to Enable AppleVTD

1. Enable VT-d in BIOS/UEFI

Make sure VT-d is enabled in your system's BIOS or UEFI settings.

2. Configure OpenCore Quirks

  1. Mount your EFI partition.
  2. Open config.plist from the EFI/OC directory.
  3. 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. Quirks
  4. Remove dart=0 from the boot-args in config.plist.
  5. Save your changes.

3. Reboot

After rebooting, some systems will have AppleVTD enabled. If not, continue with the steps below.

Fixing the DMAR Table

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.

1. Extract the Native DMAR Table

Use MaciASL to extract your DMAR table:

  1. Download and open MaciASL.
  2. Go to File > Get from ACPI to open the DMAR table. ACPI_DMAR

2. Remove Reserved Memory Regions

After extracting the DMAR table:

  1. Delete all sections labeled "Reserved Memory Region" and the two blank lines below each. Remove_Reserved_Memory_Regions
  2. Save the file as SSDT-DMAR in ACPI Machine Language Binary format.

3. Enable SSDT-DMAR

  1. Mount your EFI partition.
  2. Copy SSDT-DMAR.aml to the EFI/OC/ACPI directory.
  3. Add an entry for SSDT-DMAR in the ACPI > Add section of config.plist. SSDT-DMAR
  4. Save your changes.

4. Delete the Original DMAR Table

  1. Open config.plist in the EFI/OC directory.
  2. In ACPI > Delete, add DMAR to the TableSignature list and enable it. Drop_DMAR
  3. Save your changes.

5. Reboot

Verifying AppleVTD

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.

IOReg_AppleVTD

DMAC (Direct Memory Access Controller)

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

1. Add SSDT-DMAC

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 or DMAC 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 or LPCB) matches your system's DSDT.

2. Verify DMAC Device

  1. Add SSDT-DMAC.aml to your EFI/OC/ACPI folder and reference it in config.plist.
  2. Reboot.
  3. Open IORegistryExplorer and search for DMAC.
  4. If successful, the IODeviceMemory array should show more entries: IOReg_DMAC

© 杆杆只爱学习, Released under the MIT License.

-- May 27, 2023

⚠️ **GitHub.com Fallback** ⚠️