aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-09-07 09:58:20 -0600
committerBin Meng <bmeng@tinylab.org>2023-09-22 06:03:46 +0800
commit6acc07236562a5dc9cf9e29b2fd889f8643652f5 (patch)
treefb52c98c5e37834e75fcd4ad9e618e6634e84ac4 /arch/x86/lib
parentcd1ee5d96e05c6ce2589d4f2e4ccdba202872dc7 (diff)
downloadu-boot-6acc07236562a5dc9cf9e29b2fd889f8643652f5.zip
u-boot-6acc07236562a5dc9cf9e29b2fd889f8643652f5.tar.gz
u-boot-6acc07236562a5dc9cf9e29b2fd889f8643652f5.tar.bz2
x86: dm: Mark driver model as dead when disabling CAR
When turning off CAR, set the flag to make sure that nothing tries to use driver model in SPL before jumping to U-Bot proper, since its tables are in CAR. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/spl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 335dacf..c15f11f 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -230,6 +230,9 @@ void board_init_f_r(void)
mtrr_commit(false);
init_cache();
gd->flags &= ~GD_FLG_SERIAL_READY;
+
+ /* make sure driver model is not accessed from now on */
+ gd->flags |= GD_FLG_DM_DEAD;
debug("cache status %d\n", dcache_status());
board_init_r(gd, 0);
}