This material was originally developed as part of an assignment of the Operating systems for embedded systems course delivered at Politecnico di Torino by Prof. Stefano Di Carlo.
All the files named "armpmu_lib.h" and all the contents in the folder "enable_arm_pmu.mod/enable_arm_pmu" have been written by Austin Seipp for ARMv7 (https://github.com/thoughtpolice/enable_arm_pmu) and they have been adapted for ARMv8 by Zhiyi Sun. The code used for the Raspberry Pi 3-B (ARMv8) is available in the following GitHub repository: https://github.com/zhiyisun/enable_arm_pmu/tree/dev .