Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63166 )
Change subject: drivers/intel/fsp2_0: Allow coreboot to control FSP serial redirection ......................................................................
drivers/intel/fsp2_0: Allow coreboot to control FSP serial redirection
coreboot has implemented native FSP debug handler with commit hash 3ba6f8cdf (drivers/intel/fsp2_0: Add native implementation for FSP Debug Handler). However, coreboot still can't control when to redirect FSP debug output to the serial console, i.e., at present, integrating a FSP debug binary is enough to redirect FSP debug output to serial port, irrespective of whether coreboot user really wish to see FSP debug log with all the coreboot serial image.
coreboot needs additional mechanism to control FSP debug binary to redirect debug messages over serial port. This patch introduces an config `HAVE_FSP_DEBUG` to control the FSP debug output, user to select this config from site-local config file incase like to override the default settings.
There could be scenarios as below:
Scenario 1: Non-serial coreboot image integrated with the FSP debug binaries, is capable of redirecting to the serial console, but coreboot decides to override the config as below to skip FSP debug output redirection to the serial port.
`#`FSP Serial console disabled by default (do not remove) `#`CONFIG_HAVE_FSP_DEBUG is not set
Scenario 2: For coreboot serial image with FSP debug binaries integrated but coreboot decides to skip FSP debug output redirection to the serial port.
`#`FSP Serial console disabled by default (do not remove) `#`CONFIG_HAVE_FSP_DEBUG is not set CONFIG_CONSOLE_SERIAL=y CONFIG_CONSOLE_SERIAL_115200=y CONFIG_UART_DEBUG=y CONFIG_UART_FOR_CONSOLE=0
Scenario 3: The final image could be a coreboot serial image with FSP serial redirection enabled to output to the serial port.
CONFIG_HAVE_FSP_DEBUG=y CONFIG_CONSOLE_SERIAL=y CONFIG_CONSOLE_SERIAL_115200=y CONFIG_UART_DEBUG=y CONFIG_UART_FOR_CONSOLE=0
BUG=b:227151510 TEST=Able to build and boot Redrix with all scenarios between #1- #3, and able to meet the expectation as mentioned above.
Signed-off-by: Subrata Banik subratabanik@google.com Change-Id: I0b008ca9d4f40bfa6a989a6fd655c234f91fde65 --- M src/drivers/intel/fsp2_0/Kconfig 1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/63166/1
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig index 0823aa3..45467f8 100644 --- a/src/drivers/intel/fsp2_0/Kconfig +++ b/src/drivers/intel/fsp2_0/Kconfig @@ -359,4 +359,16 @@ This option allows to create `Debug Event Handler` to print FSP debug messages to output device using coreboot native implementation.
+config HAVE_FSP_DEBUG + bool "Have FSP debug binaries to get the console output" + default y + depends on FSP_USES_CB_DEBUG_EVENT_HANDLER + help + Send FSP debug output to the serial port. + + The config option is selected based on your FSP configuration i.e., debug or + release. Select this option from site-local to print FSP serial messages using + coreboot native serial debug driver when coreboot has integrated the debug FSP + binaries. + endif