[PATCH 2/2] smbios: copy QEMU tables
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Thu Dec 21 15:55:36 CET 2023
On 21.12.23 14:01, Bin Meng wrote:
> Hi Heinrich,
>
> On Thu, Dec 21, 2023 at 6:50 PM Heinrich Schuchardt
> <heinrich.schuchardt at canonical.com> wrote:
>>
>> QEMU provides SMBIOS tables with detailed information. We should not try to
>> replicate them in U-Boot.
>>
>> If we want to inform about U-Boot, we can add a Firmware Inventory
>> Information (type 45) table in future.
>>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>> ---
>> drivers/misc/Kconfig | 8 ++
>> drivers/misc/Makefile | 1 +
>> drivers/misc/qfw_smbios.c | 195 ++++++++++++++++++++++++++++++++++++
>> lib/efi_loader/efi_smbios.c | 4 +-
>> 4 files changed, 207 insertions(+), 1 deletion(-)
>> create mode 100644 drivers/misc/qfw_smbios.c
>>
>> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
>> index e8e4400516..3d885f12c8 100644
>> --- a/drivers/misc/Kconfig
>> +++ b/drivers/misc/Kconfig
>> @@ -561,6 +561,14 @@ config QFW_MMIO
>> Hidden option to enable MMIO QEMU fw_cfg interface. This will be
>> selected by the appropriate QEMU board.
>>
>> +config QFW_SMBIOS
>> + bool
>> + default y if ARM64
>> + default y if RISCV && 64BIT
>
> Would you add QEMU x86 support as well?
On x86_64 reading the QEMU SMBIOS firmware tables does not work for me.
x86 uses the qfw_pio driver instead of qfw_mmio.
x86 overwrites gd->arch.smbios_start in write_tables(). Copying SMBIOS
tables from QEMU would only make sense after some refactoring by the x86
maintainers.
Best regards
Heinrich
>
>> + depends on QFW && SMBIOS
>> + help
>> + Hidden option to read SMBIOS tables from QEMU.
>> +
>> config I2C_EEPROM
>> bool "Enable driver for generic I2C-attached EEPROMs"
>> depends on MISC
>
> [snip]
>
> Regards,
> Bin
More information about the U-Boot
mailing list