summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cbmem.h2
-rw-r--r--src/include/console/cbmem_console.h4
-rw-r--r--src/include/console/console.h6
-rw-r--r--src/include/console/uart.h4
-rw-r--r--src/include/console/usb.h2
-rw-r--r--src/include/memlayout.h2
-rw-r--r--src/include/rules.h29
7 files changed, 28 insertions, 21 deletions
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 77fff07684..dcffbfe035 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -161,7 +161,7 @@ static inline int cbmem_possibly_online(void)
if (ENV_BOOTBLOCK)
return 0;
- if (ENV_VERSTAGE && CONFIG(VBOOT_STARTS_IN_BOOTBLOCK))
+ if (ENV_SEPARATE_VERSTAGE && CONFIG(VBOOT_STARTS_IN_BOOTBLOCK))
return 0;
return 1;
diff --git a/src/include/console/cbmem_console.h b/src/include/console/cbmem_console.h
index a291db862d..2996f7c862 100644
--- a/src/include/console/cbmem_console.h
+++ b/src/include/console/cbmem_console.h
@@ -9,8 +9,8 @@ void cbmemc_init(void);
void cbmemc_tx_byte(unsigned char data);
#define __CBMEM_CONSOLE_ENABLE__ (CONFIG(CONSOLE_CBMEM) && \
- (ENV_RAMSTAGE || ENV_VERSTAGE || ENV_POSTCAR || ENV_ROMSTAGE || \
- (ENV_BOOTBLOCK && CONFIG(BOOTBLOCK_CONSOLE))))
+ (ENV_RAMSTAGE || ENV_SEPARATE_VERSTAGE || ENV_POSTCAR || \
+ ENV_ROMSTAGE || (ENV_BOOTBLOCK && CONFIG(BOOTBLOCK_CONSOLE))))
#if __CBMEM_CONSOLE_ENABLE__
static inline void __cbmemc_init(void) { cbmemc_init(); }
diff --git a/src/include/console/console.h b/src/include/console/console.h
index fdc48da73f..be06c66b58 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -31,9 +31,9 @@ void die_notify(void);
#define __CONSOLE_ENABLE__ \
((ENV_BOOTBLOCK && CONFIG(BOOTBLOCK_CONSOLE)) || \
- (ENV_POSTCAR && CONFIG(POSTCAR_CONSOLE)) || \
- ENV_VERSTAGE || ENV_ROMSTAGE || ENV_RAMSTAGE || ENV_LIBAGESA || \
- (ENV_SMM && CONFIG(DEBUG_SMI)))
+ (ENV_POSTCAR && CONFIG(POSTCAR_CONSOLE)) || \
+ ENV_SEPARATE_VERSTAGE || ENV_ROMSTAGE || ENV_RAMSTAGE || \
+ ENV_LIBAGESA || (ENV_SMM && CONFIG(DEBUG_SMI)))
#if __CONSOLE_ENABLE__
asmlinkage void console_init(void);
diff --git a/src/include/console/uart.h b/src/include/console/uart.h
index 1bd6ef0f6e..d423d9d681 100644
--- a/src/include/console/uart.h
+++ b/src/include/console/uart.h
@@ -51,8 +51,8 @@ static inline void *uart_platform_baseptr(int idx)
void oxford_remap(unsigned int new_base);
#define __CONSOLE_SERIAL_ENABLE__ (CONFIG(CONSOLE_SERIAL) && \
- (ENV_BOOTBLOCK || ENV_ROMSTAGE || ENV_RAMSTAGE || ENV_VERSTAGE || \
- ENV_POSTCAR || (ENV_SMM && CONFIG(DEBUG_SMI))))
+ (ENV_BOOTBLOCK || ENV_ROMSTAGE || ENV_RAMSTAGE || ENV_SEPARATE_VERSTAGE \
+ || ENV_POSTCAR || (ENV_SMM && CONFIG(DEBUG_SMI))))
#if __CONSOLE_SERIAL_ENABLE__
static inline void __uart_init(void)
diff --git a/src/include/console/usb.h b/src/include/console/usb.h
index b7bc7f4a6e..e67f125c88 100644
--- a/src/include/console/usb.h
+++ b/src/include/console/usb.h
@@ -18,7 +18,7 @@ int usb_can_rx_byte(int idx);
((ENV_BOOTBLOCK && CONFIG(USBDEBUG_IN_PRE_RAM)) || \
(ENV_ROMSTAGE && CONFIG(USBDEBUG_IN_PRE_RAM)) || \
(ENV_POSTCAR && CONFIG(USBDEBUG_IN_PRE_RAM)) || \
- (ENV_VERSTAGE && CONFIG(USBDEBUG_IN_PRE_RAM)) || \
+ (ENV_SEPARATE_VERSTAGE && CONFIG(USBDEBUG_IN_PRE_RAM)) || \
ENV_RAMSTAGE))
#define USB_PIPE_FOR_CONSOLE 0
diff --git a/src/include/memlayout.h b/src/include/memlayout.h
index 0cd465bda6..bef3637d1e 100644
--- a/src/include/memlayout.h
+++ b/src/include/memlayout.h
@@ -152,7 +152,7 @@
REGION(tpm_tcpa_log, addr, size, 16) \
_ = ASSERT(size >= 2K, "tpm tcpa log buffer must be at least 2K!");
-#if ENV_VERSTAGE
+#if ENV_SEPARATE_VERSTAGE
#define VERSTAGE(addr, sz) \
SYMBOL(verstage, addr) \
_everstage = _verstage + sz; \
diff --git a/src/include/rules.h b/src/include/rules.h
index 92603db4ba..612f131ecf 100644
--- a/src/include/rules.h
+++ b/src/include/rules.h
@@ -14,7 +14,7 @@
#define ENV_ROMSTAGE 0
#define ENV_RAMSTAGE 0
#define ENV_SMM 0
-#define ENV_VERSTAGE 0
+#define ENV_SEPARATE_VERSTAGE 0
#define ENV_RMODULE 0
#define ENV_POSTCAR 0
#define ENV_LIBAGESA 0
@@ -26,7 +26,7 @@
#define ENV_ROMSTAGE 0
#define ENV_RAMSTAGE 0
#define ENV_SMM 0
-#define ENV_VERSTAGE 0
+#define ENV_SEPARATE_VERSTAGE 0
#define ENV_RMODULE 0
#define ENV_POSTCAR 0
#define ENV_LIBAGESA 0
@@ -38,7 +38,7 @@
#define ENV_ROMSTAGE 1
#define ENV_RAMSTAGE 0
#define ENV_SMM 0
-#define ENV_VERSTAGE 0
+#define ENV_SEPARATE_VERSTAGE 0
#define ENV_RMODULE 0
#define ENV_POSTCAR 0
#define ENV_LIBAGESA 0
@@ -50,19 +50,26 @@
#define ENV_ROMSTAGE 0
#define ENV_RAMSTAGE 0
#define ENV_SMM 1
-#define ENV_VERSTAGE 0
+#define ENV_SEPARATE_VERSTAGE 0
#define ENV_RMODULE 0
#define ENV_POSTCAR 0
#define ENV_LIBAGESA 0
#define ENV_STRING "smm"
+/*
+ * NOTE: "verstage" code may either run as a separate stage or linked into the
+ * bootblock/romstage, depending on the setting of CONFIG_SEPARATE_VERSTAGE. The
+ * ENV_SEPARATE_VERSTAGE macro will only return true for "verstage" code when
+ * CONFIG_SEPARATE_VERSTAGE=y, otherwise that code will have ENV_BOOTBLOCK or
+ * ENV_ROMSTAGE set (depending on the CONFIG_VBOOT_STARTS_IN_... options).
+ */
#elif defined(__VERSTAGE__)
#define ENV_DECOMPRESSOR 0
#define ENV_BOOTBLOCK 0
#define ENV_ROMSTAGE 0
#define ENV_RAMSTAGE 0
#define ENV_SMM 0
-#define ENV_VERSTAGE 1
+#define ENV_SEPARATE_VERSTAGE 1
#define ENV_RMODULE 0
#define ENV_POSTCAR 0
#define ENV_LIBAGESA 0
@@ -74,7 +81,7 @@
#define ENV_ROMSTAGE 0
#define ENV_RAMSTAGE 1
#define ENV_SMM 0
-#define ENV_VERSTAGE 0
+#define ENV_SEPARATE_VERSTAGE 0
#define ENV_RMODULE 0
#define ENV_POSTCAR 0
#define ENV_LIBAGESA 0
@@ -86,7 +93,7 @@
#define ENV_ROMSTAGE 0
#define ENV_RAMSTAGE 0
#define ENV_SMM 0
-#define ENV_VERSTAGE 0
+#define ENV_SEPARATE_VERSTAGE 0
#define ENV_RMODULE 1
#define ENV_POSTCAR 0
#define ENV_LIBAGESA 0
@@ -98,7 +105,7 @@
#define ENV_ROMSTAGE 0
#define ENV_RAMSTAGE 0
#define ENV_SMM 0
-#define ENV_VERSTAGE 0
+#define ENV_SEPARATE_VERSTAGE 0
#define ENV_RMODULE 0
#define ENV_POSTCAR 1
#define ENV_LIBAGESA 0
@@ -110,7 +117,7 @@
#define ENV_ROMSTAGE 0
#define ENV_RAMSTAGE 0
#define ENV_SMM 0
-#define ENV_VERSTAGE 0
+#define ENV_SEPARATE_VERSTAGE 0
#define ENV_RMODULE 0
#define ENV_POSTCAR 0
#define ENV_LIBAGESA 1
@@ -126,7 +133,7 @@
#define ENV_ROMSTAGE 0
#define ENV_RAMSTAGE 0
#define ENV_SMM 0
-#define ENV_VERSTAGE 0
+#define ENV_SEPARATE_VERSTAGE 0
#define ENV_RMODULE 0
#define ENV_POSTCAR 0
#define ENV_LIBAGESA 0
@@ -239,7 +246,7 @@
#define ENV_ROMSTAGE_OR_BEFORE \
(ENV_DECOMPRESSOR || ENV_BOOTBLOCK || ENV_ROMSTAGE || \
- (ENV_VERSTAGE && CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)))
+ (ENV_SEPARATE_VERSTAGE && CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)))
#if CONFIG(ARCH_X86)
/* Indicates memory layout is determined with arch/x86/car.ld. */