All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] lib: allow printing RISC-V EFI Boot Protocol GUID
@ 2022-01-28 18:42 Heinrich Schuchardt
  2022-01-29 21:09 ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2022-01-28 18:42 UTC (permalink / raw)
  To: Tom Rini
  Cc: Simon Glass, Patrick Delaunay, u-boot, Heinrich Schuchardt, Sunil V L

On RISC-V a new UEFI protocol has been introduced. Support printing
its GUID using %pUs.

Cc: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
cf.
[RFC PATCH V2 1/2] efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support
https://lists.denx.de/pipermail/u-boot/2022-January/473505.html
---
 lib/uuid.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/uuid.c b/lib/uuid.c
index 24571ef5fb..284f8113ff 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -220,7 +220,13 @@ static const struct {
 		"TCG2 Final Events Table",
 		EFI_TCG2_FINAL_EVENTS_TABLE_GUID,
 	},
+#ifdef CONFIG_EFI_RISCV_BOOT_PROTOCOL
+	{
+		"RISC-V Boot",
+		RISCV_EFI_BOOT_PROTOCOL_GUID,
+	},
 #endif
+#endif /* CONFIG_CMD_EFIDEBUG */
 #ifdef CONFIG_CMD_NVEDIT_EFI
 	/* signature database */
 	{
-- 
2.33.1


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

* Re: [PATCH 1/1] lib: allow printing RISC-V EFI Boot Protocol GUID
  2022-01-28 18:42 [PATCH 1/1] lib: allow printing RISC-V EFI Boot Protocol GUID Heinrich Schuchardt
@ 2022-01-29 21:09 ` Simon Glass
  2022-01-29 21:40   ` Heinrich Schuchardt
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2022-01-29 21:09 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Tom Rini, Patrick Delaunay, U-Boot Mailing List, Sunil V L

Hi Heinrich,

On Fri, 28 Jan 2022 at 11:42, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> On RISC-V a new UEFI protocol has been introduced. Support printing
> its GUID using %pUs.
>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> cf.
> [RFC PATCH V2 1/2] efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support
> https://lists.denx.de/pipermail/u-boot/2022-January/473505.html
> ---
>  lib/uuid.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/lib/uuid.c b/lib/uuid.c
> index 24571ef5fb..284f8113ff 100644
> --- a/lib/uuid.c
> +++ b/lib/uuid.c
> @@ -220,7 +220,13 @@ static const struct {
>                 "TCG2 Final Events Table",
>                 EFI_TCG2_FINAL_EVENTS_TABLE_GUID,
>         },
> +#ifdef CONFIG_EFI_RISCV_BOOT_PROTOCOL
> +       {
> +               "RISC-V Boot",
> +               RISCV_EFI_BOOT_PROTOCOL_GUID,
> +       },
>  #endif
> +#endif /* CONFIG_CMD_EFIDEBUG */
>  #ifdef CONFIG_CMD_NVEDIT_EFI
>         /* signature database */
>         {
> --
> 2.33.1
>

Why the #ifdef?

Regards,
Simon

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

* Re: [PATCH 1/1] lib: allow printing RISC-V EFI Boot Protocol GUID
  2022-01-29 21:09 ` Simon Glass
@ 2022-01-29 21:40   ` Heinrich Schuchardt
  2022-01-30 23:14     ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2022-01-29 21:40 UTC (permalink / raw)
  To: Simon Glass; +Cc: Tom Rini, Patrick Delaunay, U-Boot Mailing List, Sunil V L



On 1/29/22 22:09, Simon Glass wrote:
> Hi Heinrich,
> 
> On Fri, 28 Jan 2022 at 11:42, Heinrich Schuchardt
> <heinrich.schuchardt@canonical.com> wrote:
>>
>> On RISC-V a new UEFI protocol has been introduced. Support printing
>> its GUID using %pUs.
>>
>> Cc: Sunil V L <sunilvl@ventanamicro.com>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>> ---
>> cf.
>> [RFC PATCH V2 1/2] efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support
>> https://lists.denx.de/pipermail/u-boot/2022-January/473505.html
>> ---
>>   lib/uuid.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/lib/uuid.c b/lib/uuid.c
>> index 24571ef5fb..284f8113ff 100644
>> --- a/lib/uuid.c
>> +++ b/lib/uuid.c
>> @@ -220,7 +220,13 @@ static const struct {
>>                  "TCG2 Final Events Table",
>>                  EFI_TCG2_FINAL_EVENTS_TABLE_GUID,
>>          },
>> +#ifdef CONFIG_EFI_RISCV_BOOT_PROTOCOL
>> +       {
>> +               "RISC-V Boot",
>> +               RISCV_EFI_BOOT_PROTOCOL_GUID,
>> +       },
>>   #endif
>> +#endif /* CONFIG_CMD_EFIDEBUG */
>>   #ifdef CONFIG_CMD_NVEDIT_EFI
>>          /* signature database */
>>          {
>> --
>> 2.33.1
>>
> 
> Why the #ifdef?

We want a small size of the binary. Why should we add a text for a 
RISC-V GUID on ARM?

Best regards

Heinrich

> 
> Regards,
> Simon

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

* Re: [PATCH 1/1] lib: allow printing RISC-V EFI Boot Protocol GUID
  2022-01-29 21:40   ` Heinrich Schuchardt
@ 2022-01-30 23:14     ` Simon Glass
  2022-01-31  6:18       ` Heinrich Schuchardt
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2022-01-30 23:14 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Tom Rini, Patrick Delaunay, U-Boot Mailing List, Sunil V L

Hi Heinrich,

On Sat, 29 Jan 2022 at 14:40, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
>
>
> On 1/29/22 22:09, Simon Glass wrote:
> > Hi Heinrich,
> >
> > On Fri, 28 Jan 2022 at 11:42, Heinrich Schuchardt
> > <heinrich.schuchardt@canonical.com> wrote:
> >>
> >> On RISC-V a new UEFI protocol has been introduced. Support printing
> >> its GUID using %pUs.
> >>
> >> Cc: Sunil V L <sunilvl@ventanamicro.com>
> >> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> >> ---
> >> cf.
> >> [RFC PATCH V2 1/2] efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support
> >> https://lists.denx.de/pipermail/u-boot/2022-January/473505.html
> >> ---
> >>   lib/uuid.c | 6 ++++++
> >>   1 file changed, 6 insertions(+)
> >>
> >> diff --git a/lib/uuid.c b/lib/uuid.c
> >> index 24571ef5fb..284f8113ff 100644
> >> --- a/lib/uuid.c
> >> +++ b/lib/uuid.c
> >> @@ -220,7 +220,13 @@ static const struct {
> >>                  "TCG2 Final Events Table",
> >>                  EFI_TCG2_FINAL_EVENTS_TABLE_GUID,
> >>          },
> >> +#ifdef CONFIG_EFI_RISCV_BOOT_PROTOCOL
> >> +       {
> >> +               "RISC-V Boot",
> >> +               RISCV_EFI_BOOT_PROTOCOL_GUID,
> >> +       },
> >>   #endif
> >> +#endif /* CONFIG_CMD_EFIDEBUG */
> >>   #ifdef CONFIG_CMD_NVEDIT_EFI
> >>          /* signature database */
> >>          {
> >> --
> >> 2.33.1
> >>
> >
> > Why the #ifdef?
>
> We want a small size of the binary. Why should we add a text for a
> RISC-V GUID on ARM?

If we wanted a small binary size we would not be using UUIDs.

I was thinking that if you load an image for another arch it would be
very confusing if it were not recognised.

Regards,
Simon

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

* Re: [PATCH 1/1] lib: allow printing RISC-V EFI Boot Protocol GUID
  2022-01-30 23:14     ` Simon Glass
@ 2022-01-31  6:18       ` Heinrich Schuchardt
  2022-01-31 16:13         ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2022-01-31  6:18 UTC (permalink / raw)
  To: Simon Glass; +Cc: Tom Rini, Patrick Delaunay, U-Boot Mailing List, Sunil V L



On 1/31/22 00:14, Simon Glass wrote:
> Hi Heinrich,
> 
> On Sat, 29 Jan 2022 at 14:40, Heinrich Schuchardt
> <heinrich.schuchardt@canonical.com> wrote:
>>
>>
>>
>> On 1/29/22 22:09, Simon Glass wrote:
>>> Hi Heinrich,
>>>
>>> On Fri, 28 Jan 2022 at 11:42, Heinrich Schuchardt
>>> <heinrich.schuchardt@canonical.com> wrote:
>>>>
>>>> On RISC-V a new UEFI protocol has been introduced. Support printing
>>>> its GUID using %pUs.
>>>>
>>>> Cc: Sunil V L <sunilvl@ventanamicro.com>
>>>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>>>> ---
>>>> cf.
>>>> [RFC PATCH V2 1/2] efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support
>>>> https://lists.denx.de/pipermail/u-boot/2022-January/473505.html
>>>> ---
>>>>    lib/uuid.c | 6 ++++++
>>>>    1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/lib/uuid.c b/lib/uuid.c
>>>> index 24571ef5fb..284f8113ff 100644
>>>> --- a/lib/uuid.c
>>>> +++ b/lib/uuid.c
>>>> @@ -220,7 +220,13 @@ static const struct {
>>>>                   "TCG2 Final Events Table",
>>>>                   EFI_TCG2_FINAL_EVENTS_TABLE_GUID,
>>>>           },
>>>> +#ifdef CONFIG_EFI_RISCV_BOOT_PROTOCOL
>>>> +       {
>>>> +               "RISC-V Boot",
>>>> +               RISCV_EFI_BOOT_PROTOCOL_GUID,
>>>> +       },
>>>>    #endif
>>>> +#endif /* CONFIG_CMD_EFIDEBUG */
>>>>    #ifdef CONFIG_CMD_NVEDIT_EFI
>>>>           /* signature database */
>>>>           {
>>>> --
>>>> 2.33.1
>>>>
>>>
>>> Why the #ifdef?
>>
>> We want a small size of the binary. Why should we add a text for a
>> RISC-V GUID on ARM?
> 
> If we wanted a small binary size we would not be using UUIDs.
> 
> I was thinking that if you load an image for another arch it would be
> very confusing if it were not recognised.

If you try to run an image for another architecture you already get an 
error message indicating that U-Boot cannot run it.

This GUID is for a UEFI protocol that U-Boot exposes on RISC-V only.

Best regards

Heinrich

> 
> Regards,
> Simon

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

* Re: [PATCH 1/1] lib: allow printing RISC-V EFI Boot Protocol GUID
  2022-01-31  6:18       ` Heinrich Schuchardt
@ 2022-01-31 16:13         ` Simon Glass
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2022-01-31 16:13 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Tom Rini, Patrick Delaunay, U-Boot Mailing List, Sunil V L

Hi Heinrich,

On Sun, 30 Jan 2022 at 23:18, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
>
>
> On 1/31/22 00:14, Simon Glass wrote:
> > Hi Heinrich,
> >
> > On Sat, 29 Jan 2022 at 14:40, Heinrich Schuchardt
> > <heinrich.schuchardt@canonical.com> wrote:
> >>
> >>
> >>
> >> On 1/29/22 22:09, Simon Glass wrote:
> >>> Hi Heinrich,
> >>>
> >>> On Fri, 28 Jan 2022 at 11:42, Heinrich Schuchardt
> >>> <heinrich.schuchardt@canonical.com> wrote:
> >>>>
> >>>> On RISC-V a new UEFI protocol has been introduced. Support printing
> >>>> its GUID using %pUs.
> >>>>
> >>>> Cc: Sunil V L <sunilvl@ventanamicro.com>
> >>>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> >>>> ---
> >>>> cf.
> >>>> [RFC PATCH V2 1/2] efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support
> >>>> https://lists.denx.de/pipermail/u-boot/2022-January/473505.html
> >>>> ---
> >>>>    lib/uuid.c | 6 ++++++
> >>>>    1 file changed, 6 insertions(+)
> >>>>
> >>>> diff --git a/lib/uuid.c b/lib/uuid.c
> >>>> index 24571ef5fb..284f8113ff 100644
> >>>> --- a/lib/uuid.c
> >>>> +++ b/lib/uuid.c
> >>>> @@ -220,7 +220,13 @@ static const struct {
> >>>>                   "TCG2 Final Events Table",
> >>>>                   EFI_TCG2_FINAL_EVENTS_TABLE_GUID,
> >>>>           },
> >>>> +#ifdef CONFIG_EFI_RISCV_BOOT_PROTOCOL
> >>>> +       {
> >>>> +               "RISC-V Boot",
> >>>> +               RISCV_EFI_BOOT_PROTOCOL_GUID,
> >>>> +       },
> >>>>    #endif
> >>>> +#endif /* CONFIG_CMD_EFIDEBUG */
> >>>>    #ifdef CONFIG_CMD_NVEDIT_EFI
> >>>>           /* signature database */
> >>>>           {
> >>>> --
> >>>> 2.33.1
> >>>>
> >>>
> >>> Why the #ifdef?
> >>
> >> We want a small size of the binary. Why should we add a text for a
> >> RISC-V GUID on ARM?
> >
> > If we wanted a small binary size we would not be using UUIDs.
> >
> > I was thinking that if you load an image for another arch it would be
> > very confusing if it were not recognised.
>
> If you try to run an image for another architecture you already get an
> error message indicating that U-Boot cannot run it.
>
> This GUID is for a UEFI protocol that U-Boot exposes on RISC-V only.

OK, but how do we know what the caller is? Does it really make sense
to guess who might be calling this and drop stuff that we think
doesn't apply?

Anyway, if that's what you want, then go ahead.

Regards,
Simon

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

end of thread, other threads:[~2022-01-31 16:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 18:42 [PATCH 1/1] lib: allow printing RISC-V EFI Boot Protocol GUID Heinrich Schuchardt
2022-01-29 21:09 ` Simon Glass
2022-01-29 21:40   ` Heinrich Schuchardt
2022-01-30 23:14     ` Simon Glass
2022-01-31  6:18       ` Heinrich Schuchardt
2022-01-31 16:13         ` Simon Glass

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.