hw: enable performance counter for ARMv8

Ref #3426
This commit is contained in:
Stefan Kalkowski 2019-07-09 11:41:18 +02:00 committed by Christian Helmuth
parent ee38504d81
commit 6b09ac59f0
2 changed files with 5 additions and 0 deletions

View File

@ -104,6 +104,9 @@ unsigned Bootstrap::Platform::enable_mmu()
prepare_hypervisor();
}
/* enable performance counter for user-land */
Cpu::Pmuserenr_el0::write(0b1111);
Cpu::Vbar_el1::write(Hw::Mm::supervisor_exception_vector().base);
/* set memory attributes in indirection register */

View File

@ -97,6 +97,8 @@ struct Hw::Arm_64_cpu
struct Attr3 : Bitfield<24, 8> {};
);
SYSTEM_REGISTER(32, Pmuserenr_el0, pmuserenr_el0);
SYSTEM_REGISTER(64, Scr, scr_el3,
struct Ns : Bitfield<0, 1> {};
struct Smd : Bitfield<7, 1> {};