Jump to content

VT-d problems in macOS


badbrain
 Share

58 posts in this topic

Recommended Posts

In some cases Ethernet/BT/Wifi might not work if the DMAR table contains "Reserved Memory Regions". Recently, after upgrading to Sonoma 14.2, I've witness crashes shortly after reaching the desktop.

 

On my Z490 system, I either have to set "DisableIOMapper" or I have to drop and replace the DMAR table so both AppleVTD and the Intel I225-V does work with the AppleIGC kext. Otherwise macOS does crash. I've disabled AppleIGC for now since I had really bad upload speeds with it. Could be an issue with the kext. But since it worked fine in Sonoma before, I think it could be an issue with macOS as well.

Edited by cankiulascmnfye
  • Thanks 1
Link to comment
Share on other sites

7 hours ago, deeveedee said:

Is AppleVTD SMBIOS-specific?  The reason I ask is that I believe I modified my HackBookPro6,2 's DMAR table but I don't see AppleVTD in IORegistry Explorer.  Note that I didn't need to modify DMAR and don't expect any behavioral changes resulting from the modified DMAR - I was just curious.  Should I see AppleVTD on my HackBookPro6,2?  Details below...

 

I enabled VT-d in BIOS on my Dell Latitude E6410 (SMBIOS MBP6,2) and extracted table DMAR (using MacIASL).  I then edited the DMAR table to remove the Reserved Region at the end of the table (used MaciASL to edit the table and adjust the table length).  I added the modified DMAR table to EFI/OC/ACPI, added DMAR to ACPI > Add and ACPI > Delete in my config.plist and disabled Kernel > Quirks > DisableIoMapper in my config.plist.  After rebooting Sonoma 14.1 with the modified DMAR, I confirmed the modified DMAR table with MacIASL (File > New from ACPI > DMAR) and the table is properly modified/loaded.

 

After modifying DMAR, my HackBookPro6,2 does not have AppleVTD in IORegistry Explorer.  Should I see AppleVTD?

I think no, AppleVTD is not SMBIOS model specific but it is hardware specific.

 

 

@ALL,

Show please your DMAR, I want to see differences.

  • Like 1
Link to comment
Share on other sites

Just to clarify, my Dell Latitude E6410 does not require the VT-d enabled and DisableIoMapper=False for proper macOS operation (tested through Sonoma 14.1). I am only experimenting with DMAR out of curiosity.  

 

When VT-d is enabled in BIOS and Kernel > Quirks > DisableIoMapper = False, AppleVTD does not appear in IORegistry Explorer.

 

Attached are my original and new DMAR tables.  I am booting with Open Core 0.9.5, SMBIOS = MBP6,2.    When DisableIoMapper=False, my hack boots fine with the original and modified DMAR, so I don't need to remove the Reserved Region in DMAR.

 

Screenshot2023-11-03at7_29_00AM.png.b6a18276974a9011acf3421a88c25678.png

 

Screenshot2023-11-03at7_34_59AM.png.0af9dfab7277ce9d88270f62a8027dfa.png

 

EDIT: The Reserved Memory Regions (DMAR) for my Dell Latitude E6410 are for USB hubs @1A and @1D.

Spoiler

Screenshot2023-11-03at4_40_06PM.png.6c1aa2500e6a5eae46850e78c788b3dd.png

 

Archive.zip

Edited by deeveedee
  • Like 1
Link to comment
Share on other sites

Unlike my HackBookPro6,2, when I boot my EliteDesk 800 G5 Mini (SMBIOS MM8,1) with VT-d enabled and modified DMAR, AppleVTD does appear in IORegistry Explorer.

 

ScreenShot2023-11-03at11_50_21AM.png.7e29b80061ace545c6b9cddd8d5ee941.png

 

The original and modified DMAR tables for my HP EliteDesk 800 G5 Mini are attached.

Archive.zip

Edited by deeveedee
Link to comment
Share on other sites

1 hour ago, Slice said:

As  I see Apple's DMAR also contains Reserved region. So we are on the wrong way. More likely we should exclude region for XHCI.

My EliteDesk800 G5 Mini boots with Kernel > Quirks > DisableIoMapper = False and original/unmodifiedl DMAR (with Reserved Regions).  But my EliteDesk800 G5 Mini does not have Aquantia Ethernet or Wi-Fi.

 

EDIT: If I'm reading DMAR correctly, the ReservedRegion (PCI Path : 02,00) in the real MM8,1 is iGPU:

 

IORegistry Explorer for EliteDesk 800 G5 Mini (SMBIOS MM8,1)

Spoiler

Screenshot2023-11-03at1_41_37PM.png.475d240d5f0af981a632232a20bb2300.png

 

Edited by deeveedee
Link to comment
Share on other sites

32 minutes ago, Slice said:

Yes, iGPU. But for a what purpose? 

Not sure. I performed a quick search and could only find references to reserved memory regions for firmware.  I'd be guessing if I said more.

 

EDIT: here's a related thread.

 

EDIT2: I edited my post here to indicate that the Reserved Memory Regions (DMAR) on my Dell Latitude E6410 are for the USB Hubs @1A and @1D.

Edited by deeveedee
Link to comment
Share on other sites

Му Dell Latitude E6430 has more regions

[068h 0104   2]                Subtable Type : 0001 [Reserved Memory Region]
[06Ah 0106   2]                       Length : 0030

[06Ch 0108   2]                     Reserved : 0000
[06Eh 0110   2]           PCI Segment Number : 0000
[070h 0112   8]                 Base Address : 00000000CAC5C000
[078h 0120   8]          End Address (limit) : 00000000CAC7BFFF

[080h 0128   1]            Device Scope Type : 01 [PCI Endpoint Device]
[081h 0129   1]                 Entry Length : 08
[082h 0130   2]                     Reserved : 0000
[084h 0132   1]               Enumeration ID : 00
[085h 0133   1]               PCI Bus Number : 00

[086h 0134   2]                     PCI Path : 1D,00


[088h 0136   1]            Device Scope Type : 01 [PCI Endpoint Device]
[089h 0137   1]                 Entry Length : 08
[08Ah 0138   2]                     Reserved : 0000
[08Ch 0140   1]               Enumeration ID : 00
[08Dh 0141   1]               PCI Bus Number : 00

[08Eh 0142   2]                     PCI Path : 1A,00


[090h 0144   1]            Device Scope Type : 01 [PCI Endpoint Device]
[091h 0145   1]                 Entry Length : 08
[092h 0146   2]                     Reserved : 0000
[094h 0148   1]               Enumeration ID : 00
[095h 0149   1]               PCI Bus Number : 00

[096h 0150   2]                     PCI Path : 14,00


[098h 0152   2]                Subtable Type : 0001 [Reserved Memory Region]
[09Ah 0154   2]                       Length : 0020

[09Ch 0156   2]                     Reserved : 0000
[09Eh 0158   2]           PCI Segment Number : 0000
[0A0h 0160   8]                 Base Address : 00000000CB800000
[0A8h 0168   8]          End Address (limit) : 00000000CF9FFFFF

[0B0h 0176   1]            Device Scope Type : 01 [PCI Endpoint Device]
[0B1h 0177   1]                 Entry Length : 08
[0B2h 0178   2]                     Reserved : 0000
[0B4h 0180   1]               Enumeration ID : 00
[0B5h 0181   1]               PCI Bus Number : 00

[0B6h 0182   2]                     PCI Path : 02,00

Because it is IvyBridge which has USB3.0.

Link to comment
Share on other sites

4 hours ago, Slice said:

As  I see Apple's DMAR also contains Reserved region. So we are on the wrong way. More likely we should exclude region for XHCI.

 

I think you might be right about the XHCI situation. Because my OEM DMAR table contains 2 Reserved Memory regions: one for XHCI and one for something network related, iirc. When Monterey dropped, I had to remove one region for Ethernet to work but left the other one for XHCI untouched. But after Upgrading to 14.2, macOS would crash with this table. Only after I removed the 2nd Memory Region (XHCI) it would no longer crash!

 

DMAR.zip

Edited by cankiulascmnfye
  • Like 1
Link to comment
Share on other sites

13 hours ago, Slice said:

Му Dell Latitude E6430 has more regions

Because it is IvyBridge which has USB3.0.

 

Yes.  The Latitude E6410 does not have iGPU or XHCI.

 

EDIT: Real MBP6,2 does not have AppleVTD:

 

Screenshot 2023-11-04 at 7.04.32 AM.png

Edited by deeveedee
Link to comment
Share on other sites

  • 7 months later...

Patching the DMAR might have serious side effects while memory usage increases under load. My Gigabyte Z490 Gaming X seams to works fine under Sonoma with a patched DMAR and AppleVTD enabled but when I use Xcode, which is the only application on my system using more than 32GB RAM, the machine suddenly crashes. This behaviour is reproducible. After I removed the patched DMAR and set DisableIOMapper to true again, the problem disappeared.

Edited by Mieze
Typo
  • Like 5
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
On 6/10/2024 at 11:17 PM, Mieze said:

Patching the DMAR might have serious side effects while memory usage increases under load. My Gigabyte Z490 Gaming X seams to works fine under Sonoma with a patched DMAR and AppleVTD enabled but when I use Xcode, which is the only application on my system using more than 32GB RAM, the machine suddenly crashes. This behaviour is reproducible. After I removed the patched DMAR and set DisableIOMapper to true again, the problem disappeared.

Hi, this sounds like a huge deal. Have you come to any conclusions? I have Asus z790 Proart, used SSDTTime to alter dmar, added it to acpi-add and use acpi-delete accordingly, have disableiomapper false and Disableiomappermapping true.

 

My understanding was this can help ensure Ethernet, wifi, Thunderbolt behave well. Also I want vt-d enabled.

 

But since I plan on heavy ram workloads in final cut pro and logic pro, I am wondering what is actually ideal setup for stability.

 

Thanks

Link to comment
Share on other sites

I have a strange behaviour with my old GA-Z170-HD3, when I enable VT-D in BIOS USB ports don't work anymore ... really I can't understand what's the culprit ... I'm currently under macOS BigSur ... and I have correctly created the USB mapping with USBmap.kext and everything is working properly but when I enable VT-d in BIOS .. bum! USBs stop working... any hint?

Link to comment
Share on other sites

As the DMAR of Gigabyte boards usually contains a reserved region for the XHCI, that's the expected behaviour. Patching the DMAR might resolve the problem but may have other severe side effects. My recommendation is to keep AppleVTD disabled if it requires DMAR patches to work.

  • Like 4
Link to comment
Share on other sites

my DMAR (see attached file) has no reserverd regions but, nevertheless, as soon as VT-D is enabled in BIOS and DisableIOMapper is OFF, USB ports don't work anymore. Any hint about how to solve this problem?

DMAR-1.aml

Link to comment
Share on other sites

43 minutes ago, MaLd0n said:

This table has two RM regions DMAR.aml

 

 

 

 

Sorry! My fault... at this point as there is some sort of interference with USB (XHCI) ports ... do you suggest to delete both the 2 regions? 

Link to comment
Share on other sites

Ye. Use your edited DMAR DMAR.aml

Uncheck DisableIoMapper Quirk

Drop OEM DMAR with this patch

Quote

<dict>
                <key>All</key>
                <false/>
                <key>Comment</key>
                <string>Drop DMAR Table</string>
                <key>Enabled</key>
                <true/>
                <key>OemTableId</key>
                <data>AAAAAA==</data>
                <key>TableLength</key>
                <integer>0</integer>
                <key>TableSignature</key>
                <data>RE1BUg==</data>
            </dict>

 

  • Like 4
Link to comment
Share on other sites

PCI path 14,0 is the XHCI. Please keep in mind that removing reserved regions may result in kernel panics under certain circumstances and the reasons are not always obvious.

  • Like 5
Link to comment
Share on other sites

Hi @Mieze   How is it going?  I'm using Clover and I did the ACPI Dump and my DMAR comes out (apparently) without defects. I ran Xcode 16.2 on Sequoia beta 3, and using CpuTopologyRebuild.kext, using DisableloMapper unchecked  with VT-d and Above 4G enabled. My updated BIOS has Extreme and Performance mode, I managed without problems with Performance Mode. So far so good. Thanks for your help.

 

Are you recommend another configuration? iStats show me 8 cores and 32 trades. 

 

 

image.thumb.png.c18a70f6466d6f195375484fb3bfdb78.pngimage.png.7edcae9bf2588183936bd1cdc1c7e007.png

 

 

Link to comment
Share on other sites

1 hour ago, Mieze said:

PCI path 14,0 is the XHCI. Please keep in mind that removing reserved regions may result in kernel panics under certain circumstances and the reasons are not always obvious.

 

Thanks but unfortunately no luck! 😞

I've tried both the modified DMAR without any reserved region and a DMAR2 with PCI path 14,0 NOT stripped away. in both the cases keyboard and mouse stop functioning after boot and logon (I have the automatic login atm). That's weird, any other hint? Thanks! 🙂

 

DMAR.aml DMAR2.aml config.plist

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...