Jump to content

fabiosun

Recommended Posts

Not getting anywhere fast here  I changed to a Catalina install rather than Big Sur. I am now getting “can’t perform kext scan: no kext summary”

 

and then

 

”** in memory panic stackshot succeeded ** bytes traced 4064 ••”


When I try with BS again I am now getting the same message and I don’t reach the [Configuring PCI] that I got to yesterday. 
 

I am away for the weekend but will try again next week  Aaaarrrrrrggggg 
 

Link to comment
Share on other sites

@Ploddles - so during my time trying to tweak RTC settings, I ran into almost all the standard, default, issues, even when trying to boot off of a working EFI (USB). What the root cause of the issue was for me, was the BIOS settings (which gets reset when I have to clear CMOS due to hard shutdowns). And this was after having a working Installation.

 

Here's a few things to try:

- Clear your CMOS (if you have the button option on your mobo, save your BIOS settings on a USB, or as profile, unplug from wall, clear it with the button, then load it or manually check them again)

- CSM Disabled/4G Encoding Enabled (4G Encoding was disabled which caused my PCI error)

- Clear/Reset NVRAM - reboot, before attempting reinstall. Some cache of it may be left behind from previous installs? I can't verify this.

- If you haven't already, do a full disk erase before installing

 

See if those things all done prior to the install can help you clear more of the installer. Also for the sake of ruling out other potential issues, make sure you don't have any disks/drives/nvme attached to your mobo that aren't MacOS (Windows, etc) plugged in. Ideally just a single drive that you intend on installing first, and then afterwards, you can add them back in.

 

@iGPU - I'm noticing a few interesting compatibility quirks that weren't present in the Proxmox Version. A few more apps that I had used fine on BS are now crashing on Catalina. My guess is that it's due to exposing the CPU as AMD vs masking as Intel, and those application drivers aren't loading, as there's no native MacOS AMD drivers. What's your take on this? Another thought around the reset/shutdown issue would be something to do with the USB Power. 

 

Adding some additional useful things below


 

Spoiler

 

RTC Attempt

 

What I tried that didn't work (all in one go, bad idea, I know): 

- Enabling RTCMemoryFixup.kext

- Adding -rtcfx_exclude=80-FF in boot-args

- Enabling AppleRtcMemory

- Adding "56 57" to NVRAM > rtc-blacklist

 

Adobe Fixup Script

 

Run Step 1 and then Step 2 below in Terminal. Last Script is in case something breaks

 

Step 1


for file in MMXCore FastCore TextModel libiomp5.dylib; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
        sudo -v
        echo "found $FILE"
        [[ ! -f ${FILE}.back ]] && sudo cp -f $FILE ${FILE}.back || sudo cp -f ${FILE}.back $FILE
        echo $FILE | grep libiomp5 >/dev/null
        if [[ $? == 0 ]]; then
            dir=$(dirname "$FILE")
            [[ ! -f ${HOME}/libiomp5.dylib ]] && cd $HOME && curl -sO https://excellmedia.dl.sourceforge.net/project/badgui2/libs/mac64/libiomp5.dylib
            echo -n "replacing " && sudo cp -vf ${HOME}/libiomp5.dylib $dir && echo
            rm -f ${HOME}/libiomp5.dylib
            continue
        fi
        echo $FILE | grep TextModel >/dev/null
        [[ $? == 0 ]] && echo "emptying $FILE" && sudo echo -n >$FILE && continue
        echo "patching $FILE \n"
        sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' $FILE
        sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' $FILE
    done
done

 

Step 2

 


[ ! -d $HOME/Library/LaunchAgents ] && mkdir $HOME/Library/LaunchAgents
AGENT=$HOME/Library/LaunchAgents/environment.plist
sysctl -n machdep.cpu.brand_string | grep Ryzen >/dev/null 2>&1
x=$(echo $(($? != 0 ? 5 : 4)))
cat >$AGENT <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>mkl-debug</string>
    <key>ProgramArguments</key>
    <array>
    <string>sh</string>
    <string>-c</string>
        <string>launchctl setenv MKL_DEBUG_CPU_TYPE $x;</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>
EOF
launchctl load ${AGENT} >/dev/null 2>&1
launchctl start ${AGENT} >/dev/null 2>&1

# Reboot after this step and it should work now. Sigh. Have to hard reboot unfortunately for me.


## Revert the previous script in case you brick something


for file in MMXCore FastCore TextModel libiomp5.dylib; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
        sudo -v
        [[ -f ${FILE}.back ]] && echo "found backup $FILE" && sudo mv -f ${FILE}.back $FILE
    done
done

AGENT=$HOME/Library/LaunchAgents/environment.plist
if [[ -f $AGENT ]]; then
    launchctl unload ${AGENT} >/dev/null 2>&1
    launchctl stop ${AGENT} >/dev/null 2>&1
    rm -rf $AGENT
fi

Script to Change your CPU Name in About this Mac for Cosmetic Reasons. Copy and paste this into a new file, cpu_name.sh - then run it with

sh cpu_name.sh. In case you want to have a different name, you can add it under the if block as a cpu_name="My Hackintosh" which will override the original variable. Should show after reboot. I set a custom name because "Ryzen" made it too long to display the full name.

 

image.png.a55bf05455ff3721c044305997718e42.png

 


#!/bin/bash

locale=`defaults read -g AppleLocale | cut -c 1-2`
cpu_name=`sysctl -n machdep.cpu.brand_string | sed -e 's/ *$//'`
target="/System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/Resources/${locale}.lproj/AppleSystemInfo.strings"

if [ $# -ge 1 ]; then
  cpu_name=$1
fi

echo "Locale: $locale"
echo "New Name: $cpu_name"
read -p "ok? (y/n): " yn

case $yn in
  [yY])
    sudo mount -uw / &&
    sudo cp $target $target.`date +%Y%m%d%H%M` &&
    sudo plutil -replace IntelSpeedAndTypeFormat -string "%1\$@ $cpu_name" $target
    echo "Finished."
    ;;
  *) echo "Aborted."
esac

 

Some benchmarks for @fabiosun

 

Spoiler

 

 

image.png.6144b381a12efdfe13c4ddd39613d668.png

image.png.31dff191fbc11b0eec38860f094025c3.png

 

 

 

 

 

Edited by tsongz
adding RTC Fails & personally useful stuff
  • +1 1
Link to comment
Share on other sites

  • Moderators
6 hours ago, fabiosun said:

@all

are you sure nvram is working and maintained in your trx40 system?

in guide section there is a way to verify it

very curious about it

 

NVRAM is not working on Catalina bare metal with OC v061.

  • +1 1
Link to comment
Share on other sites

41 minutes ago, TheDantee said:

@meina222 can you please share your EFI Folder with me we have very similar setup but mine gets stuck near the end of bar with the apple logo on loading the installer and then restarts my PC

 

Catalina, Mojave and Big Sur will not run with a Nvidia 1080 graphics card. You need an older supported Nvidia card or an AMD one. @meina222's EFI is a few pages back, you can download it from there.

Link to comment
Share on other sites

20 hours ago, tsongz said:

@Ploddles - so during my time trying to tweak RTC settings, I ran into almost all the standard, default, issues, even when trying to boot off of a working EFI (USB). What the root cause of the issue was for me, was the BIOS settings (which gets reset when I have to clear CMOS due to hard shutdowns). And this was after having a working Installation.

 

Here's a few things to try:

- Clear your CMOS (if you have the button option on your mobo, save your BIOS settings on a USB, or as profile, unplug from wall, clear it with the button, then load it or manually check them again)

- CSM Disabled/4G Encoding Enabled (4G Encoding was disabled which caused my PCI error)

- Clear/Reset NVRAM - reboot, before attempting reinstall. Some cache of it may be left behind from previous installs? I can't verify this.

