Project

General

Profile

Actions

Feature #14231

closed

want support for SMBIOS 3.5

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

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The SMBIOS 3.5 specification was recently released. There are a few changes and a few new items that it's worth adding support for. Notably, there are two new items which are string properties and firmware inventory information. Here are examples of the tables being rendered from the test suite tables:

rm@iliad:/ws/rm/smbios/projects/illumos/usr/src/cmd/smbios$ ./smbios t/string\ property\ -\ basic.smbios 
ID    SIZE TYPE
1     25   SMB_TYPE_STRPROP (type 46) (String Property)

  Property ID: 1 (UEFI device path)
  Property Value: /not/really/uefi
  Parent Handle: 51966

rm@iliad:/ws/rm/smbios/projects/illumos/usr/src/cmd/smbios$ ./smbios t/firmware\ inventory\ -\ no\ components.smbios 
ID    SIZE TYPE
1     84   SMB_TYPE_FWINFO (type 45) (Firmware Inventory Information)

  Manufacturer: The Goddess Hylia
  Version: 1.3.1

  Component Name: Sheikah Slate
  ID: ganon
  Release Date: 2017-03-03
  Lowest Supported Version: zelda
  Version Format: 102
  ID Format: 102
  Image Size: 11538715
  Characteristics: 0x2
        SMB_FWC_WP (write-protect)
  State: 8 (unavailable offline)
  Number of Associated Components: 0

In addition, there are broader test suite additions to cover these and related bits.

Actions #1

Updated by Electric Monk 6 months ago

  • Gerrit CR set to 1796
Actions #2

Updated by Robert Mustacchi 6 months ago

Here is a full test suite run on its own:

rm@nienor:~$ /opt/util-tests/tests/smbios 
TEST PASSED: bad library version
TEST PASSED: bad library version (zeros)
TEST PASSED: smbios_info_* with bad id
TEST PASSED: smbios string functions
TEST PASSED: slot 3.2
TEST PASSED: slot 3.4 without peers
TEST PASSED: slot 3.4 with peers
TEST PASSED: slot 3.5 against 3.4 lib
TEST PASSED: slot 3.5
TEST PASSED: memory device 3.2 % 3.2
TEST PASSED: memory device 3.2 % 3.3
TEST PASSED: memory device 3.3
TEST PASSED: memory device 3.3
TEST PASSED: processor additional information - amd64
TEST PASSED: processor additional information - riscv
TEST PASSED: processor additional information - bad table length 1
TEST PASSED: processor additional information - bad table length 2
TEST PASSED: processor additional information - bad table length 3
TEST PASSED: processor additional information - bad table length 4
TEST PASSED: processor additional information - bad type
TEST PASSED: string property - bad table length 1
TEST PASSED: string property - bad table length 2
TEST PASSED: string property - bad type
TEST PASSED: string property - basic
TEST PASSED: string property - bad string
TEST PASSED: firmware inventory - bad base length
TEST PASSED: firmware inventory - bad comp length
TEST PASSED: firmware inventory - bad type
TEST PASSED: firmware inventory - no components
TEST PASSED: firmware inventory - components
TEST PASSED: chassis - bad length (2.4 table)
TEST PASSED: chassis - bad length (latest version)
TEST PASSED: chassis - bad length, expect sku
TEST PASSED: chassis - basic 2.4 version
TEST PASSED: chassis - sku, but no components
TEST PASSED: chassis - 2.4 version with comps
TEST PASSED: chassis - sku + comps
All tests passed successfully

And in the context of the broader util-tests:

rm@beowulf:~$ pfexec /opt/util-tests/bin/utiltest 
Test: /opt/util-tests/tests/allowed-ips (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/ar/artest (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/chown_test (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/date_test (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/find/findtest (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/grep_test (run as root)               [00:01] [PASS]
Test: /opt/util-tests/tests/head/head_test (run as root)          [00:00] [PASS]
Test: /opt/util-tests/tests/libjedec_test (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/libsff/libsff (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/make_test (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/mdb/mdbtest (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/mergeq/mqt (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/mergeq/wqt (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/pcidbtest (run as root)               [00:01] [PASS]
Test: /opt/util-tests/tests/pcieadm-priv (run as root)            [00:01] [PASS]
Test: /opt/util-tests/tests/pcieadmtest (run as root)             [00:03] [PASS]
Test: /opt/util-tests/tests/printf_test (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/set-linkprop (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/sleep/sleeptest (run as root)         [00:13] [PASS]
Test: /opt/util-tests/tests/smbios (run as root)                  [00:00] [PASS]
Test: /opt/util-tests/tests/svr4pkg_test (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/xargs_test (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/awk/runtests.sh (run as nobody)       [02:52] [PASS]
Test: /opt/util-tests/tests/ctf/precheck (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/ctf/ctftest (run as root)             [00:05] [PASS]
Test: /opt/util-tests/tests/demangle/afl-fast (run as root)       [00:01] [PASS]
Test: /opt/util-tests/tests/demangle/gcc-libstdc++ (run as root)  [00:00] [PASS]
Test: /opt/util-tests/tests/demangle/llvm-stdcxxabi (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_remove (run as root)   [00:00] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_trunc (run as root)    [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_00_blank (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_01_boolean (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_02_numbers (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_03_empty_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_04_number_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_05_strings (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_06_nested (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_07_nested_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/sed/sed_addr (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/sed/multi_test (run as root)          [00:00] [PASS]

Results Summary
PASS      40

Running Time:   00:03:25
Percent passed: 100.0%
Log directory:  /var/tmp/test_results/20211118T073409
Actions #3

Updated by Electric Monk 6 months ago

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

git commit d53cdfab6d4896af92b7a3df87a26060caf179ae

commit  d53cdfab6d4896af92b7a3df87a26060caf179ae
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2021-11-19T01:47:24.000Z

    14231 want support for SMBIOS 3.5
    14232 several smbios_info_* routines don't check for bad ids
    14233 smbios_info_chassis calculates sku number incorrectly
    14234 smbios chassis elements need work
    Reviewed by: Yuri Pankov <ypankov@tintri.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Rich Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF