summaryrefslogtreecommitdiff
path: root/common/bloblist.c
diff options
context:
space:
mode:
authorAndrew Goodbody <andrew.goodbody@linaro.org>2024-12-16 18:07:35 +0000
committerTom Rini <trini@konsulko.com>2024-12-31 10:58:30 -0600
commit99145eec2dca317da6b48d0f8fdd602001f87e61 (patch)
tree653714fd5d5524d411d74b548198eedc29d5b1c2 /common/bloblist.c
parentbcb9b3524a8963e0ac6020b05fafe810d798ba35 (diff)
x86: select CONFIG_64BIT for X86_64
Select CONFIG_64BIT so that we pass the -m64 option (instead of -m32) to static analysis tools. Introduce CONFIG_SPL_64BIT and select it for architectures other than x86 with 64 bit builds. Do not select it for x86 builds as x86 uses a 32 bit SPL. Ensure that when limits are set they use CONFIG_64BIT for U-Boot proper and CONFIG_SPL_64BIT for SPL. This is to allow for the 32 bit SPL build used by x86. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Diffstat (limited to 'common/bloblist.c')
-rw-r--r--common/bloblist.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/common/bloblist.c b/common/bloblist.c
index ec6ff7a5a93..110bb9dc44a 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -576,14 +576,17 @@ int bloblist_maybe_init(void)
int bloblist_check_reg_conv(ulong rfdt, ulong rzero, ulong rsig)
{
- ulong version = BLOBLIST_REGCONV_VER;
+ u64 version = BLOBLIST_REGCONV_VER;
ulong sigval;
- sigval = (IS_ENABLED(CONFIG_64BIT)) ?
- ((BLOBLIST_MAGIC & ((1UL << BLOBLIST_REGCONV_SHIFT_64) - 1)) |
- ((version & BLOBLIST_REGCONV_MASK) << BLOBLIST_REGCONV_SHIFT_64)) :
- ((BLOBLIST_MAGIC & ((1UL << BLOBLIST_REGCONV_SHIFT_32) - 1)) |
+ if ((IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_SPL_BUILD)) ||
+ (IS_ENABLED(CONFIG_SPL_64BIT) && IS_ENABLED(CONFIG_SPL_BUILD))) {
+ sigval = ((BLOBLIST_MAGIC & ((1ULL << BLOBLIST_REGCONV_SHIFT_64) - 1)) |
+ ((version & BLOBLIST_REGCONV_MASK) << BLOBLIST_REGCONV_SHIFT_64));
+ } else {
+ sigval = ((BLOBLIST_MAGIC & ((1UL << BLOBLIST_REGCONV_SHIFT_32) - 1)) |
((version & BLOBLIST_REGCONV_MASK) << BLOBLIST_REGCONV_SHIFT_32));
+ }
if (rzero || rsig != sigval ||
rfdt != (ulong)bloblist_find(BLOBLISTT_CONTROL_FDT, 0)) {