VirtualBox

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/ValidationKit/bootsectors
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-decoding-1.c32

    r76553 r81605  
    882882    bool fIsAmd = false;
    883883    if (g_uBs3CpuDetected & BS3CPU_F_CPUID)
    884         fIsAmd = ASMIsAmdCpu();
     884        fIsAmd = ASMIsAmdCpu() || ASMIsHygonCpu();
    885885    Bs3TestPrintf("fIsAmd=%d\n", fIsAmd);
    886886
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c

    r76886 r81605  
    47484748            CASE_PRED(BS3CG1PRED_VENDOR_VIA,   pThis->bCpuVendor == BS3CPUVENDOR_VIA);
    47494749            CASE_PRED(BS3CG1PRED_VENDOR_SHANGHAI, pThis->bCpuVendor == BS3CPUVENDOR_SHANGHAI);
     4750            CASE_PRED(BS3CG1PRED_VENDOR_HYGON, pThis->bCpuVendor == BS3CPUVENDOR_HYGON);
    47504751
    47514752#undef CASE_PRED
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h

    r76886 r81605  
    776776    BS3CG1PRED_VENDOR_VIA,
    777777    BS3CG1PRED_VENDOR_SHANGHAI,
     778    BS3CG1PRED_VENDOR_HYGON,
    778779
    779780    BS3CG1PRED_END
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-weird-1-x0.c

    r76553 r81605  
    324324        Bs3TrapSetJmpAndRestore(&Ctx, &TrapCtx);
    325325        Bs3RegSetDr7(0);
    326         if (g_enmCpuVendor == BS3CPUVENDOR_AMD)
     326        if (g_enmCpuVendor == BS3CPUVENDOR_AMD || g_enmCpuVendor == BS3CPUVENDOR_HYGON)
    327327            bs3CpuWeird1_CompareDbgInhibitRingXfer(&TrapCtx, &Ctx, X86_XCPT_DB, offTestLabel, cbSpAdjust,
    328328                                                   X86_DR6_INIT_VAL | X86_DR6_B0, cbIretFrameInt, uHandlerRspInt);
     
    341341
    342342        Bs3TrapSetJmpAndRestore(&Ctx, &TrapCtx);
    343         if (g_enmCpuVendor == BS3CPUVENDOR_AMD)
     343        if (g_enmCpuVendor == BS3CPUVENDOR_AMD || g_enmCpuVendor ==  BS3CPUVENDOR_HYGON)
    344344            bs3CpuWeird1_CompareDbgInhibitRingXfer(&TrapCtx, &Ctx, X86_XCPT_DB, offTestLabel, cbSpAdjust,
    345345                                                   X86_DR6_INIT_VAL | X86_DR6_B0, cbIretFrameInt, uHandlerRspInt);
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-GetCpuVendor.c

    r76886 r81605  
    4545        if (ASMIsShanghaiCpuEx(uEbx, uEcx, uEdx))
    4646            return BS3CPUVENDOR_SHANGHAI;
     47        if (ASMIsHygonCpuEx(uEbx, uEcx, uEdx))
     48            return BS3CPUVENDOR_HYGON;
    4749        return BS3CPUVENDOR_UNKNOWN;
    4850    }
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h

    r76886 r81605  
    15381538    BS3CPUVENDOR_CYRIX,
    15391539    BS3CPUVENDOR_SHANGHAI,
     1540    BS3CPUVENDOR_HYGON,
    15401541    BS3CPUVENDOR_UNKNOWN,
    15411542    BS3CPUVENDOR_END
Note: See TracChangeset for help on using the changeset viewer.

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