Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Smbios improvement v3 #10

Open
wants to merge 8 commits into
base: next
Choose a base branch
from
Open

Conversation

raymo200915
Copy link
Owner

Improve SMBIOS support with sysinfo platform-specific driver (armv8) and add all required structure types which are currently missing:
Type 7 - Cache Information
Type 9 - System Slots
Type 16 - Physical Memory Array
Type 17 - Memory Device
Type 19 - Memory Array Mapped Address

Test on qemu_arm64:
Disable CONFIG_CMD_QFW;
Enable CONFIG_GENERATE_SMBIOS_TABLE, CONFIG_SYSINFO and CONFIG_SYSINFO_SMBIOS.
Run smbios command in the U-Boot console.

This PR is based on #8, with below refactoring:

  1. Refactoring and miscellaneous fixes in SMBIOS library to align with the specification.
  2. Using DRVINFO and capsulate cache information of Armv8 as .plat of DRVINFO, and make it extensible for future to support other architectures.
  3. The code of reading Armv8 cache registers is now compatible with Armv8.3 extension.
  4. Some fixes and implementations of mapping the cache register values to SMBIOS type7 data structure.
  5. Retrieving processor information from Armv8 registers.

Add interface for sysinfo to access a data area from the platform.
This is useful to save/read a memory region of platform-specific
data.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Add sysinfo interface and definitions to support SMBIOS type 0 to
type 4.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Current SMBIOS library does not fully match to the specification.
It hardcodes values instead of exposing values from the device.
It does not support dynamic length for contained object handles
or elements and misses the handling of a few fields.

The refactoring of this patch includes:
1. Expose values from device via sysinfo interface.
2. Replace smbios_add_prop with smbios_add_prop_si to allow getting
   string values from sysinfo.
3. Add smbios_get_val_si to get int values from sysinfo.
4. Use sysinfo_get_data to get data area like contained object
   handles, elements or processor id.
5. Refactor SMBIOS cmd print functions to match the command output
   with the specification
6. Add new print functions for Type 0, 3 and 4.
7. Miscellaneous fixes in SMBIOS.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Add common sysinfo driver for armv8 platforms containing all
necessary SMBIOS information (Type 1 to 4).

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Add sysinfo interface and data structures for cache information
required by SMBIOS type 7.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Add SMBIOS type 7 (cache information) write functions.
Link cache handles from type 7 to type 4.
Add SMBIOS command print functions for type 7.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Add cache information sysinfo driver containing necessary information
required by SMBIOS type 7 for all armv8 platforms.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Enable sysinfo smbios by default for Arm64.
Do not enable QFW if SYSINFO_SMBIOS is defined.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant