diff options
author | Jessica Clarke <jrtc27@jrtc27.com> | 2025-07-10 00:29:29 +0100 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2025-07-22 15:54:27 +0530 |
commit | 079bf6f0f93d01c8be3429d9a8a867ef84501557 (patch) | |
tree | 33424400565645d877d4bdbb71d8bd0fa29a3438 /lib/utils/cppc | |
parent | ffd3ed976d88fa5cda56d9d2c139557c69eec5d8 (diff) | |
download | opensbi-079bf6f0f93d01c8be3429d9a8a867ef84501557.zip opensbi-079bf6f0f93d01c8be3429d9a8a867ef84501557.tar.gz opensbi-079bf6f0f93d01c8be3429d9a8a867ef84501557.tar.bz2 |
firmware: Replace sole uses of REGBYTES with __SIZEOF_LONG__
This code has nothing to do with the ISA's registers, it's about the
format of ELF relocations. As such, __SIZEOF_LONG__, being a language /
ABI-level property, is a more appropriate constant to use. This also
makes it easier to support CHERI, where general-purpose registers are
extended to be capabilities, not just integers, and so the register size
is not the same as the machine word size. This also happens to make it
more correct for RV64ILP32, where the registers are 64-bit integers but
the ABI is 32-bit (both for long and for the ELF format), though
properly supporting that ABI is not part of the motivation here, just a
consequence of improving the code for CHERI.
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250709232932.37622-2-jrtc27@jrtc27.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils/cppc')
0 files changed, 0 insertions, 0 deletions