fs: cbfs: Add missing standard CBFS component types
authorBin Meng <bmeng.cn@gmail.com>
Sat, 22 Dec 2018 09:55:51 +0000 (01:55 -0800)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 31 Dec 2018 01:42:41 +0000 (09:42 +0800)
Current CBFS component type list is incomplete. Add missing ones.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/cbfs.c
include/cbfs.h

index 4d3e0062df4a8cb7f428c23e95a0a9c6efc2f9a2..c118a952ac20ae93dd8ca5512f94f92731a6ea58 100644 (file)
@@ -112,12 +112,21 @@ static int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc,
                printf(" %8d", file_cbfs_size(file));
 
                switch (type) {
+               case CBFS_TYPE_BOOTBLOCK:
+                       type_name = "bootblock";
+                       break;
+               case CBFS_TYPE_CBFSHEADER:
+                       type_name = "cbfs header";
+                       break;
                case CBFS_TYPE_STAGE:
                        type_name = "stage";
                        break;
                case CBFS_TYPE_PAYLOAD:
                        type_name = "payload";
                        break;
+               case CBFS_TYPE_FIT:
+                       type_name = "fit";
+                       break;
                case CBFS_TYPE_OPTIONROM:
                        type_name = "option rom";
                        break;
@@ -136,9 +145,30 @@ static int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc,
                case CBFS_TYPE_MICROCODE:
                        type_name = "microcode";
                        break;
+               case CBFS_TYPE_FSP:
+                       type_name = "fsp";
+                       break;
+               case CBFS_TYPE_MRC:
+                       type_name = "mrc";
+                       break;
+               case CBFS_TYPE_MMA:
+                       type_name = "mma";
+                       break;
+               case CBFS_TYPE_EFI:
+                       type_name = "efi";
+                       break;
+               case CBFS_TYPE_STRUCT:
+                       type_name = "struct";
+                       break;
                case CBFS_TYPE_CMOS_DEFAULT:
                        type_name = "cmos default";
                        break;
+               case CBFS_TYPE_SPD:
+                       type_name = "spd";
+                       break;
+               case CBFS_TYPE_MRC_CACHE:
+                       type_name = "mrc cache";
+                       break;
                case CBFS_TYPE_CMOS_LAYOUT:
                        type_name = "cmos layout";
                        break;
index dd4b574869ed4f000f976d2a1da3d84cc98f9116..bd1bf75bbfcf9b121e7fdfb0af3a29420013d63a 100644 (file)
@@ -18,15 +18,25 @@ enum cbfs_result {
 };
 
 enum cbfs_filetype {
+       CBFS_TYPE_BOOTBLOCK = 0x01,
+       CBFS_TYPE_CBFSHEADER = 0x02,
        CBFS_TYPE_STAGE = 0x10,
        CBFS_TYPE_PAYLOAD = 0x20,
+       CBFS_TYPE_FIT = 0x21,
        CBFS_TYPE_OPTIONROM = 0x30,
        CBFS_TYPE_BOOTSPLASH = 0x40,
        CBFS_TYPE_RAW = 0x50,
        CBFS_TYPE_VSA = 0x51,
        CBFS_TYPE_MBI = 0x52,
        CBFS_TYPE_MICROCODE = 0x53,
+       CBFS_TYPE_FSP = 0x60,
+       CBFS_TYPE_MRC = 0x61,
+       CBFS_TYPE_MMA = 0x62,
+       CBFS_TYPE_EFI = 0x63,
+       CBFS_TYPE_STRUCT = 0x70,
        CBFS_TYPE_CMOS_DEFAULT = 0xaa,
+       CBFS_TYPE_SPD = 0xab,
+       CBFS_TYPE_MRC_CACHE = 0xac,
        CBFS_TYPE_CMOS_LAYOUT = 0x01aa
 };