[PATCH 7/8] lib: sbi_hart: add Ssstateen extension
Radim Krčmář
rkrcmar at ventanamicro.com
Mon Apr 28 06:47:30 PDT 2025
2025-04-28T18:08:12+05:30, Anup Patel <anup at brainfault.org>:
> On Tue, Apr 15, 2025 at 8:13 PM Radim Krčmář <rkrcmar at ventanamicro.com> wrote:
>>
>> We already detect Smstateen, but Ssstateen exists as well and it doesn't
>> have the M-state CSRs.
>>
>> Signed-off-by: Radim Krčmář <rkrcmar at ventanamicro.com>
>> ---
>> diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h
>> @@ -31,7 +31,7 @@ enum sbi_hart_extensions {
>> SBI_HART_EXT_SMAIA = 0,
>> /** HART has Smepmp */
>> SBI_HART_EXT_SMEPMP,
>> - /** HART has Smstateen CSR **/
>> + /** HART has mstateen*, sstateen*, and hstateen* CSRs **/
>
> Let's not define what Smstateen means here.
>
> Smstateen implies only mstateen CSRs whereas
> Sstateeen implies [h|s]stateen CSRs.
The spec actually says that Smstateen is all of the CSRs and Sstateeen
misses mstateen*, but yeah, it's not that important...
Can I remove the comments instead?
SBI_HART_EXT_SMSTATEEN is obviously Smstateen, so I don't see the point
of the comment.
More information about the opensbi
mailing list