x86: coreboot: make it possible to process unhandled tags
PATCH 1/1 x86: coreboot: make it possible to process unhandled tags
coreboot makes it possible to add own entries into coreboot's table at a per mainboard basis. As there might be some custom ones it makes sense to provide a way to process them.
--- arch/x86/cpu/coreboot/tables.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/x86/cpu/coreboot/tables.c +5 -0
@@ -109,6 +109,8 @@ static void cb_parse_string(unsigned char *ptr, char **info) *info = (char *)((struct cb_string *)ptr)->string; } +__weak void cb_parse_unhandled (u32 tag,unsigned char *ptr) {} +static int cb_parse_header (void *addr,int len,struct sysinfo_t *info) {struct cb_header *header;
@@ -211,6 +213,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)case CB_TAG_VBNV :cb_parse_vbnv (ptr, info);break ; +default : +cb_parse_unhandled (rec->tag, ptr); +break ; } ptr += rec->size;
Signature · 1 line
2.20.1
PATCH 1/1 x86: coreboot: make it possible to process unhandled tags
Quoted 10 lines · Christian Gmeiner
coreboot makes it possible to add own entries into coreboot's table at a per mainboard basis. As there might be some custom ones it makes sense to provide a way to process them.
Signed-off-by Christian Gmeiner <[email protected]>--- arch/x86/cpu/coreboot/tables.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/x86/cpu/coreboot/tables.c static void cb_parse_string(unsigned char *ptr, char **info) · line 113
Quoted 10 lines
arch/x86/cpu/coreboot/tables.c +2
-0@@ -109,6 +109,8 @@ static void cb_parse_string(unsigned char *ptr, char **info) *info = (char *)((struct cb_string *)ptr)->string; } +__weak void cb_parse_unhandled (u32 tag,unsigned char *ptr) {} +
nits: I would prefer to have {} in sparate lines.
I can fix this when applying.
Quoted 14 lines
arch/x86/cpu/coreboot/tables.c +3
-1static int cb_parse_header (void *addr,int len,struct sysinfo_t *info) {struct cb_header *header;@@ -211,6 +213,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)case CB_TAG_VBNV :cb_parse_vbnv (ptr, info);break ; +default : +cb_parse_unhandled (rec->tag, ptr); +break ; } ptr += rec->size; --
PATCH 1/1 x86: coreboot: make it possible to process unhandled tags
Quoted 24 lines · Bin Meng
Quoted 10 lines · Christian Gmeiner
coreboot makes it possible to add own entries into coreboot's table at a per mainboard basis. As there might be some custom ones it makes sense to provide a way to process them.
Signed-off-by Christian Gmeiner <[email protected]>--- arch/x86/cpu/coreboot/tables.c | 5 +++++ 1 file changed, 5 insertions(+)Reviewed-by Bin Meng <[email protected]>Quoted 8 lines
arch/x86/cpu/coreboot/tables.c +0
-0@@ -109,6 +109,8 @@ static void cb_parse_string(unsigned char *ptr, char **info) *info = (char *)((struct cb_string *)ptr)->string; }
Quoted 6 lines
arch/x86/cpu/coreboot/tables.c static void cb_parse_string(unsigned char *ptr, char **info) · line 113
Quoted 2 lines
arch/x86/cpu/coreboot/tables.c +2
-0+__weak void cb_parse_unhandled (u32 tag,unsigned char *ptr) {} +nits: I would prefer to have {} in sparate lines.
I can fix this when applying.
Fixed the nits and applied to u-boot-x86, thanks!