diff mbox series

[v5,09/12] efi: smbios: Drop support for SMBIOS2 tables

Message ID 20231231152555.464874-10-sjg@chromium.org
State Accepted
Commit aa8499680c14afa80ed731b4cfcd6934b4f93712
Delegated to: Simon Glass
Headers show
Series smbios: Deal with tables beyond 4GB | expand

Commit Message

Simon Glass Dec. 31, 2023, 3:25 p.m. UTC
Only the v3 table is supported now, so always use this when installing
the EFI table.

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

Changes in v5:
- Add new patch to drop support for SMBIOS2 tables with EFI

 lib/efi_loader/efi_smbios.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Heinrich Schuchardt Dec. 31, 2023, 4:17 p.m. UTC | #1
On 12/31/23 16:25, Simon Glass wrote:
> Only the v3 table is supported now, so always use this when installing
> the EFI table.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>
> Changes in v5:
> - Add new patch to drop support for SMBIOS2 tables with EFI
>
>   lib/efi_loader/efi_smbios.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/lib/efi_loader/efi_smbios.c b/lib/efi_loader/efi_smbios.c
> index 5cbce6dc4eb..5db342ee0d7 100644
> --- a/lib/efi_loader/efi_smbios.c
> +++ b/lib/efi_loader/efi_smbios.c
> @@ -27,7 +27,6 @@ enum {
>    */
>   efi_status_t efi_smbios_register(void)
>   {
> -	const efi_guid_t *guid;
>   	ulong addr;
>   	efi_status_t ret;
>   	void *buf;
> @@ -47,8 +46,7 @@ efi_status_t efi_smbios_register(void)
>
>   	/* Install SMBIOS information as configuration table */
>   	buf = map_sysmem(addr, 0);
> -	guid = !memcmp(buf, "_SM_", 4) ? &smbios_guid : &smbios3_guid;
> -	ret = efi_install_configuration_table(guid, buf);
> +	ret = efi_install_configuration_table(&smbios3_guid, buf);
>   	unmap_sysmem(buf);
>
>   	return ret;
Simon Glass Jan. 8, 2024, 12:16 a.m. UTC | #2
On 12/31/23 16:25, Simon Glass wrote:
> Only the v3 table is supported now, so always use this when installing
> the EFI table.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>
> Changes in v5:
> - Add new patch to drop support for SMBIOS2 tables with EFI
>
>   lib/efi_loader/efi_smbios.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
Applied to u-boot-dm/next, thanks!
diff mbox series

Patch

diff --git a/lib/efi_loader/efi_smbios.c b/lib/efi_loader/efi_smbios.c
index 5cbce6dc4eb..5db342ee0d7 100644
--- a/lib/efi_loader/efi_smbios.c
+++ b/lib/efi_loader/efi_smbios.c
@@ -27,7 +27,6 @@  enum {
  */
 efi_status_t efi_smbios_register(void)
 {
-	const efi_guid_t *guid;
 	ulong addr;
 	efi_status_t ret;
 	void *buf;
@@ -47,8 +46,7 @@  efi_status_t efi_smbios_register(void)
 
 	/* Install SMBIOS information as configuration table */
 	buf = map_sysmem(addr, 0);
-	guid = !memcmp(buf, "_SM_", 4) ? &smbios_guid : &smbios3_guid;
-	ret = efi_install_configuration_table(guid, buf);
+	ret = efi_install_configuration_table(&smbios3_guid, buf);
 	unmap_sysmem(buf);
 
 	return ret;