summaryrefslogtreecommitdiffstats
path: root/src/drivers/intel/fsp2_0/silicon_init.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-05-17 13:07:30 +0200
committerArthur Heymans <arthur@aheymans.xyz>2022-06-01 13:40:20 +0000
commitfdf6d121f5382d116fd9d408525635348d64dd69 (patch)
tree28503766bee50e84b1ad78ff729db68abdd4234d /src/drivers/intel/fsp2_0/silicon_init.c
parentc055f3531407c06218e05973bc634d958aba779f (diff)
downloadcoreboot-fdf6d121f5382d116fd9d408525635348d64dd69.tar.gz
coreboot-fdf6d121f5382d116fd9d408525635348d64dd69.tar.bz2
coreboot-fdf6d121f5382d116fd9d408525635348d64dd69.zip
driver/intel/fsp2_0: Disable NULL deref code when calling FSP
FSP needs interrupts disable so also disable generating exceptions around debug registers. Change-Id: Ia49dde68d45b71e231aaf32a0e6fd847f0e06146 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/64426 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Uwe Poeche <uwe.poeche@siemens.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/intel/fsp2_0/silicon_init.c')
-rw-r--r--src/drivers/intel/fsp2_0/silicon_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
index 263ea3b46d36..ae5d62073770 100644
--- a/src/drivers/intel/fsp2_0/silicon_init.c
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include <arch/null_breakpoint.h>
#include <bootsplash.h>
#include <cbfs.h>
#include <cbmem.h>
@@ -133,10 +134,13 @@ static void do_silicon_init(struct fsp_header *hdr)
timestamp_add_now(TS_FSP_SILICON_INIT_START);
post_code(POST_FSP_SILICON_INIT);
+ /* FSP disables the interrupt handler so remove debug exceptions temporarily */
+ null_breakpoint_disable();
if (ENV_X86_64 && CONFIG(PLATFORM_USES_FSP2_X86_32))
status = protected_mode_call_1arg(silicon_init, (uintptr_t)upd);
else
status = silicon_init(upd);
+ null_breakpoint_init();
printk(BIOS_INFO, "FSPS returned %x\n", status);