diff mbox series

[v3,31/40] efi: Show the vendor in helloworld

Message ID 20240811145209.4191404-32-sjg@chromium.org
State Changes Requested
Delegated to: Tom Rini
Headers show
Series efi: Add a test for EFI bootmeth | expand

Commit Message

Simon Glass Aug. 11, 2024, 2:52 p.m. UTC
Show the vendor name so it is clear which firmware is being used, e.g.
whether U-Boot is providing the boot services.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v2)

Changes in v2:
- Reword commit message
- Use 'Firmware vendor' instead of just 'Vendor'

 lib/efi_loader/helloworld.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Ilias Apalodimas Aug. 12, 2024, 7:58 a.m. UTC | #1
On Sun, 11 Aug 2024 at 17:52, Simon Glass <sjg@chromium.org> wrote:
>
> Show the vendor name so it is clear which firmware is being used, e.g.
> whether U-Boot is providing the boot services.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> (no changes since v2)
>
> Changes in v2:
> - Reword commit message
> - Use 'Firmware vendor' instead of just 'Vendor'
>
>  lib/efi_loader/helloworld.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c
> index 586177de0c8..c4d2afcb40a 100644
> --- a/lib/efi_loader/helloworld.c
> +++ b/lib/efi_loader/helloworld.c
> @@ -237,6 +237,9 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
>                         (con_out, u"Missing device path for device handle\r\n");
>                 goto out;
>         }
> +       con_out->output_string(con_out, u"Firmware vendor: ");
> +       con_out->output_string(con_out, systab->fw_vendor);
> +       con_out->output_string(con_out, u"\n");
>         con_out->output_string(con_out, u"Boot device: ");
>         ret = print_device_path(device_path, device_path_to_text);
>         if (ret != EFI_SUCCESS)
> --
> 2.34.1
>
Ilias Apalodimas Aug. 12, 2024, 7:58 a.m. UTC | #2
On Sun, 11 Aug 2024 at 17:52, Simon Glass <sjg@chromium.org> wrote:
>
> Show the vendor name so it is clear which firmware is being used, e.g.
> whether U-Boot is providing the boot services.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> (no changes since v2)
>
> Changes in v2:
> - Reword commit message
> - Use 'Firmware vendor' instead of just 'Vendor'
>
>  lib/efi_loader/helloworld.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c
> index 586177de0c8..c4d2afcb40a 100644
> --- a/lib/efi_loader/helloworld.c
> +++ b/lib/efi_loader/helloworld.c
> @@ -237,6 +237,9 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
>                         (con_out, u"Missing device path for device handle\r\n");
>                 goto out;
>         }
> +       con_out->output_string(con_out, u"Firmware vendor: ");
> +       con_out->output_string(con_out, systab->fw_vendor);
> +       con_out->output_string(con_out, u"\n");
>         con_out->output_string(con_out, u"Boot device: ");
>         ret = print_device_path(device_path, device_path_to_text);
>         if (ret != EFI_SUCCESS)
> --
> 2.34.1
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt Aug. 12, 2024, 10:35 a.m. UTC | #3
Am 12. August 2024 09:58:28 MESZ schrieb Ilias Apalodimas <ilias.apalodimas@linaro.org>:
>On Sun, 11 Aug 2024 at 17:52, Simon Glass <sjg@chromium.org> wrote:
>>
>> Show the vendor name so it is clear which firmware is being used, e.g.
>> whether U-Boot is providing the boot services.

I never had any doubt about which firmware I am using.

Originally you expected "U-Boot" to be printed on any device as indication of the copyright.

Why is this patch needed? Are you checking the output anywhere?


>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> (no changes since v2)
>>
>> Changes in v2:
>> - Reword commit message
>> - Use 'Firmware vendor' instead of just 'Vendor'
>>
>>  lib/efi_loader/helloworld.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c
>> index 586177de0c8..c4d2afcb40a 100644
>> --- a/lib/efi_loader/helloworld.c
>> +++ b/lib/efi_loader/helloworld.c
>> @@ -237,6 +237,9 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
>>                         (con_out, u"Missing device path for device handle\r\n");
>>                 goto out;
>>         }
>> +       con_out->output_string(con_out, u"Firmware vendor: ");
>> +       con_out->output_string(con_out, systab->fw_vendor);
>> +       con_out->output_string(con_out, u"\n");

How about FirmwareRevision"?

Best regards

Heinrich

>>         con_out->output_string(con_out, u"Boot device: ");
>>         ret = print_device_path(device_path, device_path_to_text);
>>         if (ret != EFI_SUCCESS)
>> --
>> 2.34.1
>>
>Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Simon Glass Aug. 13, 2024, 12:17 p.m. UTC | #4
Hi Heinrich,

On Mon, 12 Aug 2024 at 04:35, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Am 12. August 2024 09:58:28 MESZ schrieb Ilias Apalodimas <ilias.apalodimas@linaro.org>:
> >On Sun, 11 Aug 2024 at 17:52, Simon Glass <sjg@chromium.org> wrote:
> >>
> >> Show the vendor name so it is clear which firmware is being used, e.g.
> >> whether U-Boot is providing the boot services.
>
> I never had any doubt about which firmware I am using.
>
> Originally you expected "U-Boot" to be printed on any device as indication of the copyright.
>
> Why is this patch needed? Are you checking the output anywhere?

Not at present. It is just nice to see U-Boot printed out when the test runs.

>
>
> >>
> >> Signed-off-by: Simon Glass <sjg@chromium.org>
> >> ---
> >>
> >> (no changes since v2)
> >>
> >> Changes in v2:
> >> - Reword commit message
> >> - Use 'Firmware vendor' instead of just 'Vendor'
> >>
> >>  lib/efi_loader/helloworld.c | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c
> >> index 586177de0c8..c4d2afcb40a 100644
> >> --- a/lib/efi_loader/helloworld.c
> >> +++ b/lib/efi_loader/helloworld.c
> >> @@ -237,6 +237,9 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
> >>                         (con_out, u"Missing device path for device handle\r\n");
> >>                 goto out;
> >>         }
> >> +       con_out->output_string(con_out, u"Firmware vendor: ");
> >> +       con_out->output_string(con_out, systab->fw_vendor);
> >> +       con_out->output_string(con_out, u"\n");
>
> How about FirmwareRevision"?

How about we start by getting this series in and then we can enhance it.

>
> Best regards
>
> Heinrich
>
> >>         con_out->output_string(con_out, u"Boot device: ");
> >>         ret = print_device_path(device_path, device_path_to_text);
> >>         if (ret != EFI_SUCCESS)
> >> --
> >> 2.34.1
> >>
> >Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Regards,
Simon
diff mbox series

Patch

diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c
index 586177de0c8..c4d2afcb40a 100644
--- a/lib/efi_loader/helloworld.c
+++ b/lib/efi_loader/helloworld.c
@@ -237,6 +237,9 @@  efi_status_t EFIAPI efi_main(efi_handle_t handle,
 			(con_out, u"Missing device path for device handle\r\n");
 		goto out;
 	}
+	con_out->output_string(con_out, u"Firmware vendor: ");
+	con_out->output_string(con_out, systab->fw_vendor);
+	con_out->output_string(con_out, u"\n");
 	con_out->output_string(con_out, u"Boot device: ");
 	ret = print_device_path(device_path, device_path_to_text);
 	if (ret != EFI_SUCCESS)