VirtualBox

Changeset 81605 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Oct 31, 2019 2:29:46 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134362
Message:

VMM (and related changes): Add support for Hygon Dhyana CPUs. Modified and improved contribution by Hongyong Zang submitted under MIT license. Thank you!

Location:
trunk/src/VBox/HostDrivers/Support
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp

    r81304 r81605  
    41504150
    41514151            /* Check if the vendor is AMD (or compatible). */
    4152             if (ASMIsAmdCpuEx(uVendorEbx, uVendorEcx, uVendorEdx))
     4152            if (   ASMIsAmdCpuEx(uVendorEbx, uVendorEcx, uVendorEdx)
     4153                || ASMIsHygonCpuEx(uVendorEbx, uVendorEcx, uVendorEdx))
    41534154            {
    41544155                uint32_t fExtFeatEcx, uExtMaxId;
     
    45124513                }
    45134514            }
    4514             else if (ASMIsAmdCpuEx(uVendorEBX, uVendorECX, uVendorEDX))
     4515            else if (   ASMIsAmdCpuEx(uVendorEBX, uVendorECX, uVendorEDX)
     4516                     || ASMIsHygonCpuEx(uVendorEBX, uVendorECX, uVendorEDX))
    45154517            {
    45164518                /* Not well documented, but at least all AMD64 CPUs support this. */
  • trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp

    r81106 r81605  
    18011801    ASMCpuId(0, &uEAX, &uEBX, &uECX, &uEDX);
    18021802    if (   ASMIsValidStdRange(uEAX)
    1803         && ASMIsAmdCpuEx(uEBX, uECX, uEDX))
     1803        && (ASMIsAmdCpuEx(uEBX, uECX, uEDX) || ASMIsHygonCpuEx(uEBX, uECX, uEDX)) )
    18041804    {
    18051805        /* Check for APM support. */
     
    40214021            && ASMIsValidStdRange(ASMCpuId_EAX(0))
    40224022            && (ASMCpuId_EDX(1) & X86_CPUID_FEATURE_EDX_HTT)
    4023             && (   !ASMIsAmdCpu()
     4023            && (   (!ASMIsAmdCpu() && !ASMIsHygonCpu())
    40244024                || ASMGetCpuFamily(u32Tmp = ASMCpuId_EAX(1)) > 0x15
    40254025                || (   ASMGetCpuFamily(u32Tmp)   == 0x15           /* Piledriver+, not bulldozer (FX-4150 didn't like it). */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette