From 9c88fb8df0005dc60e6c62778b4f16313cb3308e Mon Sep 17 00:00:00 2001 From: Harshit Sharma Date: Wed, 17 Jun 2020 20:19:00 -0700 Subject: lib: Add ASan support to ramstage on x86 arch This patch adds address sanitizer module to the library and reserves a linker section representing the shadow region for ramstage. Also, it adds an instruction to initialize shadow region on x86 architecture when ramstage is loaded. Change-Id: Ica06bd2be78fcfc79fa888721ed920d4e8248f3b Signed-off-by: Harshit Sharma Reviewed-on: https://review.coreboot.org/c/coreboot/+/42496 Tested-by: build bot (Jenkins) Reviewed-by: Werner Zeh --- src/arch/x86/c_start.S | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/arch/x86/c_start.S') diff --git a/src/arch/x86/c_start.S b/src/arch/x86/c_start.S index 4e2ae08a47..c46a45c729 100644 --- a/src/arch/x86/c_start.S +++ b/src/arch/x86/c_start.S @@ -91,6 +91,10 @@ _start: andl $0xFFFFFFF0, %esp +#if CONFIG(ASAN_IN_RAMSTAGE) + call asan_init +#endif + #if CONFIG(GDB_WAIT) call gdb_hw_init call gdb_stub_breakpoint -- cgit v1.2.3