VirtualBox

Changeset 76886 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Jan 18, 2019 10:57:02 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128254
Message:

VMM (and related changes): Add support for Shanghai/Zhaoxin CPUs. Modified and improved contribution by Journey Ren submitted under MIT license. Thank you!

Location:
trunk/src/VBox/ValidationKit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c

    r76553 r76886  
    47474747            CASE_PRED(BS3CG1PRED_VENDOR_INTEL, pThis->bCpuVendor == BS3CPUVENDOR_INTEL);
    47484748            CASE_PRED(BS3CG1PRED_VENDOR_VIA,   pThis->bCpuVendor == BS3CPUVENDOR_VIA);
     4749            CASE_PRED(BS3CG1PRED_VENDOR_SHANGHAI, pThis->bCpuVendor == BS3CPUVENDOR_SHANGHAI);
    47494750
    47504751#undef CASE_PRED
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h

    r76579 r76886  
    775775    BS3CG1PRED_VENDOR_INTEL,
    776776    BS3CG1PRED_VENDOR_VIA,
     777    BS3CG1PRED_VENDOR_SHANGHAI,
    777778
    778779    BS3CG1PRED_END
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-GetCpuVendor.c

    r76553 r76886  
    4343        if (ASMIsViaCentaurCpuEx(uEbx, uEcx, uEdx))
    4444            return BS3CPUVENDOR_VIA;
     45        if (ASMIsShanghaiCpuEx(uEbx, uEcx, uEdx))
     46            return BS3CPUVENDOR_SHANGHAI;
    4547        return BS3CPUVENDOR_UNKNOWN;
    4648    }
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h

    r76579 r76886  
    15371537    BS3CPUVENDOR_VIA,
    15381538    BS3CPUVENDOR_CYRIX,
     1539    BS3CPUVENDOR_SHANGHAI,
    15391540    BS3CPUVENDOR_UNKNOWN,
    15401541    BS3CPUVENDOR_END
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r76553 r76886  
    30973097        return sCpuDesc.startswith("VIA") or sCpuDesc == 'CentaurHauls';
    30983098
     3099    def isHostCpuShanghai(self, fQuiet = False):
     3100        """
     3101        Checks if the host CPU vendor is Shanghai (or Zhaoxin).
     3102
     3103        Returns True / False.
     3104        """
     3105        sCpuDesc = self._getHostCpuDesc(fQuiet);
     3106        return sCpuDesc.startswith("ZHAOXIN") or sCpuDesc.strip(' ') == 'Shanghai';
     3107
    30993108    def isHostCpuP4(self, fQuiet = False):
    31003109        """
  • trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py

    r76553 r76886  
    443443                elif self.isViaIncompatible() and oTestDrv.isHostCpuVia():
    444444                    fRc = None; # Skip the test.
     445                elif self.isShanghaiIncompatible() and oTestDrv.isHostCpuShanghai():
     446                    fRc = None; # Skip the test.
    445447                elif self.isP4Incompatible() and oTestDrv.isHostCpuP4():
    446448                    fRc = None; # Skip the test.
     
    561563            return True;
    562564        return False;
     565
     566    def isShanghaiIncompatible(self):
     567        """
     568        Identifies VMs that doesn't work on Shanghai.
     569
     570        Returns True if NOT supported on Shanghai, False if it IS supported.
     571        """
     572        # For now treat it just like VIA, to be adjusted later
     573        return self.isViaIncompatible()
    563574
    564575    def isP4Incompatible(self):
  • trunk/src/VBox/ValidationKit/testmanager/core/testbox.py

    r76553 r76886  
    504504                if uMod == 0x0a: return 'VIA_C7_C5J';
    505505                if uMod == 0x0f: return 'VIA_Isaiah';
     506        elif sCpuVendor == '  Shanghai  ':
     507            if uFam == 0x07:
     508                if uMod == 0x0b: return 'Shanghai_KX-5000';
    506509        return None;
    507510
     
    544547        if self.sCpuVendor == 'AuthenticAMD':     return 'AMD';
    545548        if self.sCpuVendor == 'CentaurHauls':     return 'VIA';
     549        if self.sCpuVendor == '  Shanghai  ':     return 'Shanghai';
    546550        return self.sCpuVendor;
    547551
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