Contribute
Register

[Success] ASRock Z390 Phantom Gaming-ITX + TB3 + iGPU + Mojave + SFF Build

Joined
Dec 29, 2010
Messages
232
Motherboard
GA-Z97N-Gaming 5
CPU
Core i7 4790K
Graphics
Nvidia GTX 760
Mac
Classic Mac
Mobile Phone
@Joshmo I've also tried the above with no luck. And yes, added @mango1122's FwUpdateTool.exe to the directory with FwUpdateAPI.dll. I've cleared CMOS and tried with and without Windows 10 TB native mode, still getting the SDK_NATIVE_MODE_MISMATCH error. Maybe we should reach out to Asrock tech support?
 
Joined
Sep 23, 2019
Messages
44
Motherboard
Asrock Z390 Phantom Gaming ITX
CPU
i9-9900K
Graphics
RX 580
Hi @jonisign Yep, I reckon contacting Asrock Tech support would be a good bet - I've just filled out an online request for assistance. Lets see what they say!
 
Joined
Aug 19, 2010
Messages
522
Motherboard
GA-Z390 Designare
CPU
i7 9900K
Graphics
UHD630 & Radeon VII
Mac
  1. MacBook Air
  2. MacBook Pro
  3. Mac mini
  4. Mac Pro
Mobile Phone
  1. iOS
honestly guys, the better move is going to be to flash the chip using an SPI programmer and the pre-patched firmware that @mango1122 is testing right now. This along with a slightly customized SSDT will give you NVM20 and fully native thunderbolt in macOS. just wait for that it should be out in a matter of days. You will need to invest in a cheap SPI programmer or a raspberryPi though if you dont have one already to do the physical flashing.

g\
 
Joined
Sep 23, 2019
Messages
44
Motherboard
Asrock Z390 Phantom Gaming ITX
CPU
i9-9900K
Graphics
RX 580
honestly guys, the better move is going to be to flash the chip using an SPI programmer and the pre-patched firmware that @mango1122 is testing right now. This along with a slightly customized SSDT will give you NVM20 and fully native thunderbolt in macOS. just wait for that it should be out in a matter of days. You will need to invest in a cheap SPI programmer or a raspberryPi though if you dont have one already to do the physical flashing.

g\
Sounds fantastic! I do have an RPi I could use. Do you have any links to learn about this technique in anticipation?
 
Joined
May 23, 2019
Messages
243
Motherboard
ASRock Z390 Phantom
CPU
i9-9900K
Graphics
UHD 630
Mac
  1. Mac Pro
Mobile Phone
  1. iOS
Update:
There's a SSDT based method for TB Node activation - which is here https://www.tonymacx86.com/threads/...tb3-igpu-mojave-sff-build.277418/post-2117075
and

Sample EFI - https://www.tonymacx86.com/threads/...tb3-igpu-mojave-sff-build.277418/post-2117668


Older Method
Credits - CaseySJ and Elias64Fr

So the process goes like this - It is definitely not straight forward and may potentially brick the TB port (worst case). I'm no expert so I can't offer a lot of assistance but I'll outline the steps. If you feel brave enough - carry on

