pmu.cc (13848:8a47fb0e701f) pmu.cc (14172:bba55ff08279)
1/*
2 * Copyright (c) 2011-2014, 2017-2019 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

--- 485 unchanged lines hidden (view full) ---

494bool
495PMU::CounterState::isFiltered() const
496{
497 assert(pmu.isa);
498
499 const PMEVTYPER_t filter(this->filter);
500 const SCR scr(pmu.isa->readMiscRegNoEffect(MISCREG_SCR));
501 const CPSR cpsr(pmu.isa->readMiscRegNoEffect(MISCREG_CPSR));
1/*
2 * Copyright (c) 2011-2014, 2017-2019 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

--- 485 unchanged lines hidden (view full) ---

494bool
495PMU::CounterState::isFiltered() const
496{
497 assert(pmu.isa);
498
499 const PMEVTYPER_t filter(this->filter);
500 const SCR scr(pmu.isa->readMiscRegNoEffect(MISCREG_SCR));
501 const CPSR cpsr(pmu.isa->readMiscRegNoEffect(MISCREG_CPSR));
502 const ExceptionLevel el(opModeToEL((OperatingMode)(uint8_t)cpsr.mode));
502 const ExceptionLevel el(currEL(cpsr));
503 const bool secure(inSecureState(scr, cpsr));
504
505 switch (el) {
506 case EL0:
507 return secure ? filter.u : (filter.u != filter.nsu);
508
509 case EL1:
510 return secure ? filter.p : (filter.p != filter.nsk);

--- 310 unchanged lines hidden ---
503 const bool secure(inSecureState(scr, cpsr));
504
505 switch (el) {
506 case EL0:
507 return secure ? filter.u : (filter.u != filter.nsu);
508
509 case EL1:
510 return secure ? filter.p : (filter.p != filter.nsk);

--- 310 unchanged lines hidden ---