diff options
Diffstat (limited to 'src/soc/intel/quark')
-rw-r--r-- | src/soc/intel/quark/Kconfig | 43 | ||||
-rw-r--r-- | src/soc/intel/quark/bootblock/bootblock.c | 14 | ||||
-rw-r--r-- | src/soc/intel/quark/bootblock/esram_init.S | 23 | ||||
-rw-r--r-- | src/soc/intel/quark/romstage/fsp1_1.c | 4 |
4 files changed, 71 insertions, 13 deletions
diff --git a/src/soc/intel/quark/Kconfig b/src/soc/intel/quark/Kconfig index 5a488475cb..c5efd4a296 100644 --- a/src/soc/intel/quark/Kconfig +++ b/src/soc/intel/quark/Kconfig @@ -109,21 +109,54 @@ config ENABLE_DEBUG_LED_ESRAM default n select ENABLE_DEBUG_LED help - Indicate that ESRAM has been successfully initialized. + Indicate that ESRAM has been successfully initialized. If the SD LED + does not light then the ESRAM initialization needs to be debugged. config ENABLE_DEBUG_LED_FINDFSP bool "SD LED indicates fsp.bin file was found" + depends on PLATFORM_USES_FSP1_1 + default n + select ENABLE_DEBUG_LED + help + Indicate that fsp.bin was found. If the SD LED does not light then + the code between ESRAM initialization through find_fsp needs to + debugged. Start by verifying that the correct fsp.bin is in the + image. + +config ENABLE_DEBUG_LED_BOOTBLOCK_ENTRY + bool "SD LED indicates bootblock.c successfully entered" + default n + select ENABLE_DEBUG_LED + help + Indicate that bootblock_c_entry was entered. If the SD LED does not + light then debug the code between ESRAM and bootblock_c_entry. For + FSP 1.1, use ENABLE_DEBUG_LED_FINDFSP to split this code. + +config ENABLE_DEBUG_LED_SOC_EARLY_INIT_ENTRY + bool "SD LED indicates bootblock_soc_early_init successfully entered" + default n + select ENABLE_DEBUG_LED + help + Indicate that bootblock_soc_early_init was entered. If the SD LED + does not light then debug the code in bootblock_main_with_timestamp. + +config ENABLE_DEBUG_LED_SOC_EARLY_INIT_EXIT + bool "SD LED indicates bootblock_soc_early_init successfully exited" default n select ENABLE_DEBUG_LED help - Indicate that fsp.bin was found. + Indicate that bootblock_soc_early_init exited. If the SD LED does not + light then debug the scripts in bootblock_soc_early_init. -config ENABLE_DEBUG_LED_TEMPRAMINIT - bool "SD LED indicates TempRamInit was successful" +config ENABLE_DEBUG_LED_SOC_INIT_ENTRY + bool "SD LED indicates bootblock_soc_init successfully entered" default n select ENABLE_DEBUG_LED help - Indicate that TempRamInit was successful. + Indicate that bootblock_soc_init was entered. If the SD LED does not + light then debug the code in bootblock_mainboard_early_init and + console_init. If the SD LED does light but there is no serial then + debug the serial port configuration and initialization. ##### # ESRAM layout diff --git a/src/soc/intel/quark/bootblock/bootblock.c b/src/soc/intel/quark/bootblock/bootblock.c index 3c90de9636..c974cb12b4 100644 --- a/src/soc/intel/quark/bootblock/bootblock.c +++ b/src/soc/intel/quark/bootblock/bootblock.c @@ -22,6 +22,8 @@ #include <soc/pci_devs.h> #include <soc/reg_access.h> +extern void asmlinkage light_sd_led(void); + static const struct reg_script legacy_gpio_init[] = { /* Temporarily enable the legacy GPIO controller */ REG_PCI_WRITE32(R_QNC_LPC_GBA_BASE, IO_ADDRESS_VALID @@ -77,11 +79,17 @@ static const struct reg_script mtrr_init[] = { void asmlinkage bootblock_c_entry(uint64_t base_timestamp) { + if (IS_ENABLED(CONFIG_ENABLE_DEBUG_LED_BOOTBLOCK_ENTRY)) + light_sd_led(); + bootblock_main_with_timestamp(base_timestamp); } void bootblock_soc_early_init(void) { + if (IS_ENABLED(CONFIG_ENABLE_DEBUG_LED_SOC_EARLY_INIT_ENTRY)) + light_sd_led(); + /* Initialize the MTRRs */ reg_script_run(mtrr_init); @@ -94,10 +102,16 @@ void bootblock_soc_early_init(void) reg_script_run_on_dev(HSUART0_BDF, hsuart_init); if (IS_ENABLED(CONFIG_ENABLE_BUILTIN_HSUART1)) reg_script_run_on_dev(HSUART1_BDF, hsuart_init); + + if (IS_ENABLED(CONFIG_ENABLE_DEBUG_LED_SOC_EARLY_INIT_EXIT)) + light_sd_led(); } void bootblock_soc_init(void) { + if (IS_ENABLED(CONFIG_ENABLE_DEBUG_LED_SOC_INIT_ENTRY)) + light_sd_led(); + /* Display the MTRRs */ soc_display_mtrrs(); } diff --git a/src/soc/intel/quark/bootblock/esram_init.S b/src/soc/intel/quark/bootblock/esram_init.S index d982cdd2f9..f173f5c10b 100644 --- a/src/soc/intel/quark/bootblock/esram_init.S +++ b/src/soc/intel/quark/bootblock/esram_init.S @@ -507,14 +507,7 @@ L43: L44: #if IS_ENABLED(CONFIG_ENABLE_DEBUG_LED_ESRAM) - /* Turn on SD LED to indicate ESRAM successfully initialized */ - movl $SD_HOST_CTRL, %ebx - movb 0(%ebx), %al - orb $1, %al - movb %al, 0(%ebx) - - /* Loop forever */ - jmp . + jmp light_sd_led #endif /* CONFIG_ENABLE_DEBUG_LED_ESRAM */ #endif /* CONFIG_ENABLE_DEBUG_LED */ @@ -537,3 +530,17 @@ before_carstage: call bootblock_c_entry /* Never reached */ + + .global light_sd_led + +light_sd_led: + /* Turn on SD LED to indicate ESRAM successfully initialized */ + movl $SD_HOST_CTRL, %ebx + movb 0(%ebx), %al + orb $1, %al + movb %al, 0(%ebx) + + /* Loop forever */ +die: + hlt + jmp die diff --git a/src/soc/intel/quark/romstage/fsp1_1.c b/src/soc/intel/quark/romstage/fsp1_1.c index d7f19a74f5..e93e688ea7 100644 --- a/src/soc/intel/quark/romstage/fsp1_1.c +++ b/src/soc/intel/quark/romstage/fsp1_1.c @@ -26,6 +26,8 @@ #include <soc/romstage.h> #include <string.h> +extern void asmlinkage light_sd_led(void); + asmlinkage void *car_stage_c_entry(void) { FSP_INFO_HEADER *fih; @@ -40,6 +42,8 @@ asmlinkage void *car_stage_c_entry(void) /* Locate the FSP header in ESRAM */ fih = find_fsp(CONFIG_FSP_ESRAM_LOC); + if (IS_ENABLED(CONFIG_ENABLE_DEBUG_LED_FINDFSP)) + light_sd_led(); /* Start the early verstage/romstage code */ post_code(0x2A); |