VirtualBox

Changeset 106373 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Oct 16, 2024 1:38:57 PM (3 months ago)
Author:
vboxsync
Message:

VMM/NEMR3Native-darwin-armv8.cpp: Crude workaround for getting Windows/ARM booting as a guest because it assumes a working PMU which AppleSilicon hardware doesn't support, bugref:10732

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin-armv8.cpp

    r106372 r106373  
    17311731    {
    17321732        RT_NOREF(pVM);
    1733         rcStrict = CPUMQueryGuestSysReg(pVCpu, idSysReg, &u64Val);
     1733
     1734        /** @todo Windows assumes a working PMU which is not available on AppleSilicon. It uses it
     1735         * to determine the base frequency it seems (because without the * 100 multiplier the frequency
     1736         * is detetcted as 24MHz. This needs to be moved into a separate PMU emulation (to be created) for
     1737         * all backends to share (Linux/KVM when running on AppleSilicon hardware). */
     1738        if (   idSysReg == ARMV8_AARCH64_SYSREG_PMCR_EL0
     1739            || idSysReg == ARMV8_AARCH64_SYSREG_PMCCNTR_EL0)
     1740        {
     1741            if (idSysReg == ARMV8_AARCH64_SYSREG_PMCCNTR_EL0)
     1742            {
     1743                u64Val = ASMReadTSC() * 100;
     1744            }
     1745            else
     1746                u64Val = 0;
     1747        }
     1748        else
     1749            rcStrict = CPUMQueryGuestSysReg(pVCpu, idSysReg, &u64Val);
    17341750        Log4(("SysInsnExit/%u: %08RX64: READ %u:%u:%u:%u:%u -> %#RX64 rcStrict=%Rrc\n",
    17351751              pVCpu->idCpu, pVCpu->cpum.GstCtx.Pc.u64, uOp0, uOp1, uCRn, uCRm, uOp2, u64Val,
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