rules.h: change verstage name if it starts before bootblock

VBOOT_STARTS_VEFORE_BOOTBLOCK indicates that verstage starts before
bootblock. However "cbmem -1" will first try to match "bootblock
starting" to find out the beginning of console for current boot.

Change ENV_STRING for verstage to "verstage-before-bootblock" in the
case and add regex in cbmem utility to grab it.

BUG=b:159220781
TEST=flash and boot, check `cbmem -1`
BRANCH=zork

Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: Ica38f6bfeb05605caadac208e790fd072b352732
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46060
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
This commit is contained in:
Kangheui Won 2020-10-07 14:29:38 +11:00 committed by Edward O'Callaghan
parent 0f3ef704bb
commit 4b5c8b5541
2 changed files with 6 additions and 1 deletions

View File

@ -78,7 +78,11 @@
#define ENV_RMODULE 0 #define ENV_RMODULE 0
#define ENV_POSTCAR 0 #define ENV_POSTCAR 0
#define ENV_LIBAGESA 0 #define ENV_LIBAGESA 0
#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
#define ENV_STRING "verstage-before-bootblock"
#else
#define ENV_STRING "verstage" #define ENV_STRING "verstage"
#endif
#elif defined(__RAMSTAGE__) #elif defined(__RAMSTAGE__)
#define ENV_DECOMPRESSOR 0 #define ENV_DECOMPRESSOR 0

View File

@ -782,7 +782,8 @@ static void dump_console(int one_boot_only)
#define BANNER_REGEX(stage) \ #define BANNER_REGEX(stage) \
"\n\ncoreboot-[^\n]* " stage " starting.*\\.\\.\\.\n" "\n\ncoreboot-[^\n]* " stage " starting.*\\.\\.\\.\n"
#define OVERFLOW_REGEX(stage) "\n\\*\\*\\* Pre-CBMEM " stage " console overflow" #define OVERFLOW_REGEX(stage) "\n\\*\\*\\* Pre-CBMEM " stage " console overflow"
const char *regex[] = { BANNER_REGEX("bootblock"), const char *regex[] = { BANNER_REGEX("verstage-before-bootblock"),
BANNER_REGEX("bootblock"),
BANNER_REGEX("verstage"), BANNER_REGEX("verstage"),
OVERFLOW_REGEX("romstage"), OVERFLOW_REGEX("romstage"),
BANNER_REGEX("romstage"), BANNER_REGEX("romstage"),