With a recent Binman change, the skip-at-start property is now honoured,
meaning that all image-pos values in the affected section start from
the skip-at-start value.

The x86 code works around the old behaviour at present, so update it.

This fixes booting on coral

Signed-off-by: Simon Glass <[email protected]>
---

 arch/x86/cpu/intel_common/intel_opregion.c | 1 +
 arch/x86/lib/fsp2/fsp_init.c               | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/cpu/intel_common/intel_opregion.c 
b/arch/x86/cpu/intel_common/intel_opregion.c
index 78caff0dc12..4a2717b3584 100644
--- a/arch/x86/cpu/intel_common/intel_opregion.c
+++ b/arch/x86/cpu/intel_common/intel_opregion.c
@@ -31,6 +31,7 @@ static int locate_vbt(char **vbtp, int *sizep)
        size = vbt.size;
        if (size > sizeof(vbt_data))
                return log_msg_ret("vbt", -E2BIG);
+       vbt.image_pos += CONFIG_ROM_SIZE;
        ret = spi_flash_read_dm(dev, vbt.image_pos, size, vbt_data);
        if (ret)
                return log_msg_ret("read", ret);
diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c
index 1a2bf46c5c5..e4a87d8b2e1 100644
--- a/arch/x86/lib/fsp2/fsp_init.c
+++ b/arch/x86/lib/fsp2/fsp_init.c
@@ -141,7 +141,7 @@ int fsp_locate_fsp(enum fsp_type_t type, struct 
binman_entry *entry,
                if (ret)
                        return log_msg_ret("binman entry", ret);
                if (!use_spi_flash)
-                       rom_offset = (map_base & mask) - CONFIG_ROM_SIZE;
+                       rom_offset = map_base + CONFIG_ROM_SIZE;
        } else {
                ret = -ENOENT;
                if (false)
-- 
2.43.0

Reply via email to