• Become a Premium Member for $25/year with no ads to improve your community experience.

How to Fix DMAR Table on macOS | Memory Mapping


Overview


On some systems, when you enable VT-d which is required for some major functioning of a few particular devices such as Antelope Audio Interface and other Thunderbolt capable Devices, the system starts acting weird and all of the sudden network devices no longer work including Ethernet and WiFi. When checking the Devices in System Preferences>Network, the network adapters are in a loop, infinite link-up and link-down but never connect.

From OpenCore Documentation (DisableioMapper section)

Misconfigured IOMMU in the firmware may result in broken devices such as ethernet or Wi-Fi adapters. For instance, an ethernet adapter may cycle in link-up link-down state infinitely and a Wi-Fi adapter may fail to discover networks. Gigabyte is one of the most common OEMs with these issues.

Such issues were seen on systems running Big Sur and Later. To overcome this issue, a user @yosoyoco came up with a fix and the idea was to fix the DMAR Table by removing the reserved memory regions from the original OEM DMAR Table, and then further dropping the OEM DMAR Table, and using the fixed DMAR Table.

This fix is required for the systems running Big Sur and Later. Although, few users have reported it on Catalina and prior too.

Since macOS Ventura, enabling VT-d is a must. VT-d is required for working Network Adapters, including built-in and PCIe based. This has been already discussed in the thread below.

QUICK INFO:
  • The DMAR Fix is required for systems that have enabled VT-d. Note that on some systems, enabling the VT-d function may not cause the network disruption as mentioned above. However, it is still recommended to implement the DMAR fix to avoid any potential issues.

Requirements
The requirements are pretty much the same as VT-d

STEP 1: Enable Apple VT-d
The very first step is to enable VT-d function in BIOS/UEFI as without that, it won't be possible to have the DMAR Table when extracting the native ACPI Tables. To enable VT-d, simply set VT-d to Enabled in your BIOS/UEFI. For more information on enabling Apple VT-d, read below

STEP 2: Extracting Native ACPI Tables
The next step is to extract your native ACPI Tables for patching. We recommend it extracting using Clover, for the highest level of integrity. If you're not aware of how to do that, a guide is already available which is linked below.

STEP 3: Fixing DMAR Table
1. Once you're done with the extraction, copy the origin folder to any working directory of your choice.
2. Open the copied origin folder
3. Locate and copy the DMAR.aml file to your working directory.
4. Download MaciASL.
5. Open the DMAR.aml file using MaciASL. You should have a similar table as the screenshot attached below.

Screen Shot 2022-01-23 at 11.40.41 AM-min.png

5. Find the Memory Regions and delete them. In our case, the Memory region starts from line 70 and ends at line 101.

Screen Shot 2022-01-23 at 10.24.32 AM-min.png

Upon deleting the Memory Regions, the DMAR Table should look similar to the screenshot attached below.

Screen Shot 2022-01-23 at 10.28.20 AM-min.png

As you can see, it's very clear that now, the memory regions have been deleted. Which is the essence ;)

6. Click on Compile button.
7. Go to File Menu and select Save As option. Make sure to select ACPI Machine Language Binary in the File Format selection.

STEP 4: Copy DMAR SSDT
The next step is to copy the newly patched DMAR Table. To copy the DMAR Table, follow the steps below.

1. Mount your ESP
2. If you're using OpenCore, copy the new DMAR.aml SSDT from STEP #3 to EFI/OC/ACPI directory. If you're using Clover, copy the DMAR.aml SSDT from STEP #3 to EFI/Clover/ACPI/patched directory.

STEP 5: Modify EFI Configuration
The next step is to add the required changes by editing your config.plist. The changes are supported by both bootloaders, i.e OpenCore and Clover. To modify, follow the steps below.

1. Mount your ESP

For OpenCore
1. Open your config.plist from EFI/OC directory
2. Navigate to the ACPI section and implement the following changes

ACPI

This section is for loading, blocking, and patching the ACPI tables. The sub-sections are explained below.

Add
This section is for adding the DSDT and SSDT files for your system. This basically includes USB and CPU Power Management SSDT.

The required settings include:

Path*ValueNotes
SSDT-DMARYES
  • This SSDT removes the reserved memory region blocks.
  • This SSDT is required for fixing network adapters with an infinite link cycle loop.

Delete
This section allows blocking the ACPI tables from loading.

The required settings include:

