arch/x86: Add debug spinloop

Conditionally add a debug spinloop to enable easy connection of JTAG
debuggers.

TEST=Build and run on Galileo Gen2 with a JTAG debugger.

Change-Id: I7a21f9e6bfb10912d06ce48447c61202553630d0
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/15127
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Lee Leahy 2016-06-07 08:45:17 -07:00 committed by Leroy P Leahy
parent 3790a42003
commit fdc8c8b5fa
2 changed files with 16 additions and 0 deletions

View File

@ -117,6 +117,13 @@ config PC80_SYSTEM
bool
default y if ARCH_X86
config BOOTBLOCK_DEBUG_SPINLOOP
bool
default n
help
Add a spin (JMP .) in bootblock_crt0.S during early bootblock to wait
for a JTAG debugger to break into the execution sequence.
config BOOTBLOCK_MAINBOARD_INIT
string

View File

@ -32,6 +32,15 @@
#include <cpu/x86/16bit/reset16.inc>
#include <cpu/x86/32bit/entry32.inc>
#if IS_ENABLED(CONFIG_BOOTBLOCK_DEBUG_SPINLOOP)
/* Wait for a JTAG debugger to break in and set EBX non-zero */
xor %ebx, %ebx
debug_spinloop:
cmp $0, %ebx
jz debug_spinloop
#endif
bootblock_protected_mode_entry:
/* Save BIST result */