- If you haven't already, do a full disk erase before installing

 

  Reveal hidden contents

 

RTC Attempt

 

What I tried that didn't work (all in one go, bad idea, I know): 

- Enabling RTCMemoryFixup.kext

- Adding -rtcfx_exclude=80-FF in boot-args

- Enabling AppleRtcMemory

- Adding "56 57" to NVRAM > rtc-blacklist

 

Adobe Fixup Script

 

Run Step 1 and then Step 2 below in Terminal. Last Script is in case something breaks

 

Step 1



for file in MMXCore FastCore TextModel libiomp5.dylib; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
        sudo -v
        echo "found $FILE"
        [[ ! -f ${FILE}.back ]] && sudo cp -f $FILE ${FILE}.back || sudo cp -f ${FILE}.back $FILE
        echo $FILE | grep libiomp5 >/dev/null
        if [[ $? == 0 ]]; then
            dir=$(dirname "$FILE")
            [[ ! -f ${HOME}/libiomp5.dylib ]] && cd $HOME && curl -sO https://excellmedia.dl.sourceforge.net/project/badgui2/libs/mac64/libiomp5.dylib
            echo -n "replacing " && sudo cp -vf ${HOME}/libiomp5.dylib $dir && echo
            rm -f ${HOME}/libiomp5.dylib
            continue
        fi
        echo $FILE | grep TextModel >/dev/null
        [[ $? == 0 ]] && echo "emptying $FILE" && sudo echo -n >$FILE && continue
        echo "patching $FILE \n"
        sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' $FILE
        sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' $FILE
    done
done

 

Step 2

 



[ ! -d $HOME/Library/LaunchAgents ] && mkdir $HOME/Library/LaunchAgents
AGENT=$HOME/Library/LaunchAgents/environment.plist
sysctl -n machdep.cpu.brand_string | grep Ryzen >/dev/null 2>&1
x=$(echo $(($? != 0 ? 5 : 4)))
cat >$AGENT <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>mkl-debug</string>
    <key>ProgramArguments</key>
    <array>
    <string>sh</string>
    <string>-c</string>
        <string>launchctl setenv MKL_DEBUG_CPU_TYPE $x;</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>
EOF
launchctl load ${AGENT} >/dev/null 2>&1
launchctl start ${AGENT} >/dev/null 2>&1

# Reboot after this step and it should work now. Sigh. Have to hard reboot unfortunately for me.


## Revert the previous script in case you brick something



for file in MMXCore FastCore TextModel libiomp5.dylib; do
    find /Applications/Adobe* -type f -name $file | while read -r FILE; do
        sudo -v
        [[ -f ${FILE}.back ]] && echo "found backup $FILE" && sudo mv -f ${FILE}.back $FILE
    done
done

AGENT=$HOME/Library/LaunchAgents/environment.plist
if [[ -f $AGENT ]]; then
    launchctl unload ${AGENT} >/dev/null 2>&1
    launchctl stop ${AGENT} >/dev/null 2>&1
    rm -rf $AGENT
fi

Script to Change your CPU Name in About this Mac for Cosmetic Reasons. Copy and paste this into a new file, cpu_name.sh - then run it with

sh cpu_name.sh. In case you want to have a different name, you can add it under the if block as a cpu_name="My Hackintosh" which will override the original variable. Should show after reboot. I set a custom name because "Ryzen" made it too long to display the full name.

 

image.png.a55bf05455ff3721c044305997718e42.png

 



#!/bin/bash

locale=`defaults read -g AppleLocale | cut -c 1-2`
cpu_name=`sysctl -n machdep.cpu.brand_string | sed -e 's/ *$//'`
target="/System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/Resources/${locale}.lproj/AppleSystemInfo.strings"

if [ $# -ge 1 ]; then
  cpu_name=$1
fi

echo "Locale: $locale"
echo "New Name: $cpu_name"
read -p "ok? (y/n): " yn

case $yn in
  [yY])
    sudo mount -uw / &&
    sudo cp $target $target.`date +%Y%m%d%H%M` &&
    sudo plutil -replace IntelSpeedAndTypeFormat -string "%1\$@ $cpu_name" $target
    echo "Finished."
    ;;
  *) echo "Aborted."
esac

 

Some benchmarks for @fabiosun

 

  Reveal hidden contents

 

 

image.png.6144b381a12efdfe13c4ddd39613d668.png

image.png.31dff191fbc11b0eec38860f094025c3.png

 

 

 

 

 

Thanks for replying.

 

I have reset CMOS and NVRAM a number of times and have CSM Disabled and Above 4G Encoding Enabled.

 

When I get back, I'll try removing all the other NVMes and SSD/HDDs and see how it goes.

Link to comment
Share on other sites

5 minutes ago, Ploddles said:

 

Catalina, Mojave and Big Sur will not run with a Nvidia 1080 graphics card. You need an older supported Nvidia card or an AMD one. @meina222's EFI is a few pages back, you can download it from there.

I know I'm trying to load High Sierra I tried the EFI and got PCi error removed the npci boot argument and does the same thing loading bar almost finishes and then computer reboots..

Link to comment
Share on other sites

8 minutes ago, TheDantee said:

I know I'm trying to load High Sierra I tried the EFI and got PCi error removed the npci boot argument and does the same thing loading bar almost finishes and then computer reboots..

Ah, OK. Good luck, you have got further than me so far. 🙂

 

Link to comment
Share on other sites