Table Signature*OemTableIdTableLengthCommentAllEnabledNotes
DMAR0Drop OEM DMAR TableYES
  • This patch drops OEM DMAR table.
  • Mandatory for all systems using Step 3.

3. Save your config.plist.

For Clover
1. Open your config.plist from EFI/Clover directory
2. Navigate to the ACPI section and implement the following changes

ACPI

This section is for loading, blocking, and patching the ACPI tables. The sub-sections are explained below.

Drop Tables
This section allows blocking the ACPI tables from loading.

The required settings include:

Signature*Type/KeyString[Tabled]Number[Length]DropForAllOSNotes
DMARNO
  • This patch drops OEM DMAR table.
  • Mandatory for all systems using Step 3.

SSDT
This section is for adding the DSDT and SSDT files for your system when using a Sorted Order. If you're using Full patched DSDT+SSDT, set Drop OEM to true. When using this option, you also need to use Sorted Order. See the Sorted Order information below.

SortedOrder
This section is for adding the DSDT and SSDT files for your system when using a Sorted Order. If you're using a Sorted Order configuration, add SSDT-DMAR.aml to the list.

3. Save your config.plist.

STEP 6: Restart your System
After performing all the above steps, restart your system for the applied changes to take effect.
 
Last edited:
The required settings include:

Table Signature*OemTableIdTableLengthCommentAllEnabledNotes
DMARDrop OEM DMAR TableYES
  • This patch drops OEM DMAR table.
  • Mandatory for all systems using Step 3.
in this section, not mention Type of these. I dont know which type to set, OC Validate said error: "
OCS: Failed to parse data field as value with type integer and <empty> contents, context <TableLength>!

OCS: Failed to parse string field as value with type data and <DMAR> contents, context <TableSignature>!

Serialisation returns 2 errors!



Completed validating /Volumes/ESP/EFI/OC/config.plist in 2 ms. Found 2 issues requiring attention.

"
 

Attachments

  • Screen Shot 2022-08-23 at 08.31.31.png
    Screen Shot 2022-08-23 at 08.31.31.png
    500.6 KB · Views: 109
and this tutorial using method edit *.aml directly? no need dissample to *.dsl?
 
Hello for the first time!
I created dmar.aml as per guide…
Unfortunately, when enabled in OC config.plist it results in dead USB.
Have you any idea why?
My setup is Opencore 0.8.5 Monterey 12.6 SMBIOS 18,3
 
Hello for the first time!
I created dmar.aml as per guide…
Unfortunately, when enabled in OC config.plist it results in dead USB.
Have you any idea why?
My setup is Opencore 0.8.5 Monterey 12.6 SMBIOS 18,3
No PR Files attached.

Do you have any specific usage related to Thunderbolt?
 
Don’t have thunderbolt, I have a problem with Aquantia 107 - 10Gbit network card which needs VT-d enabled (as per some info for Monterey 12.6)…
Find DMAR.aml/dsl and Config.plist for OC0.8.5 included…
Thanks in advance!
 

Attachments

  • Archive.zip
    7.6 KB · Views: 22
Don’t have thunderbolt, I have a problem with Aquantia 107 - 10Gbit network card which needs VT-d enabled (as per some info for Monterey 12.6)…
Find DMAR.aml/dsl and Config.plist for OC0.8.5 included…
Thanks in advance!
Have you included the native ACPI files?
 
The required settings include:

Signature*Type/KeyString[Tabled]Number[Length]DropForAllOSNotes
DMARNO
  • This patch drops OEM DMAR table.
  • Mandatory for all systems using Step 3.

There's a critical piece of missing information here:

If you are manually editing your config.plist (rather than using Clover) then you must enter the signature as hexadecimal encoding of the string "DMAR" as type <data>.

"DMAR" in hex is "444D4152"

So your config.plist should reflect the field as so:

Rich (BB code):
<key>TableSignature</key>

<data><444D4152></data>
 
There's a critical piece of missing information here:

If you are manually editing your config.plist (rather than using Clover) then you must enter the signature as hexadecimal encoding of the string "DMAR" as type <data>.

"DMAR" in hex is "444D4152"

So your config.plist should reflect the field as so:

Rich (BB code):
<key>TableSignature</key>

<data><444D4152></data>
Both results the same. You can either use the HEX or simply Table Name. The guide is tested and verified.
 
Fix DMAR
12.67 Network is normal
Network loop interruption after upgrading from 12.67 to 13.5
 
Last edited:

Latest posts

Forum statistics

Threads
1,498
Messages
14,272
Members
21,576
Latest member
kolen