summaryrefslogtreecommitdiff
path: root/common/bloblist.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-12-31 10:58:36 -0600
committerTom Rini <trini@konsulko.com>2024-12-31 10:58:36 -0600
commitf4e871196568a5a8cc4d150e11f23d902e740286 (patch)
tree440c8b7a3fcdf50a9a8499836fbf4dccdc1b1f0f /common/bloblist.c
parent6c76f67ac5f0c796610b624fb839e3f9fc19f775 (diff)
parent43ca65b30555d9b8e2a31f71d8756aa8c0ffbcf5 (diff)
Merge patch series "Select CONFIG_64BIT for sandbox64 and x86_64"
Andrew Goodbody <andrew.goodbody@linaro.org> says: Picking up a series from Dan Carpenter and applying requested changes for v2. I had previously set CONFIG_64BIT for arm64. This patchset does the same thing for sandbox and x86_64. (Mips and riscv were already doing it). This CONFIG option is used in the Makefile to determine if it's a 32 or 64 bit system for the CHECKER. Makefile 1052 # the checker needs the correct machine size 1053 CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32) Link: https://lore.kernel.org/r/20241216180736.1933807-1-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)) {