Ryzen 7000 Testing

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
 
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);
    }
 
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
 
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.
 
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.)
 
  • Like
Reactions: etorix and CaseySJ
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.
 
  • Like
Reactions: ExtremeXT
** 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

@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.
 
  • Love
  • Haha
Reactions: etorix and CaseySJ
Doing AMD patches, dumb question, is the 7950 consider a 32 core cpu or 16 core (32 threads) cpu?

BA20 vs BA10 for example
 
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.
 
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!!
 
  • Like
Reactions: ExtremeXT
@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!! :)
 
  • Like
Reactions: ExtremeXT
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?
 
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
 
  • Like
Reactions: ExtremeXT
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

EFI has the scrubbed config and I didn't bother to update the SysReport variable for it, but otherwise it's intact.

TY!
 

Attachments

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
 
  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.