Project

General

Profile

Actions

Bug #14312

closed

bhyve smbios type 3 structure is incorrect

Added by Robert Mustacchi 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

bhyve has its own definition of the type 3 chassis structure as follows:

struct smbios_table_type3 {
        struct smbios_structure header;
        uint8_t                 manufacturer;   /* manufacturer string */
        uint8_t                 type;           /* type */
        uint8_t                 version;        /* version string */
        uint8_t                 serial;         /* serial number string */
        uint8_t                 asset;          /* asset tag string */
        uint8_t                 bustate;        /* boot-up state */
        uint8_t                 psstate;        /* power supply state */
        uint8_t                 tstate;         /* thermal state */
        uint8_t                 security;       /* security status */
        uint8_t                 uheight;        /* height in 'u's */
        uint8_t                 cords;          /* number of power cords */
        uint8_t                 elems;          /* number of element records */
        uint8_t                 elemlen;        /* length of records */
        uint8_t                 sku;            /* sku number string */
} __packed;  

If you look at the SMBIOS specification, we'll find something is missing. In particular at offset 0Dh is supposed to be the OEM-defined field. This should go between security and height. It is not legal to actually skip this and will lead to other folks not properly interpreting later parts of the table.

Actions #1

Updated by Robert Mustacchi 8 months ago

  • Assignee set to Robert Mustacchi
Actions #2

Updated by Electric Monk 8 months ago

  • Gerrit CR set to 1876
Actions #3

Updated by Robert Mustacchi 8 months ago

This was tested on my behalf by Andy Fiddaman. In this case he booted an OmniOS and Debian guest and verified that the table data looked correct and in fact more so than previously.

Actions #4

Updated by Electric Monk 8 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 058c1d469107d655c5b92e9ffb2f0d30314f9e78

commit  058c1d469107d655c5b92e9ffb2f0d30314f9e78
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2021-12-24T18:31:11.000Z

    14312 bhyve smbios type 3 structure is incorrect
    Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF