You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless there's something I've missed in the SBI specification about CPPC register values never exceeding 32-bits when XLEN is 32, this line is wrong whenever the code is compiled for __riscv_xlen == 32, as it implicitly promotes the unsigned long (32-bits) to a uint64_t instead of reading the full 64-bit value out of a1 and a2 and combining them into a 64-bit value.
The text was updated successfully, but these errors were encountered:
opensbi/lib/sbi/sbi_ecall_cppc.c
Line 36 in 791704c
Unless there's something I've missed in the SBI specification about CPPC register values never exceeding 32-bits when XLEN is 32, this line is wrong whenever the code is compiled for
__riscv_xlen == 32
, as it implicitly promotes theunsigned long
(32-bits) to auint64_t
instead of reading the full 64-bit value out ofa1
anda2
and combining them into a 64-bit value.The text was updated successfully, but these errors were encountered: