Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5340
-gerrit
commit 696ebdacd9b8dea00e624ec8f5720a4a86a8327e Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Wed Feb 26 15:19:04 2014 +0200
console: Simplify the enable rules
Consoles on CBMEM and USB have somewhat complex rules and dependencies when they can be active. Provide simple variables to test which stage of boot is being built.
Change-Id: I2872d7b5c930b5b3b3a604caa529625163ed989a Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/include/console/streams.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
diff --git a/src/include/console/streams.h b/src/include/console/streams.h index 9d4d3fc..550004e 100644 --- a/src/include/console/streams.h +++ b/src/include/console/streams.h @@ -18,6 +18,31 @@ #ifndef _CONSOLE_STREAMS_H_ #define _CONSOLE_STREAMS_H_
+ +#if defined(__BOOTBLOCK__) || defined(__PRE_RAM__) && defined(__ROMCC__) +#define ENV_BOOTBLOCK 1 +#else +#define ENV_BOOTBLOCK 0 +#endif + +#if defined(__PRE_RAM__) && !defined(__ROMCC__) +#define ENV_ROMSTAGE 1 +#else +#define ENV_ROMSTAGE 0 +#endif + +#if !defined(__PRE_RAM__) && !defined(__SMM__) +#define ENV_RAMSTAGE 1 +#else +#define ENV_RAMSTAGE 0 +#endif + +#if defined(__SMM__) +#define ENV_SMM 1 +#else +#define ENV_SMM 0 +#endif + void console_hw_init(void); void console_tx_byte(unsigned char byte); void console_tx_flush(void);