firmware: use __SIZEOF_LONG__ for field offsets in fw_dynamic.h
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Mon, 12 Jul 2021 09:24:05 +0000 (10:24 +0100)
committerAnup Patel <anup@brainfault.org>
Sat, 17 Jul 2021 11:05:23 +0000 (16:35 +0530)
commit7210e907858be23a207479e26fde947e968b7f29
treee1d6a7ae323be3bfff4935001195281f3e1e61d9
parente3d6919d10d73ff97cfe583cc78fc01c7beaf4b5
firmware: use __SIZEOF_LONG__ for field offsets in fw_dynamic.h

The fields are of type unsigned long and are not pointers. While this
happens to be the same for RV32/RV64, it is not correct when compiling
for a CHERI-RISC-V system where pointers are twice the size of long.

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
include/sbi/fw_dynamic.h