Tested on: BIOS 4.00/4.40 and with a CH341A programmer and Thunderbolt3 Caldigit TS3 plus dock.
Steps 1, 2,3 are Optional but recommended.
  1. The board comes with TB firmware version 14 - which we first need to upgrade to 20. This is done by upgrading the firmware in Windows. Look through post #779 and #781 in this thread for details on how to do this. They have links both for the firmware and the software that updates the firmware of the TB chip. Once you do that validate by checking in Windows that the NVM version for your TB chip is 20. Pic 1.
  2. Step 2 is to read this flashed firmware from the TB chip on the motherboard. To read the firmware you need an external CH341A programmer (or a raspberry pi using a SOIC clip. I used the CH341A) . The steps to do this are here - https://www.tonymacx86.com/threads/...olt-3-i7-9700k-amd-rx-580.267551/post-2079848. The Chip to read in our case is on the back side of the motherboard. Almost behind the physical thunderbolt port. See pic 2. I have also shown the steps in the spoiler below.
  3. Once you read the firmware store it safely. This would be needed to restore the controller in case you accidentally brick it. Try reading it a few times and matching the shasum to ensure integrity. I can link the original TB dump here (which should be the same as yours) - ASRock_z390_ITX_Orignal_NVM20.bin.bin.zip
  4. Now we flash the modified firmware to the chip - ASRock_z390_ITX_Patched_NVM20_try1.bin.zip. You can also directly flash this file without going through step 1, 2 and 3. In case the controller is bricked for some reason - restore by flashing your former backup in step 3 or use my original TB dump file. Flash the modified firmware onto the controller. Then read the contents of the controller again. Match the shasum of the read file against the modified (ASRock_z390_ITX_MOD3_patched_NVM20.bin) one to ensure integrity.
  5. Wait for 1 minute and then reboot with a thunderbolt device connected. Try not to use any adapters. (you should remove any SSDT that you were using to enable Thunderbolt - like I was using SSDT-Z390-ASRock-ITX-AR-TB3-V8.aml - from page 1 of this thread) - Do you see any device information under the About the MAC > System report > Thunderbolt. If you don't see anything then check IORegistry explorer - do you see a tree under RP21 . If YES (See PIC3) then jump to step 6 . If NO (PIC4) then read on -
    1. Reboot and check status after each STEP
    2. Change Thunderbolt properties to the pic below (PIC 6) >> This seems to be the most important step. I got a BIOS reset to factory default after a power outage and the the Thunderbolt tree disappeared. Clearing the BIOS and GIPo3 force power didn't help. Apparently setting this exactly per the pic below helped. Reboot and try
    3. Reset the BIOS, clear CMOS.
    4. Do #2 again (PIC 6)
    5. "Enable GPIO3 Force Power" >> We don't have this option in our BIOS - so we have to unlock this using a modified version of Grub (link below). EDIT: ASRock provided me a special BIOS to enable GPIO3 Force Power (Z39PGIX4.40C.zip).
      1. For BIOS ver 4 and 4.40 the offset 0x4F0 stores this value. So we set this to 0x01.
      2. You can follow a similar mini guide here - https://www.tonymacx86.com/threads/...olt-3-i7-9700k-amd-rx-580.267551/post-2092710
      3. WARNING: This mini guide is for unlocking MSR register. Use it to prepare the USB stick and boot. Once you prepare the USB stick and boot then run setup_var 0x4F0 -- This should return 0x00 value. We need to change this to 0x01 by running setup_var 0x4F0 0x01.
      4. Please note that I have only tested BIOS 4 and 4.40 where the GIPo3 Frc Power is stored at 0x4F0. I am not sure about the other BIOS versions. You may follow the spoiler below called GPIO3 Force Power if you are on another BIOS version.
      5. TIP: I have noticed variable 0x4F1 stores 0xC8 as the value. So if you are on another BIOS and 0x4F1 stores the same 0xC8 then 0x4F0 will store the value for GIPO3 Frc Pwr and you can follow the steps above to set it to 0x01 without having to follow the spoiler below.
      6. NOTE: This value resets to 0x00 whenever you land factory defaults so you may need to perform this again after a reset.
    6. Use the TB SSDT that you were using previously to see if it powers on the controller(like SSDT-Z390-ASRock-ITX-AR-TB3-V8.aml)
  6. Follow this step here only after you see the TB node activated - https://www.tonymacx86.com/threads/...olt-3-i7-9700k-amd-rx-580.267551/post-2092146 (PIC 5)
Important Notes
  • All reads and writes to the TB chip using the programmer should be done without the power connected.
  • After flashing the modified firmware you will NOT be able to use the the thunderbolt in Windows - It will disappear from the Device Manager too. So it is not possible to simply reinstall the driver and restore to original state. To restore you will have to use the CH341A programmer and flash the original firmware.
Updates
  • USB3 devices connected to the TB port or to a TB dock do not show up






IMG_8279.jpeg


IMG_8280.jpeg



IMG_8281.jpeg


IMG_8282.jpeg



IMG_8283.jpeg



