coreinfo/cbfs: Add some missing file types

An alternative to this patch is to copy the filetypes table from
util/cbfstool/cbfs.h and use that.

Change-Id: Iebf3a7a8912761ff6825a6f51c8b68df0dcc5990
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14026
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Jonathan Neuschäfer 2016-03-10 05:37:27 +01:00 committed by Martin Roth
parent 8a61a2f2d5
commit 5368504e44
1 changed files with 20 additions and 0 deletions

View File

@ -23,9 +23,14 @@
#define LARCHIVE_MAGIC 0x455649484352414cLL /* "LARCHIVE" */ #define LARCHIVE_MAGIC 0x455649484352414cLL /* "LARCHIVE" */
#define COMPONENT_DELETED 0x00 #define COMPONENT_DELETED 0x00
#define COMPONENT_BOOTBLOCK 0x01
#define COMPONENT_CBFSHEADER 0x02
#define COMPONENT_STAGE 0x10 #define COMPONENT_STAGE 0x10
#define COMPONENT_PAYLOAD 0x20 #define COMPONENT_PAYLOAD 0x20
#define COMPONENT_OPTIONROM 0x30 #define COMPONENT_OPTIONROM 0x30
#define COMPONENT_RAW 0x50
#define COMPONENT_MICROCODE 0x53
#define COMPONENT_CMOS_LAYOUT 0x1aa
#define COMPONENT_NULL 0xffffffff #define COMPONENT_NULL 0xffffffff
struct cbheader { struct cbheader {
@ -156,6 +161,12 @@ static int cbfs_module_redraw(WINDOW * win)
/* mvwprintw(win, row++, 32, "Offset: 0x%x", f->offset); *//* FIXME */ /* mvwprintw(win, row++, 32, "Offset: 0x%x", f->offset); *//* FIXME */
mvwprintw(win, row, 32, "Type: "); mvwprintw(win, row, 32, "Type: ");
switch (ntohl(f->type)) { switch (ntohl(f->type)) {
case COMPONENT_BOOTBLOCK:
mvwprintw(win, row++, 38, "bootblock");
break;
case COMPONENT_CBFSHEADER:
mvwprintw(win, row++, 38, "CBFS header");
break;
case COMPONENT_STAGE: case COMPONENT_STAGE:
mvwprintw(win, row++, 38, "stage"); mvwprintw(win, row++, 38, "stage");
break; break;
@ -165,6 +176,15 @@ static int cbfs_module_redraw(WINDOW * win)
case COMPONENT_OPTIONROM: case COMPONENT_OPTIONROM:
mvwprintw(win, row++, 38, "optionrom"); mvwprintw(win, row++, 38, "optionrom");
break; break;
case COMPONENT_RAW:
mvwprintw(win, row++, 38, "raw");
break;
case COMPONENT_MICROCODE:
mvwprintw(win, row++, 38, "microcode");
break;
case COMPONENT_CMOS_LAYOUT:
mvwprintw(win, row++, 38, "cmos layout");
break;
case COMPONENT_NULL: case COMPONENT_NULL:
mvwprintw(win, row++, 38, "free"); mvwprintw(win, row++, 38, "free");
break; break;