VirtualBox

Changeset 50653 in vbox for trunk/src/VBox/VMM/tools


Ignore:
Timestamp:
Feb 28, 2014 3:44:55 PM (11 years ago)
Author:
vboxsync
Message:

Added a more recent K8 CPU to the CPU database.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp

    r50617 r50653  
    32713271    uint64_t fIgnMask = 0;
    32723272    uint64_t fGpMask  = 0;
    3273     rc = msrProberModifyBitChanges(uMsr + iGuineaPig + 1, &fIgnMask, &fGpMask, 0);
     3273    rc = msrProberModifyBitChanges(uMsr + iGuineaPig + 1, &fIgnMask, &fGpMask, 0x800); /* enabling it may cause trouble */
    32743274    if (RT_FAILURE(rc))
    32753275        return rc;
     
    33473347       running 64-bit win81pe. Not giving PAT such a scrutiny fixes it. */
    33483348    if (   uMsr != 0x00000277
    3349         || g_enmMicroarch >= kCpumMicroarch_Intel_Core7_First)
     3349        || (  g_enmVendor == CPUMCPUVENDOR_INTEL
     3350            ? g_enmMicroarch >= kCpumMicroarch_Intel_Core7_First
     3351            : g_enmVendor == CPUMCPUVENDOR_AMD
     3352            ? g_enmMicroarch != kCpumMicroarch_AMD_K8_90nm_AMDV
     3353            : true) )
    33503354    {
    33513355        /* Every 8 bytes is a type, check the type ranges one by one. */
     
    33703374static int reportMsr_Ia32MtrrDefType(uint32_t uMsr)
    33713375{
    3372     int rc = msrVerifyMtrrTypeGPs(uMsr, 0, 7);
    3373     if (RT_FAILURE(rc))
    3374         return rc;
    3375 
    33763376    uint64_t fGpMask  = 0;
    33773377    uint64_t fIgnMask = 0;
    3378     rc = msrProberModifyBitChanges(uMsr, &fIgnMask, &fGpMask, 0x7);
    3379     if (RT_FAILURE(rc))
    3380         return rc;
    3381     Assert(!(fGpMask & 7)); Assert(!(fIgnMask & 7));
     3378    if (g_enmMicroarch == kCpumMicroarch_AMD_K8_90nm_AMDV)
     3379    {
     3380        /* Problematic CPU! Fake it for now. */
     3381        fGpMask = ~(uint64_t)0xc07;
     3382        fIgnMask = 0;
     3383    }
     3384    else
     3385    {
     3386        int rc = msrVerifyMtrrTypeGPs(uMsr, 0, 7);
     3387        if (RT_FAILURE(rc))
     3388            return rc;
     3389
     3390        rc = msrProberModifyBitChanges(uMsr, &fIgnMask, &fGpMask, 0x7);
     3391        if (RT_FAILURE(rc))
     3392            return rc;
     3393        Assert(!(fGpMask & 7)); Assert(!(fIgnMask & 7));
     3394    }
    33823395
    33833396    return printMsrFunctionCpumCpuEx(uMsr, NULL, NULL, NULL, fIgnMask, fGpMask, NULL);
     
    36223635    /* Turns out there are more killer bits here, at least on Opteron 2384.
    36233636       Skipping all known bits. */
    3624     if (g_enmMicroarch >= kCpumMicroarch_AMD_K8_65nm /* Not sure when introduced - harmless? */)
     3637    if (g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm_AMDV /* Not sure when introduced - harmless? */)
    36253638        fSkipMask |= RT_BIT(22); /* Tom2ForceMemTypeWB */
    36263639    if (g_enmMicroarch >= kCpumMicroarch_AMD_K8_First)
     
    39423955        int         rc;
    39433956#if 0
    3944         if (uMsr < 0x00003170)
    3945             continue;
    3946         if (uMsr >= 0x00003170)
     3957        //if (uMsr < 0x00000000)
     3958        //    continue;
     3959        if (uMsr >= 0x00000277)
    39473960        {
    39483961            vbCpuRepDebug("produceMsrReport: uMsr=%#x (%s)...\n", uMsr, getMsrNameHandled(uMsr));
     
    41354148#else
    41364149
    4137     uint32_t uMsr = 0xc0000080;
     4150    uint32_t uMsr = 0xc0010010;
    41384151    uint64_t uValue = 0;
    41394152    msrProberRead(uMsr, &uValue);
    4140     /* Try for a triple fault... */
    4141     msrProberWrite(uMsr, uValue ^ MSR_K6_EFER_LME);
    4142     msrProberRead(uMsr, &uValue);
    4143     msrProberWrite(uMsr, uValue ^ MSR_K6_EFER_NXE);
     4153    reportMsr_AmdK8SysCfg(uMsr, uValue);
    41444154#endif
    41454155    return VINF_SUCCESS;
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