[coreboot-gerrit] New patch to review for coreboot: 6e96b7d console: Simplify the enable rules

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Tue Mar 4 18:01:33 CET 2014


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5340

-gerrit

commit 6e96b7d95667a72ccd366e231fb9b09e242d9d57
Author: Kyösti Mälkki <kyosti.malkki at 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 at 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);



More information about the coreboot-gerrit mailing list