My team mate Wei Huang started porting QEMU's "full" SMBIOS generator,
originally authored by Gabriel, to qemu-system-(arm|aarch64), machine
type "virt":

  http://thread.gmane.org/gmane.comp.emulators.qemu/351072

This series does the same on the firmware side.

The easy way to test it is the SMBIOSVIEW command in the UEFI shell.

The hard way to test it is finding a combination of aarch64 guest
software that doesn't choke on SMBIOS 2.8 (not 3.0 at the moment --
going to 3.0 will be QEMU-side work; the entry point version is
controlled by QEMU). At the moment this means a v4.2-rc1+ guest kernel,
and a dmidecode build (based on 2.12-dmifs) that knows to handle
"/sys/firmware/dmi/tables/smbios_entry_point".

Example dmidecode output (from a 4 VCPU aarch64 guest with 4 GB RAM):

> # dmidecode 2.12-dmifs
> SMBIOS 2.8 present.
> 11 structures occupying 490 bytes.
> Table at 0xFFFC0000.
>
> Handle 0x0100, DMI type 1, 27 bytes
> System Information
>       Manufacturer: QEMU
>       Product Name: QEMU Virtual Machine
>       Version: 1.0
>       Serial Number: Not Specified
>       UUID: BDAFE679-4CEA-6846-9709-BB02E959D254
>       Wake-up Type: Power Switch
>       SKU Number: Not Specified
>       Family: Not Specified
>
> Handle 0x0300, DMI type 3, 21 bytes
> Chassis Information
>       Manufacturer: QEMU
>       Type: Other
>       Lock: Not Present
>       Version: 1.0
>       Serial Number: Not Specified
>       Asset Tag: Not Specified
>       Boot-up State: Safe
>       Power Supply State: Safe
>       Thermal State: Safe
>       Security Status: Unknown
>       OEM Information: 0x00000000
>       Height: Unspecified
>       Number Of Power Cords: Unspecified
>       Contained Elements: 0
>
> Handle 0x0400, DMI type 4, 42 bytes
> Processor Information
>       Socket Designation: CPU 0
>       Type: Central Processor
>       Family: Other
>       Manufacturer: QEMU
>       ID: 00 00 00 00 00 00 00 00
>       Version: 1.0
>       Voltage: Unknown
>       External Clock: Unknown
>       Max Speed: 2000 MHz
>       Current Speed: 2000 MHz
>       Status: Populated, Enabled
>       Upgrade: Other
>       L1 Cache Handle: Not Provided
>       L2 Cache Handle: Not Provided
>       L3 Cache Handle: Not Provided
>       Serial Number: Not Specified
>       Asset Tag: Not Specified
>       Part Number: Not Specified
>       Core Count: 1
>       Core Enabled: 1
>       Thread Count: 1
>       Characteristics: None
>
> Handle 0x0401, DMI type 4, 42 bytes
> Processor Information
>       Socket Designation: CPU 1
>       Type: Central Processor
>       Family: Other
>       Manufacturer: QEMU
>       ID: 00 00 00 00 00 00 00 00
>       Version: 1.0
>       Voltage: Unknown
>       External Clock: Unknown
>       Max Speed: 2000 MHz
>       Current Speed: 2000 MHz
>       Status: Populated, Enabled
>       Upgrade: Other
>       L1 Cache Handle: Not Provided
>       L2 Cache Handle: Not Provided
>       L3 Cache Handle: Not Provided
>       Serial Number: Not Specified
>       Asset Tag: Not Specified
>       Part Number: Not Specified
>       Core Count: 1
>       Core Enabled: 1
>       Thread Count: 1
>       Characteristics: None
>
> Handle 0x0402, DMI type 4, 42 bytes
> Processor Information
>       Socket Designation: CPU 2
>       Type: Central Processor
>       Family: Other
>       Manufacturer: QEMU
>       ID: 00 00 00 00 00 00 00 00
>       Version: 1.0
>       Voltage: Unknown
>       External Clock: Unknown
>       Max Speed: 2000 MHz
>       Current Speed: 2000 MHz
>       Status: Populated, Enabled
>       Upgrade: Other
>       L1 Cache Handle: Not Provided
>       L2 Cache Handle: Not Provided
>       L3 Cache Handle: Not Provided
>       Serial Number: Not Specified
>       Asset Tag: Not Specified
>       Part Number: Not Specified
>       Core Count: 1
>       Core Enabled: 1
>       Thread Count: 1
>       Characteristics: None
>
> Handle 0x0403, DMI type 4, 42 bytes
> Processor Information
>       Socket Designation: CPU 3
>       Type: Central Processor
>       Family: Other
>       Manufacturer: QEMU
>       ID: 00 00 00 00 00 00 00 00
>       Version: 1.0
>       Voltage: Unknown
>       External Clock: Unknown
>       Max Speed: 2000 MHz
>       Current Speed: 2000 MHz
>       Status: Populated, Enabled
>       Upgrade: Other
>       L1 Cache Handle: Not Provided
>       L2 Cache Handle: Not Provided
>       L3 Cache Handle: Not Provided
>       Serial Number: Not Specified
>       Asset Tag: Not Specified
>       Part Number: Not Specified
>       Core Count: 1
>       Core Enabled: 1
>       Thread Count: 1
>       Characteristics: None
>
> Handle 0x1000, DMI type 16, 23 bytes
> Physical Memory Array
>       Location: Other
>       Use: System Memory
>       Error Correction Type: Multi-bit ECC
>       Maximum Capacity: 4 GB
>       Error Information Handle: Not Provided
>       Number Of Devices: 1
>
> Handle 0x1100, DMI type 17, 40 bytes
> Memory Device
>       Array Handle: 0x1000
>       Error Information Handle: Not Provided
>       Total Width: Unknown
>       Data Width: Unknown
>       Size: 4096 MB
>       Form Factor: DIMM
>       Set: None
>       Locator: DIMM 0
>       Bank Locator: Not Specified
>       Type: RAM
>       Type Detail: Other
>       Speed: Unknown
>       Manufacturer: QEMU
>       Serial Number: Not Specified
>       Asset Tag: Not Specified
>       Part Number: Not Specified
>       Rank: Unknown
>       Configured Clock Speed: Unknown
>       Minimum Voltage:  Unknown
>       Maximum Voltage:  Unknown
>       Configured Voltage:  Unknown
>
> Handle 0x2000, DMI type 32, 11 bytes
> System Boot Information
>       Status: No errors detected
>
> Handle 0x0000, DMI type 0, 24 bytes
> BIOS Information
>       Vendor: EFI Development Kit II / OVMF
>       Version: 0.0.0
>       Release Date: 02/06/2015
>       Address: 0xE8000
>       Runtime Size: 96 kB
>       ROM Size: 64 kB
>       Characteristics:
>               BIOS characteristics not supported
>               Targeted content distribution is supported
>               UEFI is supported
>               System is a virtual machine
>       BIOS Revision: 0.0
>
> Handle 0xFEFF, DMI type 127, 4 bytes
> End Of Table

Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Cc: Wei Huang <w...@redhat.com>
Cc: Jordan Justen <jordan.l.jus...@intel.com>
Cc: Wei Liu <wei.l...@citrix.com>
Cc: Gabriel Somlo <so...@cmu.edu>

Laszlo Ersek (6):
  OvmfPkg: SmbiosPlatformDxe: move IsEntryPointStructureValid() to Xen.c
  OvmfPkg: SmbiosPlatformDxe: restrict current Xen code to IA32/X64
  MdeModulePkg: SmbiosDxe: ARM and AARCH64 are VALID_ARCHITECTURES
  ArmVirtPkg: add QemuFwCfgToPcdDxe
  ArmVirtPkg: QemuFwCfgToPcdDxe: set SMBIOS entry point version
    dynamically
  ArmVirtPkg/ArmVirtQemu: support SMBIOS

 ArmVirtPkg/ArmVirtQemu.dsc                      | 12 ++++
 ArmVirtPkg/ArmVirtQemu.fdf                      |  8 +++
 ArmVirtPkg/QemuFwCfgToPcdDxe/QemuFwCfgToPcd.c   | 73 ++++++++++++++++++++
 ArmVirtPkg/QemuFwCfgToPcdDxe/QemuFwCfgToPcd.inf | 46 ++++++++++++
 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf  |  2 +-
 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c   | 40 ++---------
 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h   | 17 +----
 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 12 ++--
 OvmfPkg/SmbiosPlatformDxe/{Xen.c => X86Xen.c}   | 35 ++++++++++
 9 files changed, 190 insertions(+), 55 deletions(-)
 create mode 100644 ArmVirtPkg/QemuFwCfgToPcdDxe/QemuFwCfgToPcd.inf
 create mode 100644 ArmVirtPkg/QemuFwCfgToPcdDxe/QemuFwCfgToPcd.c
 rename OvmfPkg/SmbiosPlatformDxe/{Xen.c => X86Xen.c} (70%)

-- 
1.8.3.1


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to