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>
1 file changed