Skip to content
Unverified Commit 2a31c54b authored by Tsukasa OI's avatar Tsukasa OI Committed by Palmer Dabbelt
Browse files

RISC-V: Minimal parser for "riscv, isa" strings



Current hart ISA ("riscv,isa") parser don't correctly parse:

1. Multi-letter extensions
2. Version numbers

All ISA extensions ratified recently has multi-letter extensions
(except 'H'). The current "riscv,isa" parser that is easily confused
by multi-letter extensions and "p" in version numbers can be a huge
problem for adding new extensions through the device tree.

Leaving it would create incompatible hacks and would make "riscv,isa"
value unreliable.

This commit implements minimal parser for "riscv,isa" strings.  With this,
we can safely ignore multi-letter extensions and version numbers.

[Improved commit text and fixed a bug around 's' in base extension]
Signed-off-by: default avatarAtish Patra <atishp@rivosinc.com>
[Fixed workaround for QEMU]
Signed-off-by: default avatarTsukasa OI <research_trasio@irq.a4lg.com>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 58004f26
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment