Page MenuHomeFreeBSD

bhyve: add SMBIOS Baseboard Information
ClosedPublic

Authored by chuck on Apr 8 2021, 7:18 PM.

Details

Summary

Add the System Management BIOS Baseboard (or Module) Information
a.k.a. Type 2 structure to the SMBIOS emulation.

Test Plan

Run dmidecode -t 2 and verify output
Also tested against a Linux appliance image with a buggy kernel drive which assumes these values exist

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

chuck requested review of this revision.Apr 8 2021, 7:18 PM
This revision is now accepted and ready to land.Apr 9 2021, 4:47 AM

Looks good.

Running the smbiosview command from the EFI shell prompt (non type-2 tables excluded:

Shell> smbiosview
...
=========================================================
Type=2, Handle=0x3
Dump Structure as:
Index=2,Length=0x31,Addr=0x3FBCB077
00000000: 02 0F 03 00 01 02 03 04-05 01 06 03 00 0A 00 46  *...............F*
00000010: 72 65 65 42 53 44 00 42-48 59 56 45 00 31 2E 30  *reeBSD.BHYVE.1.0*
00000020: 00 4E 6F 6E 65 00 4E 6F-6E 65 00 4E 6F 6E 65 00  *.None.None.None.*
00000030: 00                                               *.*
Structure Type: Base Board Information
Format part Len : 15
Structure Handle: 3
Manufacturer: FreeBSD
ProductName: BHYVE
Version: 1.0
SerialNumber: None
AssetTag: None
Base Board Feature Flags: Hosting board
LocationInChassis: None
ChassisHandle: 0x3
Base Board Board Type: Motherboard

Just a comment typo: "number of contained objecct handles" - should be "object".

I noticed this is against the svn repo:

Repository rS FreeBSD src repository - subversion"

You'll probably want to switch over to Git and rebase this patch.

Just a comment typo: "number of contained objecct handles" - should be "object".

Ah, thanks!

This revision was automatically updated to reflect the committed changes.

FYI, the repository is wrong because of the .arcconfig in and that 'rS' still references the old svn repository. @lwhsu was going to look at either renaming the rS alias to the git repository, or adding a new alias that could be used in .arcconfig to fix this.

In D29657#666751, @jhb wrote:

FYI, the repository is wrong because of the .arcconfig in and that 'rS' still references the old svn repository. @lwhsu was going to look at either renaming the rS alias to the git repository, or adding a new alias that could be used in .arcconfig to fix this.

The work was done via git, but I used git-arc for the first time to submit the review. I poked through the script, but didn't find anything that obviously set the repository.

The repository is set implicitly via the .arcconfig file. All my reviews are wrong as well until such time as either .arcconfig or the phab config is changed.