Message ID | 20211204085647.v5.22.I06df84f267228992662b3897e92747937e6b317a@changeid |
---|---|
State | Changes Requested, archived |
Delegated to: | Heinrich Schuchardt |
Headers | show |
Series | efi: Improvements to U-Boot running on top of UEFI | expand |
On 12/4/21 07:56, Simon Glass wrote: > Show the revision of this table as it can be important. > > Alo update the 'efi table' entry to show the actual address of the EFI %s/Alo/Also/ > table rather than our table that points to it. This saves a step and the > intermediate table has nothing else in it. Should this information been shown by the 'efi' command instead of 'bdinfo'? Best regards Heinrich > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v5: > - Fix grammar in commit message > > Changes in v3: > - Add new patch to show the system-table revision > > arch/x86/cpu/efi/payload.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c > index d2aa889a2b9..b7778565b19 100644 > --- a/arch/x86/cpu/efi/payload.c > +++ b/arch/x86/cpu/efi/payload.c > @@ -7,6 +7,7 @@ > #include <common.h> > #include <cpu_func.h> > #include <efi.h> > +#include <efi_api.h> > #include <errno.h> > #include <init.h> > #include <log.h> > @@ -296,8 +297,14 @@ void setup_efi_info(struct efi_info *efi_info) > void efi_show_bdinfo(void) > { > struct efi_entry_systable *table = NULL; > + struct efi_system_table *sys_table; > int size, ret; > > ret = efi_info_get(EFIET_SYS_TABLE, (void **)&table, &size); > - bdinfo_print_num_l("efi_table", (ulong)table); > + if (!ret) { > + bdinfo_print_num_l("efi_table", table->sys_table); > + sys_table = (struct efi_system_table *)(uintptr_t) > + table->sys_table; > + bdinfo_print_num_l(" revision", sys_table->fw_revision); > + } > } >
Hi Heinrich, On Thu, 9 Dec 2021 at 13:34, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > > On 12/4/21 07:56, Simon Glass wrote: > > Show the revision of this table as it can be important. > > > > Alo update the 'efi table' entry to show the actual address of the EFI > > %s/Alo/Also/ > > > table rather than our table that points to it. This saves a step and the > > intermediate table has nothing else in it. > > Should this information been shown by the 'efi' command instead of 'bdinfo'? Perhaps we should add an 'efi info' command for this and various other things. We could show a lot more info. But as you know, I like to have EFI more integrated into U-Boot and the bdinfo command is used for all sorts of subsystems. It is a natural place for people to look for the basics. Regards, Simon
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c index d2aa889a2b9..b7778565b19 100644 --- a/arch/x86/cpu/efi/payload.c +++ b/arch/x86/cpu/efi/payload.c @@ -7,6 +7,7 @@ #include <common.h> #include <cpu_func.h> #include <efi.h> +#include <efi_api.h> #include <errno.h> #include <init.h> #include <log.h> @@ -296,8 +297,14 @@ void setup_efi_info(struct efi_info *efi_info) void efi_show_bdinfo(void) { struct efi_entry_systable *table = NULL; + struct efi_system_table *sys_table; int size, ret; ret = efi_info_get(EFIET_SYS_TABLE, (void **)&table, &size); - bdinfo_print_num_l("efi_table", (ulong)table); + if (!ret) { + bdinfo_print_num_l("efi_table", table->sys_table); + sys_table = (struct efi_system_table *)(uintptr_t) + table->sys_table; + bdinfo_print_num_l(" revision", sys_table->fw_revision); + } }
Show the revision of this table as it can be important. Alo update the 'efi table' entry to show the actual address of the EFI table rather than our table that points to it. This saves a step and the intermediate table has nothing else in it. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v5: - Fix grammar in commit message Changes in v3: - Add new patch to show the system-table revision arch/x86/cpu/efi/payload.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)