]> git.dujemihanovic.xyz Git - u-boot.git/commit
cmd: add rdcycle test to RISC-V exception command
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 11 Aug 2024 14:41:23 +0000 (16:41 +0200)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Tue, 10 Sep 2024 02:10:43 +0000 (10:10 +0800)
commit1806fed0ce6b56365ecf6b84ce6d17aafd3af979
tree90341ef7d622f94ead77cfa57c05d6b32ba2298c
parent4a36d217bb131ec82cdb9a010221d6ae420aaf1b
cmd: add rdcycle test to RISC-V exception command

Some versions of KVM don't allow access to the cycle CSR.

Provide a command 'exception rdcycle' for testing.

If the cycle CSR is accessible, we get an output like:

    => exception rdcycle
    cycle = 0x41f7563de

If the cycle CSR is not accessible, we get an output like:

    => exception rdcycle
    Unhandled exception: Illegal instruction

Put subcommands into alphabetical order in long help.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
cmd/riscv/exception.c