Ryzen 7000 Testing

PoMpIs

Well-known member
AMD OS X Member
Joined
Jul 8, 2021
Messages
292
@CaseySJ

This is with your latest opencore.efi debug
 

Attachments

  • opencore-2022-11-19-163606.txt
    256 KB · Views: 3

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
And this...

Screen Shot 2022-11-19 at 8.42.52 AM.png

Looks like we can cover all of the AMD parts with:
  • Family = 0x0F
  • ExtFamily = 0x08 and 0x0A
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
This is the near-final code
  • We will apply modified FSB and TSC calculations only when CPU Family is 0xF and CPU Extended Family is either 0x8 or 0xA
  • We will remove the second DEBUG statement because it is superfluous
C:
  //
  // Perform TSC and FSB calculations. This is traditionally done in tsc.c in XNU.
  //
  // For AMD Processors
  if (CpuInfo->Family == 0xF && (CpuInfo->ExtFamily == 0x8 || CpuInfo->ExtFamily == 0xA)) {
        DEBUG ((DEBUG_INFO, "OCAK: Setting FSB and TSC for Family %d and ExtFamily %d\n", (UINT16)CpuInfo->Family, (UNIT16)CpuInfo->ExtFamily));

        busFreqValue    = CpuInfo->FSBFrequency;
        busFCvtt2nValue = DivU64x64Remainder ((1000000000ULL << 32), busFreqValue, NULL);
        busFCvtn2tValue = DivU64x64Remainder(((1000000000ULL) << 32), busFCvtt2nValue, NULL);

        tscFreqValue    = CpuInfo->CPUFrequency;
        tscFCvtt2nValue = DivU64x64Remainder ((1000000000ULL << 32), tscFreqValue, NULL);
        tscFCvtn2tValue = DivU64x64Remainder(((1000000000ULL)  << 32), tscFCvtt2nValue, NULL);
  }
  // For all other processors
  else {
        busFreqValue    = CpuInfo->FSBFrequency;
        busFCvtt2nValue = DivU64x64Remainder ((1000000000ULL << 32), busFreqValue, NULL);
        busFCvtn2tValue = DivU64x64Remainder (0xFFFFFFFFFFFFFFFFULL, busFCvtt2nValue, NULL);

        tscFreqValue    = CpuInfo->CPUFrequency;
        tscFCvtt2nValue = DivU64x64Remainder ((1000000000ULL << 32), tscFreqValue, NULL);
        tscFCvtn2tValue = DivU64x64Remainder (0xFFFFFFFFFFFFFFFFULL, tscFCvtt2nValue, NULL);
    }
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
Unfortunately, the issue is still not FULLY fixed on AMD APUs, but provides a very significant improvement.

15:660 00:044 OCAK: Setting FSB and TSC for Family F and ExtFamily A
15:687 00:027 OCAK: BusFreq = 102585215Hz, BusFCvtt2n = 41867312906, BusFCvtn2t = 102585215
15:711 00:023 OCAK: TscFreq = 3693067744Hz, TscFCvtt2n = 1162980912, TscFCvtn2t = 3693067746
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Unfortunately, the issue is still not FULLY fixed on AMD APUs, but provides a very significant improvement.