Notes:
  • Connect the programmer to a PC - I connected it to my MacBook.
  • Installed flashrom on Mac - sudo brew install flashrom
  • Command to read flash and save the contents in current directory
sudo flashrom --programmer ch341a_spi -r backup.bin
flashrom v1.1-rc1-130-g3799a1c on Linux 4.9.35-v7+ (armv7l)
flashrom is free software, get the source code at https://flashrom.org


Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Macronix flash chip "MX25L8005/MX25L8006E/MX25L8008E/MX25V8005" (1024 kB, SPI) on ch341a_spi.

  • Command to write flash and save in current directory
sudo flashrom --programmer ch341a_spi -w ASRock_z390_ITX_MOD3_patched_NVM20.bin

  • Most of the issues are related to read and write
  • If you get an error or you cannot read the chip - most likely the clip is not seated properly on the chip - try wriggling it into position.
  • For ALL read and write operations make sure you have removed the power cord for at least 30 second.

EDIT: ASRock provided me a special BIOS to enable GPIO3 Force Power (Z39PGIX4.40C.zip)

If you are on BIOS 4 or 4.40 then the 0x4F0 stores the value for Frc Pwr. If you are on another BIOS then you'll need to determine location.

TIP: I have noticed variable 0x4F1 stores 0xC8 as the value (for BIOS 4 and 4.40). So if you are on another BIOS and 0x4F1 stores the same 0xC8 then 0x4F0 will store the value for GIPO3 Frc Pwr and you can follow the steps above (#5.2) to set it to 0x01 without having to follow the below.

In case you need to determine the location of GPIO3 Frc Pwr - Follow the steps below
  1. Download UEFITool and IFR-Extractor.
  2. Open your firmware image in UEFITool and find GPIO3 unicode string.
  3. Extract the Setup.bin PE32 Image Section that UEFITool found via Extract Body.
  4. Run IFR-Extractor on the extracted file (e.g. ./ifrextract Setup.bin Setup.txt).
  5. Find CFG Lock, VarStoreInfo (VarOffset/VarName): in Setup.txt and remember the offset right after it (e.g. 0x123).
  6. Download and run a modified GRUB Shell
  7. Enter setup_var 0x123 0x00 command, where 0x123 should be replaced by your actual offset and reboot.
 

Attachments

  • 1.jpg
    1.jpg
    9.3 KB · Views: 163
  • ASRock_z390_ITX_Orignal_NVM20.bin.bin.zip
    213.7 KB · Views: 63
  • PIC 3.png
    PIC 3.png
    2 MB · Views: 174
  • PIC 4.png
    PIC 4.png
    859.9 KB · Views: 166
  • PIC 5.png
    PIC 5.png
    1.9 MB · Views: 196
  • PIC 2.jpeg
    PIC 2.jpeg
    1.2 MB · Views: 282
  • PIC 6.jpeg
    PIC 6.jpeg
    1.3 MB · Views: 299
  • ASRock_z390_ITX_Patched_NVM20_try1.bin.zip
    213.6 KB · Views: 73
  • Z39PGIX4.40C.zip
    9.8 MB · Views: 114
Last edited:
Joined
Sep 23, 2019
Messages
44
Motherboard
Asrock Z390 Phantom Gaming ITX
CPU
i9-9900K
Graphics
RX 580
Thank you so much for that info. I am going to take some time to read, re-read, re-re-read, research and digest before jumping in.
 
Joined
Dec 29, 2010
Messages
232
Motherboard
GA-Z97N-Gaming 5
CPU
Core i7 4790K
Graphics
Nvidia GTX 760
Mac
Classic Mac
Mobile Phone
@mango1122, this is looking impressive!

@Joshmo please post back if Asrock has any advice on the firmware upgrade-- I may not want to go through all of the steps mango1122 is outlining depending on how involved.
 
Joined
Aug 19, 2010
Messages
522
Motherboard
GA-Z390 Designare
CPU
i7 9900K
Graphics
UHD630 & Radeon VII
Mac
  1. MacBook Air
  2. MacBook Pro
  3. Mac mini
  4. Mac Pro
Mobile Phone
  1. iOS
So the process goes like this - It is definitely not straight forward and may potentially brick the TB port (worst case). I'm no expert so I can't offer a lot of assistance but I'll outline the steps. If you feel brave enough - carry on
...

ps. will edit the post later with more info

Hello @mango1122 ! thanks for posting this comprehensive process and files. I think there are a couple of points of confusion or flaws in the guide currently.

As you mention steps 1-3 are not strictly necessary. most importantly step 1 is very unnecessary as the firmware will be completely overwritten as nvm20 when it is programmed by SPI. As many people have struggled to do an official firmware update on this board i suggest removing this step. it is just going to confuse people. I do agree it is still a good idea to have people backup their existing firmware (steps 2/3) before starting the process so they have a known good firmware to fall back on if they run into unexpected problems.


I am not 100% certain about this but i do think that force power needs to be enabled before people can achieve a thunderbolt tree. So i think this is a little out of order in your process instructions. Possibly that should be the actual first step so that its ready to go as soon as firmware is flashed. And then as you state people can finally verify thunderbolt tree and go through the process linked to create a valid TDROM SSDT.


Lastly, did you find it very difficult to read/write with the SPI programmer to the chip on this board? Reason i ask is most reports indicate that it can be very difficult to read and write to motherboard onboard chips (vs relative ease with add-on cards). If you did not struggle with this at all, that is great news and may indicate this board is much easier than most. If you did struggle with it please see the updated flashing instructions Casey posted today as they may also apply to this (and most) motherboards to make flashing much, much more easy/reliable.

Thanks,
g\
 
Joined
May 23, 2019
Messages
243
Motherboard
ASRock Z390 Phantom
CPU
i9-9900K
Graphics
UHD 630
Mac
  1. Mac Pro
Mobile Phone
  1. iOS
Hello @mango1122 ! thanks for posting this comprehensive process and files. I think there are a couple of points of confusion or flaws in the guide currently.

As you mention steps 1-3 are not strictly necessary. most importantly step 1 is very unnecessary as the firmware will be completely overwritten as nvm20 when it is programmed by SPI. As many people have struggled to do an official firmware update on this board i suggest removing this step. it is just going to confuse people. I do agree it is still a good idea to have people backup their existing firmware (steps 2/3) before starting the process so they have a known good firmware to fall back on if they run into unexpected problems.


I am not 100% certain about this but i do think that force power needs to be enabled before people can achieve a thunderbolt tree. So i think this is a little out of order in your process instructions. Possibly that should be the actual first step so that its ready to go as soon as firmware is flashed. And then as you state people can finally verify thunderbolt tree and go through the process linked to create a valid TDROM SSDT.


Lastly, did you find it very difficult to read/write with the SPI programmer to the chip on this board? Reason i ask is most reports indicate that it can be very difficult to read and write to motherboard onboard chips (vs relative ease with add-on cards). If you did not struggle with this at all, that is great news and may indicate this board is much easier than most. If you did struggle with it please see the updated flashing instructions Casey posted today as they may also apply to this (and most) motherboards to make flashing much, much more easy/reliable.

Thanks,
g\

I would rather leave steps 1-3 in there - (will mark them optional but recommended). I didn't need the Force Power to enable the tree.What worked for me was to use the SSDT (SSDT-Z390-ASRock-ITX-AR-TB3-V8.aml). Resetting the BIOS to default and clearing CMOS should be first (they would clear the Force Power too and hence it is step 2).
It was relatively easy to read write onto the chip with the programmer. Try ordering a few different SOIC clips - some have better grips than the others. I have this build inside a Loque Ghost s1 - I can access the chip from the back without removing the board from the case.
Good luck
 
Joined
Sep 23, 2019
Messages
44
Motherboard
Asrock Z390 Phantom Gaming ITX
CPU
i9-9900K
Graphics
RX 580
  • After flashing the modified firmware you will NOT be able to use the the thunderbolt in Windows - It will disappear from the Device Manager too. So it is not possible to simply reinstall the driver and restore to original state. To restore you will have to use the CH341A programmer and flash the original firmware
[/SPOILER]

Ahhh, that's a bit of a deal-breaker unfortunately. I need to dual boot Windows 10 / Mojave and need TB on both OSes.
 
Top