@TheDantee - temporarily away from my PC. Will share in a few hours. I made a lot of changes to my EFI fitting my hardware  (device properties section, USB remapping/disable and zfs NVME disable SSDT's) so whatever I posted earlier would work better for you. The one I had earlier it is very similar to what @iGPU had shared before. If that doesn't work check your BIOS settings.

 

Mine works with:

 

CSM off

4G off

PCIE all auto (except 4x4x4x4 bifurcation for my AIC slot which I later disable the NVMEs in via spoofing in a SSDT trick I learned form tonymac)

SMT off - I presume you have this or else Catalina won't boot with 128 logical CPUs

MMIO ans Virtualization is enabled but then DevirtualizeMMIO is ON in config.plist

 

I would try an SSDT to disable that Nvidia GPU or temorarily unplug it in favor of an AMD one and try again.

 

Also, please share your OC log screenshot at time of error so others can chime in.

 

Link to comment
Share on other sites

9 minutes ago, meina222 said:

@TheDantee - temporarily away from my PC. Will share in a few hours. I made a lot of changes to my EFI fitting my hardware  (device properties section, USB remapping/disable and zfs NVME disable SSDT's) so whatever I posted earlier would work better for you. The one I had earlier it is very similar to what @iGPU had shared before. If that doesn't work check your BIOS settings.

 

Mine works with:

 

CSM off

4G off

PCIE all auto (except 4x4x4x4 bifurcation for my AIC slot which I later disable the NVMEs in via spoofing in a SSDT trick I learned form tonymac)

SMT off - I presume you have this or else Catalina won't boot with 128 logical CPUs

MMIO ans Virtualization is enabled but then DevirtualizeMMIO is ON in config.plist

 

I would try an SSDT to disable that Nvidia GPU or temorarily unplug it in favor of an AMD one and try again.

 

Also, please share your OC log screenshot at time of error so others can chime in.

 

Theres no OC Error it makes through the entire verbose stuff and then shows the apple logo and a loading bar for the installer but around 90-95% freezes then computer restarts. I run linux as a daily currently with my 2 NVMe Drives in a MDADM Raid array formatted in EXT4 could this cause the issue?

Edited by TheDantee
Link to comment
Share on other sites

Don't know but I don't have RAID enabled in BIOS. RAID is notoriously finicky even in non hack settings. For Linux / Proxmox I use zfs 10 software RAID and hasn't let me down. I would disable RAID in BIOS and re-try. Can also show you how to spoof the NVMEs so MacOS doesn't try to auto mount them.

Link to comment
Share on other sites

5 minutes ago, meina222 said:

Don't know but I don't have RAID enabled in BIOS. RAID is notoriously finicky even in non hack settings. For Linux / Proxmox I use zfs 10 software RAID and hasn't let me down. I would disable RAID in BIOS and re-try. Can also show you how to spoof the NVMEs so MacOS doesn't try to auto mount them.

I tried the EFI with Catalina instead of High Sierra and it loaded fine I used @fabiosun config.plist for High Sierra but doesnt work for me even used the exact same Kexts and everything. MDADM is a software raid.

Edited by TheDantee
Link to comment
Share on other sites

@iGPU, I was considering trying that next. Have you tried yourself? I actually am typing this from my Big Sur Proxmox beta 4 and I really like it - it's behaving very well in the VM, so want to check it out on the bare metal. I think I will create a USB and try to boot in a bit.

 

I created a custom USBPorts.kext where I trimmed my USB ports and assigned what I thought were the correct types in Catalina. Kept 4 USB 2.0 ports, 4 USB 3 ports and the 2 USB-C switch ports, while losing 3 USB 3 ports, which I wasn't quite sure if I should map since they seemed attached in a weird / unique names (not PRTx or HSx).  This didn't make a difference for sleep and shutdown. I also noticed that in bare metal the power management of the CPU must be lacking as my fans ramp up a bit more and exhaust much more hot air than in Proxmox where the host is doing the power management. Haven't checked if NVRAM works yet.

Edited by meina222
Link to comment
Share on other sites

  • Moderators

I've been mostly working on NVRAM (which does not work) and Shutdown. No success with either, but maybe getting closer as I'll describe below.

 

Meanwhile, I've managed to get better creation of EC and MCHC, as compared to how they function on the Intel side. They should work on all of our TRX40 mobos.

 

I think I also have one for NVRAM, but I was reading on Discord (responses to fabiosun) about how our use of DevirtualiseMmio may have broken NVRAM. So I've spent most of this afternoon chasing down MmioWhitelist. I found the following using OC debug (this may only apply to the 3970X chip: I honestly don't know. The numbers to the right are the calcuated values of the hex humber on the left.

 

Spoiler

18:245 00:002 OCABC: MMIO devirt start

 

0 MMIO devirt 0xB2100000 (0x81 pages, 0x8000000000000001) 2987393024

1 MMIO devirt 0xB3180000 (0x81 pages, 0x8000000000000001) 3004694528

2 MMIO devirt 0xEF100000 (0x181 pages, 0x8000000000000001) 4010803200

3 MMIO devirt 0xFA180000 (0x81 pages, 0x8000000000000001) 4195876864

4 MMIO devirt 0xFA300000 (0x100 pages, 0x8000000000000001) 4197449728

5 MMIO devirt 0xFEA00000 (0x100 pages, 0x8000000000000001) 4271898624

6 MMIO devirt 0xFEC00000 (0x1 pages, 0x8000000000000001) 4273995776

7 MMIO devirt 0xFEC10000 (0x1 pages, 0x8000000000000001) 4274061312

8 MMIO devirt 0xFED00000 (0x1 pages, 0x8000000000000001) 4275044352

9 MMIO devirt 0xFED40000 (0x5 pages, 0x8000000000000001) 4275306496

10 MMIO devirt 0xFED80000 (0x10 pages, 0x8000000000000001) 4275568640

11 MMIO devirt 0xFEDC2000 (0xE pages, 0x8000000000000001) 4275838976

12 MMIO devirt 0xFEDD4000 (0x2 pages, 0x8000000000000001) 4275912704

13 MMIO devirt 0xFEE00000 (0x100 pages, 0x8000000000000001) 4276092928

14 MMIO devirt 0xFF000000 (0x1000 pages, 0x8000000000000001) 4278190080

15 MMIO devirt 0x4070000000 (0x10400 pages, 0x8000000000000001) 276756955136

16 MMIO devirt 0x8BD0000000 (0x10400 pages, 0x8000000000000001) 600490115072

17 MMIO devirt 0x8C00000000 (0x10400 pages, 0x8000000000000001) 601295421440

18 MMIO devirt 0xD760000000 (0x10400 pages, 0x8000000000000001) 925028581376

 

18:287 00:002 OCABC: MMIO devirt end, saved 1087664 KB

18:289 00:002 OCABC: Only 128/256 slide values are usable!

18:291 00:002 OCABC: Valid slides - 128-255

 

They end up being plugged into OC:

Spoiler

		<key>MmioWhitelist</key>
		<array>
			<dict>
				<key>Address</key>
				<integer>2987393024</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xB2100000 (0x81 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>3004694528</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xB3180000 (0x81 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4010803200</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xEF100000 (0x181 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4195876864</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFA180000 (0x81 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4197449728</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFA300000 (0x100 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4271898624</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFEA00000 (0x100 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4273995776</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFEC00000 (0x1 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4274061312</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFEC10000 (0x1 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4275044352</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFED00000 (0x1 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4275306496</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFED40000 (0x5 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4275568640</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFED80000 (0x10 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4275838976</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFEDC2000 (0xE pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4275912704</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFEDD4000 (0x2 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4276092928</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFEE00000 (0x100 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>4278190080</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xFF000000 (0x1000 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>276756955136</integer>
				<key>Comment</key>
				<string>MMIO devirt 0x4070000000 (0x10400 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<false/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>600490115072</integer>
				<key>Comment</key>
				<string>MMIO devirt 0x8BD0000000 (0x10400 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<false/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>601295421440</integer>
				<key>Comment</key>
				<string>MMIO devirt 0x8C00000000 (0x10400 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<false/>
			</dict>
			<dict>
				<key>Address</key>
				<integer>925028581376</integer>
				<key>Comment</key>
				<string>MMIO devirt 0xD760000000 (0x10400 pages, 0x8000000000000001)</string>
				<key>Enabled</key>
				<true/>
			</dict>
		</array>

 

 

When I ran tests, turning each one on at a time and re-booting, I found that I could boot into macOS, with DevirtualiseMmio enabled, if the following were enabled: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 18 and the following disabled: 15, 16, 17. That's what's reflected in the above table. Now I'm trying to figure out what to do with this information. From the Discord comments, it sounds like we want to now disable DevirtualiseMmio to get NVRAM working. More testing later.

 

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

NVRAM works for me only in certain conditions. (I think)

 

If it's a shutdown while I'm still in the OC Picker screen (manual, power off from PC case), it seems to hold. However, any shut down/reboot while within MacOS, whether software or hardware, causes NVRAM issues. I had previously thought this was due to RTC, but NVRAM would make more sense, and not be too far off from the real root cause. 

 

Another thing I found, CFG-Lock doesn't seem to be supported, at least on the AsRock Creator MB, and I've read for AMD CPUs, it was something that was recommended for boot issues as well. I went through the BIOS using UEFITool.

 

The method I was planning on experimenting with Big Sur and Catalina, was through loading the UEFI from Catalina, and then booting through selecting the Big Sur volume, since I had done a full BS install on NVME and not a qemu disk, but I haven't tried it yet. I do agree that Big Sur through Proxmox has functioned a lot more stable than Catalina so far, at least in terms of application compatibility goes. A lot of my development tools tend to work with their command line counterparts vs breaking in the GUI versions, which include Docker, VirtualBox, etc. Parallels 13.1.0 works with Catalina, but not the latest, due to using VirtualBox and not Apple's Hypervisor, and picks up the host CPU/GPU. I still need to figure out how to fully virtualize (or likely Dual boot Ubuntu) because AMD's ROCm drivers aren't supported on MacOS.

Link to comment
Share on other sites

  • Moderators
14 minutes ago, tsongz said:

Another thing I found, CFG-Lock doesn't seem to be supported, at least on the AsRock Creator MB, and I've read for AMD CPUs, it was something that was recommended for boot issues as well. I went through the BIOS using UEFITool.

 

CFG Lock doesn't apply to AMD.

Link to comment
Share on other sites

  • Moderators

I did some more testing of MmioWhitelist and DevirtualiseMmio, and I don't understand it.

 

Back-to-the-future: we now know that proper Shutdown requires a proper MmioWhitelist for you mobo. See this post (future) to create that list.

 

I thought the idea was to be able to disable DevirtualiseMmio, since this is supposedly confounding NVRAM. I obtained a set of MmioWhitelist that allowed booting, but while DevirtualiseMmio was enabled. I then disabled DevirtualiseMmio and used the bootable MmioWhitelist to attempt to boot into Catalina. It did not boot. I then reversed the enabled/disabled items in MmioWhitelist, and this too did not boot (DevirtualiseMmio was again disabled).

 

So I fail to see the benefit of MmioWhitelist since no matter what their settings, DevirtualiseMmio needs to be enabled. Can someone please enlighten me?

 

 

Edited by iGPU
Obsolete; link to future provided.
Link to comment
Share on other sites

I confirmed NVRAM writes don't persist between reboots.

 

I tried reading about KASLR and slides from various sources and failed to understand what DevirtualiseMmio really means (cannot help but notice the British spelling, something never seen in technical literature for 'virtualization').

 

Also contrary to the link and other sources posted enabling above 4G always results OC rebooting my PC after encountering errors. I did not record them, but did notice something from Lilu along the lines of  '(Lilu) Lilu: rtc @ rtc read failure 1 bytes from ...'. Also it seems to fail after printing a message about 'pci configuration' - no halt, just rebooting. This happens with both my current EFI and the salvage USB that I 1st managed to boot with. So for me no 4G. I disabled everything off my BIOS that I don't care about - legacy USB, motherboard LED, CSM. 

Link to comment
Share on other sites

  • Supervisor

@iGPUon insanelymac forum, opencore discussion there is a my discussion about whitelisting with download fritz opencore developer

it also explained how to

i can’t find by now the discussion

but was done on January about in that time

he stated then patches were borked 

today I can say maybe he was wrong

  • Like 1
Link to comment
Share on other sites

From OC manual

 

DevirtualiseMmio
Typeplist boolean
Failsafefalse
Description: Remove runtime attribute from select MMIO regions. This option reduces stolen memory footprint from the memory map by removing runtime bit for known memory regions. This quirk may result in the increase of KASLR slides available, but is not necessarily compatible with the target board without additional measures. In general this frees from 64 to 256 megabytes of memory (present in the debug log), and on some platforms it is the only way to boot macOS, which otherwise fails with allocation error at bootloader stage. This option is generally useful on all firmwares except some very old ones, like Sandy Bridge. On select firmwares it may require a list of exceptional addresses that still need to get their virtual addresses for proper NVRAM and hibernation functioning. Use MmioWhitelist section to do this.

 

Based on this, it maybe pointless to try to disable it, as it seems it is recommended to be enabled for most modern firmwares.

Edited by meina222
Link to comment
Share on other sites

MmioWhitelist Properties

1. Address
Typeplist integer
Failsafe0
Description: Exceptional MMIO address, which memory descriptor should be left virtualised (unchanged) by 
DevirtualiseMmio. This means that the firmware will be able to directly communicate with this memory region during operating system functioning, because the region this value is in will be assigned a virtual address. The addresses written here must be part of the memory map, have EfiMemoryMappedIO type and EFI_MEMORY_RUNTIME attribute (highest bit) set. To find the list of the candidates the debug log can be used.

 

It does not say, that supplying these addresses means you can now disable DevirtualiseMmio - on the contrary, that you only provide an exception list to it.

Link to comment
Share on other sites

  • fabiosun changed the title to [Discussion] - TRX40 Bare Metal - Vanilla Patches

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.