diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/bloblist.c | 11 | ||||
-rw-r--r-- | common/board_f.c | 5 | ||||
-rw-r--r-- | common/bootstage.c | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/common/bloblist.c b/common/bloblist.c index 11d6422b695..2008ab4d25c 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -576,7 +576,16 @@ int bloblist_maybe_init(void) int bloblist_check_reg_conv(ulong rfdt, ulong rzero, ulong rsig) { - if (rzero || rsig != (BLOBLIST_MAGIC | BLOBLIST_REGCONV_VER) || + ulong 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)) | + ((version & BLOBLIST_REGCONV_MASK) << BLOBLIST_REGCONV_SHIFT_32)); + + if (rzero || rsig != sigval || rfdt != (ulong)bloblist_find(BLOBLISTT_CONTROL_FDT, 0)) { gd->bloblist = NULL; /* Reset the gd bloblist pointer */ return -EIO; diff --git a/common/board_f.c b/common/board_f.c index 22c180b2187..29e185137ad 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -810,10 +810,7 @@ static int initf_bootstage(void) if (ret) return ret; if (from_spl) { - const void *stash = map_sysmem(CONFIG_BOOTSTAGE_STASH_ADDR, - CONFIG_BOOTSTAGE_STASH_SIZE); - - ret = bootstage_unstash(stash, CONFIG_BOOTSTAGE_STASH_SIZE); + ret = bootstage_stash_default(); if (ret && ret != -ENOENT) { debug("Failed to unstash bootstage: err=%d\n", ret); return ret; diff --git a/common/bootstage.c b/common/bootstage.c index df83eb684c0..b6c268d9f47 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -500,6 +500,7 @@ int bootstage_unstash(const void *base, int size) return 0; } +#if IS_ENABLED(CONFIG_BOOTSTAGE_STASH) int _bootstage_stash_default(void) { return bootstage_stash(map_sysmem(CONFIG_BOOTSTAGE_STASH_ADDR, 0), @@ -513,6 +514,7 @@ int _bootstage_unstash_default(void) return bootstage_unstash(stash, CONFIG_BOOTSTAGE_STASH_SIZE); } +#endif int bootstage_get_size(void) { |