VirtualBox

Changeset 101549 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Oct 23, 2023 9:53:09 AM (14 months ago)
Author:
vboxsync
Message:

VMM/Armv8: Allow configuring the program counter reset value, bugref:10528

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

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

    r101539 r101549  
    363363    pVM->cpum.s.GuestInfo.paSysRegRangesR3 = &pVM->cpum.s.GuestInfo.aSysRegRanges[0];
    364364
     365    PCFGMNODE   pCpumCfg = CFGMR3GetChild(CFGMR3GetRoot(pVM), "CPUM");
     366
     367    /** @cfgm{/CPUM/ResetPcValue, string}
     368     * Program counter value after a reset, sets the address of the first isntruction to execute. */
     369    int rc = CFGMR3QueryU64Def(pCpumCfg, "ResetPcValue", &pVM->cpum.s.u64ResetPc, 0);
     370    AssertLogRelRCReturn(rc, rc);
     371
    365372    /*
    366373     * Register saved state data item.
    367374     */
    368     int rc = SSMR3RegisterInternal(pVM, "cpum", 1, CPUM_SAVED_STATE_VERSION, sizeof(CPUM),
    369                                    NULL, cpumR3LiveExec, NULL,
    370                                    NULL, cpumR3SaveExec, NULL,
    371                                    cpumR3LoadPrep, cpumR3LoadExec, cpumR3LoadDone);
     375    rc = SSMR3RegisterInternal(pVM, "cpum", 1, CPUM_SAVED_STATE_VERSION, sizeof(CPUM),
     376                               NULL, cpumR3LiveExec, NULL,
     377                               NULL, cpumR3SaveExec, NULL,
     378                               cpumR3LoadPrep, cpumR3LoadExec, cpumR3LoadDone);
    372379    if (RT_FAILURE(rc))
    373380        return rc;
     
    467474                    | ARMV8_SPSR_EL2_AARCH64_I
    468475                    | ARMV8_SPSR_EL2_AARCH64_F;
     476
     477    pCtx->Pc.u64 = pVM->cpum.s.u64ResetPc;
    469478    /** @todo */
    470479}
  • trunk/src/VBox/VMM/include/CPUMInternal-armv8.h

    r101190 r101549  
    107107    uint8_t                 abPadding0[6];
    108108
     109    /** The reset value of the program counter. */
     110    uint64_t                u64ResetPc;
     111
    109112    /** Align to 64-byte boundary. */
    110     uint8_t                 abPadding1[56];
     113    uint8_t                 abPadding1[48];
    111114
    112115    /** Host CPU feature information.
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