[U-Boot] [PATCH v6 00/10] efi_loader: Expose SMBIOS table

Alexander Graf agraf at suse.de
Fri Aug 19 01:23:20 CEST 2016


We generate a few tables on x86 today that really can be used on ARM just
the same. One such example is the SMBIOS table, which people use with tools
like "dmidecode" to identify which hardware they are running on.

We're slowly growing needs to collect serial numbers from various devices
on ARM and SMBIOS seems the natural choice. So this patch set moves the
current SMBIOS generation into generic code and adds serial number exposure
to it.

I have verified that I get a correct serial number printed in dmidecode on
the RPi3.

v1 -> v2:

  - Also populate UUID
  - Fix whitespace

v2 -> v3:

  - Move efi smbios generation to own file
  - New patch: Make type4 table available on all archs

v3 -> v4:

  - Use device model

v4 -> v5:

  - s/get_info/get_vendor/ typo
  - s/smbios_write_type4_arch/smbios_write_type4_dm/

v5 -> v6:

  - move csum into C file
  - new patch: cpu: Add DMTF id and family fields
  - new patch: cpu: Add get_vendor callback
  - change calling convention of get_vendor()
  - add comments on DMTF fields

Alexander Graf (10):
  x86: Move table csum into separate file
  x86: Move smbios generation into arch independent directory
  efi_loader: Expose efi_install_configuration_table
  smbios: Allow compilation on 64bit systems
  cpu: Add DMTF id and family fields
  cpu: Add get_vendor callback
  smbios: Generate type 4 on non-x86 systems
  smbios: Expose in efi_loader as table
  efi_loader: Fix efi_install_configuration_table
  smbios: Provide serial number

 arch/x86/Kconfig                           | 27 ----------
 arch/x86/cpu/baytrail/cpu.c                |  1 +
 arch/x86/cpu/broadwell/cpu.c               |  1 +
 arch/x86/cpu/cpu_x86.c                     | 18 +++++++
 arch/x86/cpu/ivybridge/model_206ax.c       |  1 +
 arch/x86/include/asm/cpu_x86.h             | 13 +++++
 arch/x86/include/asm/tables.h              |  2 +
 arch/x86/lib/Makefile                      |  1 -
 arch/x86/lib/tables.c                      | 21 +++-----
 cmd/bootefi.c                              |  3 ++
 drivers/cpu/cpu-uclass.c                   | 10 ++++
 include/cpu.h                              | 22 ++++++++
 include/efi_api.h                          |  4 ++
 include/efi_loader.h                       |  4 ++
 {arch/x86/include/asm => include}/smbios.h |  8 ++-
 include/tables_csum.h                      | 12 +++++
 lib/Kconfig                                | 33 ++++++++++++
 lib/Makefile                               |  2 +
 lib/efi_loader/Makefile                    |  1 +
 lib/efi_loader/efi_boottime.c              | 24 +++++----
 lib/efi_loader/efi_smbios.c                | 32 ++++++++++++
 {arch/x86/lib => lib}/smbios.c             | 82 +++++++++++++++++++++---------
 lib/tables_csum.c                          | 20 ++++++++
 23 files changed, 265 insertions(+), 77 deletions(-)
 rename {arch/x86/include/asm => include}/smbios.h (95%)
 create mode 100644 include/tables_csum.h
 create mode 100644 lib/efi_loader/efi_smbios.c
 rename {arch/x86/lib => lib}/smbios.c (78%)
 create mode 100644 lib/tables_csum.c

-- 
1.8.5.6



More information about the U-Boot mailing list