Message ID | 20250903133639.3235920-1-sjg@u-boot.org |
---|---|
Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906613; bh=HdgJ41uEnrJ03aJRMFkLMDrxGKsmjB7fUNQo4MfLI7A=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=BUTKgQif72gXC3fUB5wjbc1MYlw8xPaXT7yrtGBg9e6u50Jahqr5TAip8lw7BYJnY gcYbZ2qNHXkz5UDQ16zInK5B/uYyatCzHcJxPj9KA/BlBwfqSp4+45A4SqbsdhH8Sx kHfW4k1tlECyaL++/DhD6a7+lK1vXA9Z0SJso/x9JuHgkF1ncwFwoYeRS9nj2JnxZ7 3lrNPygsc068E0JJcRPUQDZ8AoqXOfXZruDXsxqj3nbeXyOIu4xQ4z7O/9bkWCjbWM PzjFzx35DbvSvhiFGzBFX4gcpcJN2EcO5VaD8w+vjA45OU6x2R0ExymK9+nVfJVoc3 AOxDAXZ63d1vg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 56E4B67909 for <u-boot-concept@u-boot.org>; Wed, 3 Sep 2025 07:36:53 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 2MGe64Z0dmvr for <u-boot-concept@u-boot.org>; Wed, 3 Sep 2025 07:36:53 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906613; bh=HdgJ41uEnrJ03aJRMFkLMDrxGKsmjB7fUNQo4MfLI7A=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=BUTKgQif72gXC3fUB5wjbc1MYlw8xPaXT7yrtGBg9e6u50Jahqr5TAip8lw7BYJnY gcYbZ2qNHXkz5UDQ16zInK5B/uYyatCzHcJxPj9KA/BlBwfqSp4+45A4SqbsdhH8Sx kHfW4k1tlECyaL++/DhD6a7+lK1vXA9Z0SJso/x9JuHgkF1ncwFwoYeRS9nj2JnxZ7 3lrNPygsc068E0JJcRPUQDZ8AoqXOfXZruDXsxqj3nbeXyOIu4xQ4z7O/9bkWCjbWM PzjFzx35DbvSvhiFGzBFX4gcpcJN2EcO5VaD8w+vjA45OU6x2R0ExymK9+nVfJVoc3 AOxDAXZ63d1vg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4330B67894 for <u-boot-concept@u-boot.org>; Wed, 3 Sep 2025 07:36:53 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906610; bh=KNs3PvjI+qk8WYwkTMfKRxb0MkA3JTahfngebNuVDNw=; h=From:To:Cc:Subject:Date:From; b=CzVZ3QYTsFGQ0ZnYRdxRMJ0ijYwqk5kaEQwUp59jv8YapV7r5bYNZMz00OFYNJVlY neQt3Yb3PHn1If62PvmRSAVBFsPPXEIg1Xwq8a1tEddGZ57lfVcX5u4TvR1AN7EVXo 3dtKpfOw8mF5iAVQIbJWMGejPECDEHMSZZQ7YjMTPp9tixtKASTWNn1zGRh7TRrvdj om2wm8YKX4ikRtXnmIDnbVxmPZDtsiMLD1sC1ZITVQT7h1lxcdusi4H4z9j18B1j/2 G8vPmxzjHwvWfjjaLRPW0Um9XBxefpD/mj3TTW3utfYJe6ovcvUqcWs1uvkP7P+HET Lw2NV6zRIUjZw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 07EEB678B2; Wed, 3 Sep 2025 07:36:50 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id mP26W8quiN4F; Wed, 3 Sep 2025 07:36:49 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906609; bh=r4voZ+eq/bSM+QmWigOHc08kD+/n5TO6wHULka8AvJE=; h=From:To:Cc:Subject:Date:From; b=THVvwvC7acCeQ4r5D0alMogGN7sUkUCypTiVD+CsumnaaxLqRNH/PDV+AI6DaC4Hw SCCYRL0W0f5gAJjfpXV8S5b55Fd5PRPunIQ/4tptHEfnIZ6hZDt2PCLpzRKVPQdb5Z ZYdVsLx8Pyxvn/Vd9Y758A58ZxjfRUVoFY3vlhvlize8TdcTRwnNbrM7m/INly6f8e aJfWtwxyg4eUdwG32GyqO3S0ECsBi69lV28/kPizWJ9+41buWqVyVuJDwN8CKTaLNL EEaYXpjG04C7YyopzqBvAsabfdAL+nHRJQna1eUdlcF/bo81XgibCw52TrblqlfyEl X8i7IGnaQyg5Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2E8DE5FCF5; Wed, 3 Sep 2025 07:36:49 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 3 Sep 2025 07:36:00 -0600 Message-ID: <20250903133639.3235920-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: GS4ELHIF726PHMI63MJYNK5MNSURR2EV X-Message-ID-Hash: GS4ELHIF726PHMI63MJYNK5MNSURR2EV X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/25] Selection of devicetree using CHIDs List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/GS4ELHIF726PHMI63MJYNK5MNSURR2EV/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
Series |
Selection of devicetree using CHIDs
|
|
Message
Simon Glass
Sept. 3, 2025, 1:36 p.m. UTC
From: Simon Glass <sjg@chromium.org>
This series implements support for Microsoft's Computer Hardware
Identifier (CHID) specification in U-Boot. CHIDs provide a standardised
way to identify hardware configurations using SMBIOS data, enabling
automatic selection of appropriate device tree overlays and drivers when
the firmware itself lacks support for devicetree.
The CHID system generates UUIDs from various combinations of hardware
information (manufacturer, product name, BIOS version, etc.) creating a
hierarchy from most to least specific. This allows U-Boot to
automatically select the correct devicetree compatible-string for the
hardware on which it running.
This series includes:
* Core CHID Infrastructure:
- UUID v5 generation with Microsoft's CHID namespace
- Support for all 15 CHID variants (HardwareID-00 through HardwareID-14)
- SMBIOS data extraction and processing
* Devicetree Integration:
- hwids_to_dtsi.py script to convert CHID files to devicetree .dtsi
- Automatic inclusion of the .dtsi into the board'' devicetree
- Runtime compatible-string-selection based on hardware CHIDs
* chid command:
- chid show - show current hardware information and generated CHIDs
- chid list - list all supported CHID variants and generated UUIDs
- chid variants - show information about CHID variant restrictions
- chid compat - select the compatible string for current hardware
* ARM/EFI Support:
- CHID mappings for a selection of ARM-based Windows devices
- Support for Qualcomm Snapdragon platforms (MSM8998, SC7180, SC8180X,
SC8280XP, SDM850, X1E series)
* Testing:
- Sandbox tests using mock SMBIOS data
- CI integration for hwids_to_dtsi validation
- Validation against Microsoft's ComputerHardwareIds.exe output
Documentation is provided for this new subsystem and associated
commands.
Simon Glass (25):
lib: Rename gen_v5_guid() to indicate it is little-endian
uuid: Refactor v5 GUID generation into BE and LE variants
smbios: Correct logic in smbios_get_header()
smbios: Update smbios_get_header() to return a void *
smbios: Expand the documentation
smbios: Provide a sandbox test
smbios: Improve comments for entry-point structures
smbios: Add comments for smbios_type1 (System Information)
smbios: Add docs for the main types
test: Add more SMBIOS data to sandbox
efi: arm: Provide CHIDs for the app
efi: arm: Provide a mapping from CHIDs to compatible
chid: Create a basic CHID header and smbios interface
chid: Provide a command to access chid features
uuid: Add a constant for the length of a UUID
chid: Support calculating values for each variant
chid: Add subcommand for dealing with variants
chid: Provide some developer docs
scripts: Add a tool to convert CHIDs to devicetree
CI: Plumb in the hwids_to_dtsi tests
sandbox: Provide hwid files for testing
Makefile: Integrate CHID files into the build
chid: Implement selection of the compatible string
chid: doc: Describe how the CHID feature works
cmd: chid: Add 'compat' subcommand to find compatible string
.gitlab-ci.yml | 3 +-
arch/sandbox/dts/test.dts | 24 +
board/coreboot/coreboot/sysinfo.c | 31 +-
.../efi/efi-arm_app/hwids/compatible.hwidmap | 45 +
.../hwids/msm8998-lenovo-miix-630-81f1.txt | 33 +
.../efi-arm_app/hwids/sc7180-acer-aspire1.txt | 32 +
.../hwids/sc8180x-lenovo-flex-5g-81xe.txt | 32 +
.../hwids/sc8180x-lenovo-flex-5g-82ak.txt | 33 +
.../hwids/sc8280xp-huawei-gaokun3.txt | 38 +
.../sc8280xp-lenovo-thinkpad-x13s-21bx.txt | 33 +
.../sc8280xp-lenovo-thinkpad-x13s-21by.txt | 32 +
.../hwids/sc8280xp-microsoft-blackrock.txt | 32 +
.../sc8280xp-microsoft-surface-pro-9-5G.txt | 32 +
.../hwids/sdm850-lenovo-yoga-c630.txt | 32 +
.../efi/efi-arm_app/hwids/x1e001de-devkit.txt | 30 +
.../x1e78100-lenovo-thinkpad-t14s-21n1.txt | 38 +
.../x1e78100-lenovo-thinkpad-t14s-21n2.txt | 37 +
.../hwids/x1e80100-asus-vivobook-s15.txt | 38 +
.../hwids/x1e80100-asus-zenbook-a14.txt | 37 +
board/efi/efi-arm_app/hwids/x1e80100-crd.txt | 34 +
.../x1e80100-dell-inspiron-14-plus-7441.txt | 37 +
.../hwids/x1e80100-dell-latitude-7455.txt | 33 +
.../hwids/x1e80100-dell-xps13-9345.txt | 32 +
.../hwids/x1e80100-hp-omnibook-x14.txt | 33 +
.../hwids/x1e80100-lenovo-yoga-slim7x.txt | 32 +
.../hwids/x1e80100-microsoft-denali.txt | 37 +
.../hwids/x1e80100-microsoft-romulus13.txt | 37 +
.../hwids/x1e80100-microsoft-romulus15.txt | 37 +
.../hwids/x1p42100-asus-vivobook-s15.txt | 37 +
.../hwids/x1p42100-asus-zenbook-a14.txt | 37 +
.../hwids/x1p42100-hp-omnibook-x14.txt | 33 +
.../hwids/x1p42100-lenovo-ideapad-5-2in1.txt | 37 +
.../x1p42100-microsoft-surface-pro-12in.txt | 37 +
.../hwids/x1p64100-acer-swift-sf14-11.txt | 37 +
board/sandbox/hwids/compatible.hwidmap | 12 +
board/sandbox/hwids/test-device-1.txt | 22 +
board/sandbox/hwids/test-device-2.txt | 19 +
cmd/Kconfig | 10 +
cmd/Makefile | 1 +
cmd/chid.c | 160 ++++
cmd/smbios.c | 4 +-
doc/develop/chid.rst | 338 ++++++++
doc/develop/index.rst | 1 +
doc/develop/smbios.rst | 65 ++
doc/usage/cmd/chid.rst | 114 +++
doc/usage/cmd/smbios.rst | 3 +-
doc/usage/index.rst | 2 +
doc/usage/smbios.rst | 180 ++++
include/chid.h | 230 +++++
include/smbios.h | 239 +++++-
include/u-boot/uuid.h | 16 +-
lib/Kconfig | 9 +
lib/Makefile | 2 +
lib/chid.c | 515 ++++++++++++
lib/efi_loader/efi_firmware.c | 8 +-
lib/smbios-parser.c | 15 +-
lib/uuid.c | 30 +-
scripts/Makefile.lib | 21 +
scripts/hwids_to_dtsi.py | 795 ++++++++++++++++++
test/cmd/Makefile | 2 +
test/cmd/chid.c | 125 +++
test/cmd/smbios.c | 137 +++
test/lib/Makefile | 1 +
test/lib/chid.c | 392 +++++++++
test/lib/uuid.c | 10 +-
test/py/tests/test_smbios.py | 2 +-
test/run | 1 +
test/scripts/test_hwids_to_dtsi.py | 306 +++++++
tools/mkeficapsule.c | 7 +-
69 files changed, 4867 insertions(+), 69 deletions(-)
create mode 100644 board/efi/efi-arm_app/hwids/compatible.hwidmap
create mode 100644 board/efi/efi-arm_app/hwids/msm8998-lenovo-miix-630-81f1.txt
create mode 100644 board/efi/efi-arm_app/hwids/sc7180-acer-aspire1.txt
create mode 100644 board/efi/efi-arm_app/hwids/sc8180x-lenovo-flex-5g-81xe.txt
create mode 100644 board/efi/efi-arm_app/hwids/sc8180x-lenovo-flex-5g-82ak.txt
create mode 100644 board/efi/efi-arm_app/hwids/sc8280xp-huawei-gaokun3.txt
create mode 100644 board/efi/efi-arm_app/hwids/sc8280xp-lenovo-thinkpad-x13s-21bx.txt
create mode 100644 board/efi/efi-arm_app/hwids/sc8280xp-lenovo-thinkpad-x13s-21by.txt
create mode 100644 board/efi/efi-arm_app/hwids/sc8280xp-microsoft-blackrock.txt
create mode 100644 board/efi/efi-arm_app/hwids/sc8280xp-microsoft-surface-pro-9-5G.txt
create mode 100644 board/efi/efi-arm_app/hwids/sdm850-lenovo-yoga-c630.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e001de-devkit.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e78100-lenovo-thinkpad-t14s-21n1.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e78100-lenovo-thinkpad-t14s-21n2.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-asus-vivobook-s15.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-asus-zenbook-a14.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-crd.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-dell-inspiron-14-plus-7441.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-dell-latitude-7455.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-dell-xps13-9345.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-hp-omnibook-x14.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-lenovo-yoga-slim7x.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-microsoft-denali.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-microsoft-romulus13.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1e80100-microsoft-romulus15.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1p42100-asus-vivobook-s15.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1p42100-asus-zenbook-a14.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1p42100-hp-omnibook-x14.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1p42100-lenovo-ideapad-5-2in1.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1p42100-microsoft-surface-pro-12in.txt
create mode 100644 board/efi/efi-arm_app/hwids/x1p64100-acer-swift-sf14-11.txt
create mode 100644 board/sandbox/hwids/compatible.hwidmap
create mode 100644 board/sandbox/hwids/test-device-1.txt
create mode 100644 board/sandbox/hwids/test-device-2.txt
create mode 100644 cmd/chid.c
create mode 100644 doc/develop/chid.rst
create mode 100644 doc/usage/cmd/chid.rst
create mode 100644 doc/usage/smbios.rst
create mode 100644 include/chid.h
create mode 100644 lib/chid.c
create mode 100755 scripts/hwids_to_dtsi.py
create mode 100644 test/cmd/chid.c
create mode 100644 test/cmd/smbios.c
create mode 100644 test/lib/chid.c
create mode 100644 test/scripts/test_hwids_to_dtsi.py