All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] x86: coreboot: make it possible to process unhandled tags
@ 2019-04-17 12:42 Christian Gmeiner
  2019-05-16 13:18 ` Bin Meng
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Gmeiner @ 2019-04-17 12:42 UTC (permalink / raw)
  To: u-boot

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 <christian.gmeiner@gmail.com>
---
 arch/x86/cpu/coreboot/tables.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c
index bc18b710c9..a7c55c7dd1 100644
--- a/arch/x86/cpu/coreboot/tables.c
+++ b/arch/x86/cpu/coreboot/tables.c
@@ -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;
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] x86: coreboot: make it possible to process unhandled tags
  2019-04-17 12:42 [U-Boot] [PATCH] x86: coreboot: make it possible to process unhandled tags Christian Gmeiner
@ 2019-05-16 13:18 ` Bin Meng
  2019-05-16 13:22   ` Bin Meng
  0 siblings, 1 reply; 3+ messages in thread
From: Bin Meng @ 2019-05-16 13:18 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 17, 2019 at 8:42 PM Christian Gmeiner
<christian.gmeiner@gmail.com> wrote:
>
> 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 <christian.gmeiner@gmail.com>
> ---
>  arch/x86/cpu/coreboot/tables.c | 5 +++++
>  1 file changed, 5 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

> diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c
> index bc18b710c9..a7c55c7dd1 100644
> --- a/arch/x86/cpu/coreboot/tables.c
> +++ b/arch/x86/cpu/coreboot/tables.c
> @@ -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.

>  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;
> --

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] x86: coreboot: make it possible to process unhandled tags
  2019-05-16 13:18 ` Bin Meng
@ 2019-05-16 13:22   ` Bin Meng
  0 siblings, 0 replies; 3+ messages in thread
From: Bin Meng @ 2019-05-16 13:22 UTC (permalink / raw)
  To: u-boot

On Thu, May 16, 2019 at 9:18 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Apr 17, 2019 at 8:42 PM Christian Gmeiner
> <christian.gmeiner@gmail.com> wrote:
> >
> > 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 <christian.gmeiner@gmail.com>
> > ---
> >  arch/x86/cpu/coreboot/tables.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
>
> > diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c
> > index bc18b710c9..a7c55c7dd1 100644
> > --- a/arch/x86/cpu/coreboot/tables.c
> > +++ b/arch/x86/cpu/coreboot/tables.c
> > @@ -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.

Fixed the nits and applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-16 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17 12:42 [U-Boot] [PATCH] x86: coreboot: make it possible to process unhandled tags Christian Gmeiner
2019-05-16 13:18 ` Bin Meng
2019-05-16 13:22   ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.