1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 */ 9 #include <rtthread.h> 10 #include "pmu.h" 11 12 #define DBG_TAG "PMU" 13 #define DBG_LVL DBG_WARNING 14 #include <rtdbg.h> 15 rt_hw_pmu_dump_feature(void)16void rt_hw_pmu_dump_feature(void) 17 { 18 unsigned long reg; 19 20 reg = rt_hw_pmu_get_control(); 21 LOG_D("ARM PMU Implementor: %c, ID code: %02x, %d counters\n", 22 reg >> 24, (reg >> 16) & 0xff, (reg >> 11) & 0x1f); 23 RT_ASSERT(ARM_PMU_CNTER_NR == ((reg >> 11) & 0x1f)); 24 RT_UNUSED(reg); 25 } 26