faults.cc (12517:77e8688fc670) | faults.cc (12568:c82782e5a84c) |
---|---|
1/* 2 * Copyright (c) 2010, 2012-2014, 2016-2018 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 1418 unchanged lines hidden (view full) --- 1427PCAlignmentFault::invoke(ThreadContext *tc, const StaticInstPtr &inst) 1428{ 1429 ArmFaultVals<PCAlignmentFault>::invoke(tc, inst); 1430 assert(from64); 1431 // Set the FAR 1432 tc->setMiscReg(getFaultAddrReg64(), faultPC); 1433} 1434 | 1/* 2 * Copyright (c) 2010, 2012-2014, 2016-2018 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 1418 unchanged lines hidden (view full) --- 1427PCAlignmentFault::invoke(ThreadContext *tc, const StaticInstPtr &inst) 1428{ 1429 ArmFaultVals<PCAlignmentFault>::invoke(tc, inst); 1430 assert(from64); 1431 // Set the FAR 1432 tc->setMiscReg(getFaultAddrReg64(), faultPC); 1433} 1434 |
1435bool 1436PCAlignmentFault::routeToHyp(ThreadContext *tc) const 1437{ 1438 bool toHyp = false; 1439 1440 SCR scr = tc->readMiscRegNoEffect(MISCREG_SCR_EL3); 1441 HCR hcr = tc->readMiscRegNoEffect(MISCREG_HCR_EL2); 1442 CPSR cpsr = tc->readMiscRegNoEffect(MISCREG_CPSR); 1443 1444 // if HCR.TGE is set to 1, take to Hyp mode through Hyp Trap vector 1445 toHyp |= !inSecureState(scr, cpsr) && hcr.tge && (cpsr.el == EL0); 1446 return toHyp; 1447} 1448 |
|
1435SPAlignmentFault::SPAlignmentFault() 1436{} 1437 1438SystemError::SystemError() 1439{} 1440 1441void 1442SystemError::invoke(ThreadContext *tc, const StaticInstPtr &inst) --- 91 unchanged lines hidden --- | 1449SPAlignmentFault::SPAlignmentFault() 1450{} 1451 1452SystemError::SystemError() 1453{} 1454 1455void 1456SystemError::invoke(ThreadContext *tc, const StaticInstPtr &inst) --- 91 unchanged lines hidden --- |