Page MenuHomeFreeBSD

ipmi: support getting address from EFI

Authored by on Apr 27 2021, 6:23 AM.
Referenced Files
Unknown Object (File)
Tue, Feb 13, 1:10 AM
Unknown Object (File)
Sat, Feb 10, 1:33 AM
Unknown Object (File)
Jan 2 2024, 3:00 AM
Unknown Object (File)
Dec 27 2023, 6:31 PM
Unknown Object (File)
Dec 19 2023, 11:45 PM
Unknown Object (File)
Dec 12 2023, 9:34 AM
Unknown Object (File)
Dec 7 2023, 9:04 AM
Unknown Object (File)
Dec 1 2023, 7:31 PM



The original implementation only support get address from legacy BIOS (search the SMBIOS_SIG pattern in fix address space).

This new patch would try to get the SMBIOS table from EFI through efirt (EFI Runtime Services) firstly and would continuous search in the legacy BIOS if NULL address returned from EFI.

By this way the ipmi function could support both legacy BIOS and UEFI system.

This solution is also based on the following commits.
ipmi,smbios: move smbios_walk_table to smbios.h
smbios: support getting address from EFI

Test Plan

Use dmidecode to get the SMBIOS entry address in both legacy BIOS and EFI system and compare this address with the one return in efi_get_table or bios_sigsearch in the ipmi_smbios_probe.

Test with UEFI:
root@Freebsd:~ # dmidecode | less

  1. dmidecode 3.3
  2. SMBIOS entry point at 0x0ff74000

The address returned in ipmi_smbios_probe by efi_get_table is also 0xff74000 which means we got the correct address from efirt.

Test with legacy BIOS:
The address return by efi_get_table is 0 and returned by bios_sigsearch is 0xf69b0 which is same address as before.

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline created this revision.
dab requested changes to this revision.Apr 27 2021, 1:46 PM

Looks good; just a few style nits.


style(9) discourages initialization of variables in their declaration, so the initialization here should be dropped and moved to inside the condition compilation block at line 164:

	struct uuid efi_smbios;

style(9) discourages initialization of variables in their declaration, so this would be preferred:

	u_int32_t addr;

	addr = 0;

Initialize efi_smbios here:

	efi_smbios = EFI_TABLE_SMBIOS;
This revision now requires changes to proceed.Apr 27 2021, 1:46 PM
216–218 ↗(On Diff #88237)

Are the changes in this file really necessary? This file uses ACPI to find the device, not SMBIOS.

Did some change according to the comments.

Did some change according to the comments.

Did some change according to the comments.

This revision is now accepted and ready to land.Apr 29 2021, 2:44 PM
This revision was automatically updated to reflect the committed changes.