15:660 00:044 OCAK: Setting FSB and TSC for Family F and ExtFamily A
15:687 00:027 OCAK: BusFreq = 102585215Hz, BusFCvtt2n = 41867312906, BusFCvtn2t = 102585215
15:711 00:023 OCAK: TscFreq = 3693067744Hz, TscFCvtt2n = 1162980912, TscFCvtn2t = 3693067746
Which processor is this from? Did the user experience audio stutter? Those frequencies will change from boot to boot, so we have to listen for stutter.
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
Which processor is this from? Did the user experience audio stutter?
AMD Ryzen 5 3400G. With vanilla OpenCore and without Speedkeeper it sounds like it did on Zen 4 with the same conditions, and with your OpenCore and no Speedkeeper it sounds fairly well, but Speedkeeper still improves it a bit (these are according to the user, I'll try to get more people to test and test it myself on my AMD laptop.)
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
AMD Ryzen 5 3400G. With vanilla OpenCore and without Speedkeeper it sounds like it did on Zen 4 with the same conditions, and with your OpenCore and no Speedkeeper it sounds fairly well, but Speedkeeper still improves it a bit (these are according to the user, I'll try to get more people to test and test it myself on my AMD laptop.)
Good feedback.

This is why we want to test this on as many different AMD processors as possible. I'll post the new Beta 3 build shortly (no functional change in it though), then begin my own testing on AM4.
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
** OpenCore Beta Build #3 **

This build has no functional change. It only revises the if-condition more strictly to apply only to Family 0xF and Extended Family 0x8 and 0xA. Both debug-mode and release-mode builds are provided.

We would like to test either of these files on as many different AMD processors (especially AMD processors with built-in graphics -- APUs) as possible.

If any audio stutter or other issue such as strange time/clock display is found, please report all relevant details.
 

Attachments

  • DEBUG.zip
    417.2 KB · Views: 8
  • RELEASE.zip
    268.2 KB · Views: 16

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
@CaseySJ
So apparently the user's locally downloaded audio file was corrupted as they said they heard the exact same crackles on Windows as well. They listened to the same song on YouTube for 5 minutes and ruled it out as perfect, same as Windows! I'll ask them to test the new one too.
 

drmeatball

Donator
Donator
AMD OS X Member
Joined
Jul 17, 2020
Messages
25
Doing AMD patches, dumb question, is the 7950 consider a 32 core cpu or 16 core (32 threads) cpu?

BA20 vs BA10 for example
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
Doing AMD patches, dumb question, is the 7950 consider a 32 core cpu or 16 core (32 threads) cpu?

BA20 vs BA10 for example
You need the core count, not thread, so it'll be BA10.

User reported beta 3 also working perfectly.
 

drmeatball

Donator
Donator
AMD OS X Member
Joined
Jul 17, 2020
Messages
25
Where <core count> is replaced with the physical core count of your CPU in hexadecimal. For example, an 8-Core 5800X would have the new Replace value be:

Missed it TY!!
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
@CaseySJ
So apparently the user's locally downloaded audio file was corrupted as they said they heard the exact same crackles on Windows as well. They listened to the same song on YouTube for 5 minutes and ruled it out as perfect, same as Windows! I'll ask them to test the new one too.
Phew, that was close!! :)
 

drmeatball

Donator
Donator
AMD OS X Member
Joined
Jul 17, 2020
Messages
25
Hopefully I did this right.. would you be willing to see if I missed anything?

Beta 3 - Debug

EDIT - boots and runs for about 10 seconds, usually freezes at a random spot.
 

Attachments

  • config-scrubbed.plist
    42.8 KB · Views: 1
  • opencore-2022-11-19-125943.txt
    256 KB · Views: 5

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
Hopefully I did this right.. would you be willing to see if I missed anything?

Beta 3 - Debug
Can you send the SysReport folder and the whole EFI folder?
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Hopefully I did this right.. would you be willing to see if I missed anything?

Beta 3 - Debug
Thanks -- this is done correctly!

32:494 00:015 OCAK: Setting FSB and TSC for Family 15 and ExtFamily 10
32:501 00:006 OCAK: BusFreq = 102080689Hz, BusFCvtt2n = 42074238899, BusFCvtn2t = 102080689
32:507 00:006 OCAK: TscFreq = 4491550323Hz, TscFCvtt2n = 956232700, TscFCvtn2t = 4491550326
 

fabiosun

Guru
Guru
AMD OS X Member
Joined
Oct 9, 2022
Messages
470
Hopefully I did this right.. would you be willing to see if I missed anything?

Beta 3 - Debug

EDIT - boots and runs for about 10 seconds, usually freezes at a random spot.

this is your previous posted config with MMIO converted and enabled following "the zen 4 Schema"
fill @CaseySJ request to serif you have also to adjust ACPI part
 

Attachments

  • config-scrubbed.plist.zip
    6.8 KB · Views: 4

drmeatball

Donator
Donator
AMD OS X Member
Joined
Jul 17, 2020
Messages
25
EFI has the scrubbed config and I didn't bother to update the SysReport variable for it, but otherwise it's intact.

TY!
 

Attachments

  • SysReport.zip
    101.1 KB · Views: 3
  • EFI.zip
    1.6 MB · Views: 14

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Posting this from my Gigabyte B550 Vision D with Ryzen 7 3700X.

No audio or other issues with the Beta 3 OpenCore.efi.

Screen Shot 2022-11-19 at 10.13.52 AM.png
 
Back
Top Bottom
  AdBlock Detected
Sure, ad-blocking software does a great job at blocking ads, but it also blocks some useful and important features of our website. For the best possible site experience please take a moment to disable your AdBlocker.