mirror of
https://github.com/riscv-software-src/opensbi
synced 2025-10-14 12:56:03 +01:00
lib: utils: htif: Fix 32-bit build
When building 32-bit OpenSBI images, we get: lib/utils/sys/htif.c: In function '__check_fromhost': lib/utils/sys/htif.c:12:31: error: left shift count >= width of type [-Werror=shift-count-overflow] #define HTIF_DATA_MASK ((1UL << HTIF_DATA_BITS) - 1) ^~ Fixes: c2f23cc6edd7 ("platform: Add Spike initial support") Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
parent
0b414532c4
commit
c66543d049
@ -9,13 +9,13 @@
|
|||||||
#include <sbi_utils/sys/htif.h>
|
#include <sbi_utils/sys/htif.h>
|
||||||
|
|
||||||
#define HTIF_DATA_BITS 48
|
#define HTIF_DATA_BITS 48
|
||||||
#define HTIF_DATA_MASK ((1UL << HTIF_DATA_BITS) - 1)
|
#define HTIF_DATA_MASK ((1ULL << HTIF_DATA_BITS) - 1)
|
||||||
#define HTIF_DATA_SHIFT 0
|
#define HTIF_DATA_SHIFT 0
|
||||||
#define HTIF_CMD_BITS 8
|
#define HTIF_CMD_BITS 8
|
||||||
#define HTIF_CMD_MASK ((1UL << HTIF_CMD_BITS) - 1)
|
#define HTIF_CMD_MASK ((1ULL << HTIF_CMD_BITS) - 1)
|
||||||
#define HTIF_CMD_SHIFT 48
|
#define HTIF_CMD_SHIFT 48
|
||||||
#define HTIF_DEV_BITS 8
|
#define HTIF_DEV_BITS 8
|
||||||
#define HTIF_DEV_MASK ((1UL << HTIF_DEV_BITS) - 1)
|
#define HTIF_DEV_MASK ((1ULL << HTIF_DEV_BITS) - 1)
|
||||||
#define HTIF_DEV_SHIFT 56
|
#define HTIF_DEV_SHIFT 56
|
||||||
|
|
||||||
#define HTIF_DEV_SYSTEM 0
|
#define HTIF_DEV_SYSTEM 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user