]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: sbi: add Performance Monitoring Unit Extension
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 16 Mar 2022 20:21:18 +0000 (21:21 +0100)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 6 Apr 2022 01:40:05 +0000 (09:40 +0800)
Version 1.0-rc3 of the RISC-V Supervisor Binary Interface Specification
has added the Performance Monitoring Unit Extension.

The sbi command should be able to detect it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/riscv/include/asm/sbi.h
cmd/riscv/sbi.c

index bfcd20495374a39fc431df565b2ecafbad8a5279..76453121ea13a9bf443b3439dce72ed147302987 100644 (file)
@@ -27,6 +27,7 @@ enum sbi_ext_id {
        SBI_EXT_RFENCE = 0x52464E43,
        SBI_EXT_HSM = 0x48534D,
        SBI_EXT_SRST = 0x53525354,
+       SBI_EXT_PMU = 0x504D55,
 };
 
 enum sbi_ext_base_fid {
index c4a9c840f30e87229ec4e6606f8648d3d037cd1c..83491239252cf6c8f77267969b9b1917ffe35792 100644 (file)
@@ -44,6 +44,7 @@ static struct sbi_ext extensions[] = {
        { SBI_EXT_RFENCE,                     "RFENCE Extension" },
        { SBI_EXT_HSM,                        "Hart State Management Extension" },
        { SBI_EXT_SRST,                       "System Reset Extension" },
+       { SBI_EXT_PMU,                        "Performance Monitoring Unit Extension" },
 };
 
 static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,