From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EF7B2C5DF81 for ; Wed, 19 Aug 2026 06:37:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC27310ED2A; Wed, 19 Aug 2026 06:37:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=starlabs-systems.20251104.gappssmtp.com header.i=@starlabs-systems.20251104.gappssmtp.com header.b="Od25c9tp"; dkim-atps=neutral Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3764510E477 for ; Mon, 17 Aug 2026 21:54:55 +0000 (UTC) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-47db714766aso231181f8f.0 for ; Mon, 17 Aug 2026 14:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starlabs-systems.20251104.gappssmtp.com; s=20251104; t=1787003693; x=1787608493; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=2r14PQPnRwiCu2pDxGMLEtZiP7xW2TLvpcZv4TNoYzM=; b=Od25c9tpwBHvf0WhGZCKflDBUcptSuwZql5dNuiVpyORBr+jeqkaAxVyIHUvIGFUGi g4LFI2ALFg7qNyDxbDdfyafgeuXaeSPciDmXWEPxmJwb0tKAnFyyFvFB0RFPHsdGPsIV orOfAuMCqxay9wSXHqpURs5TiSdczGBrXNiXej9D/LOUjisZN2LZM/NcWVfXGxDRKlJZ 1/jbbZEMYYGYq68cxa7fBc1KyA2cVsNvfIrGJm8YJPMFK9vWgngMW1l7Dq+A5cHudGVB dAwAUSfBFn0YjuPZzCQfEP/BXaNu+S4B+nZbd+mkmQ8QaAyX3n0cC4VUC/FM3Xax2xDw +WRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787003693; x=1787608493; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=2r14PQPnRwiCu2pDxGMLEtZiP7xW2TLvpcZv4TNoYzM=; b=CNBQ9LZF7WaCzj394f1UPk93nOlKTpJmbXvTKeaa6VuebmaUkrkuGCcSYYN2nFFmRO W6BnOHojuehEKEYUyK2l6TVWXziruEKt/t0H6H0cKSOuCbLB3rP9uwFQibLt9llpRN39 XG6Cmr7h2VbckHSxFb8bl5mkg3LsEDi2lZxENr3rjEbrAts5XbD4TNMW6hs13+R36+wL gWpbtHjC+Ad4i4jQQqZiq3ROESCUpWKBMQKFCgAw3T/SV1H4925xHksG0CRGqOWpL5cY Tl2wHY8l6m0A1s9BL48xDsk9p5Sg+14hV0fFCNxzocqB9dJK1z6wuAk8UfHI9xxP3PTZ w/gg== X-Forwarded-Encrypted: i=1; AHgh+RoV01wvXMHldDVUVRUZin+cZXiFdEBBr1rEtubaAFEjHq3ZelCdC5VgW7xhfITfJ/TMWTEttQdXhSo=@lists.freedesktop.org X-Gm-Message-State: AOJu0YxDut54PW+5aP8lw5s7HeSFApVlxRrdCC6BMaWNxtBFJa8gHTyo GeXyQJiTpnR3mFyO7uZ6EwPJNEaqHHupz6U2g6cdGVc2fwRFt0OdE7KpImII+KIynQ== X-Gm-Gg: AR+sD12XOzy94+j/uHmbINmWt2daBXWud6P90OWWUa6FD9rxPkdGzzyiAm/doi4tvwO nf08CQWQs10PKg3qy+0+a/OQq/Q503pXl0SdRjUbTq4Ocn/aywq2BTses1wniWsW57GZRagxRdp GBK1KsDiDbfraflNnQa0UgZzDlwvrmoaNl6iBCMegORgMaFCgAaSy3x3fVCibNavLq7RitETJ3e zgrnDdQbCPOaTgi8eqagLNEYSwoTgaimzRHfT1elqrKz8a+tcLcgLc7VUc3aA+9N3GU72w9JoG0 4bkCcBxWU7+ZWFAR7q3sFMuYJnPFxPQEPIsqmuZOXM/CQwTR8qWNL8ILxzgw+gBVMcr+AARqNAy DHn9VK0G2ZiyoKsLCAZoF5hYUl0yl3gpM1ZSw7FNeMl3o8WPz9P/54Anp7vtHXT6RXfOxVmOsWg xtTSe2abWfnCTUruxrw4nkdpIUiFyUrwYaEQZXaemUPl6ganuwndifQSd3pEqClm4Ola9Gm/E/0 Oh7TzwBAnGTbEuYuFCT6RM9 X-Received: by 2002:a05:6000:2413:b0:481:5a46:dbef with SMTP id ffacd0b85a97d-482a9da47cbmr4359471f8f.5.1787003693114; Mon, 17 Aug 2026 14:54:53 -0700 (PDT) Received: from horizon ([217.155.46.38]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482a5a3b3f0sm6060954f8f.14.2026.08.17.14.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2026 14:54:52 -0700 (PDT) From: Sean Rhodes To: chrome-platform@lists.linux.dev Cc: Corentin Chary , "Luke D. Jones" , Denis Benato , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Prasanth Ksr , Jorge Lopez , Mark Pearson , "Derek J. Clark" , Joshua Grisham , platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com, Sean Rhodes , "Michael S. Tsirkin" , Chen-Yu Tsai , Huacai Chen , Tzung-Bi Shih , Brian Norris , Julius Werner , Thomas Zimmermann , Javier Martinez Canillas , Maarten Lankhorst , Maxime Ripard , David Airlie , Simona Vetter , Florian Fainelli , Takashi Sakamoto , Bjorn Helgaas , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= , Titouan Ameline de Cadeville , Kees Cook , Danilo Krummrich , dri-devel@lists.freedesktop.org, Krzysztof Kozlowski , Bjorn Andersson , Dmitry Baryshkov , Geert Uytterhoeven , Arnd Bergmann , Eric Biggers , Luca Weiss , Michal Simek , Sven Peter , linux-kernel@vger.kernel.org, oliver@liuxiaozhen.dev Subject: [PATCH v13 RESEND 0/5] coreboot CFR firmware attributes Date: Mon, 17 Aug 2026 22:54:46 +0100 Message-ID: X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 19 Aug 2026 06:36:32 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Resending v13 because the previous send path corrupted several inline patch bodies. No patch content changes. Move the firmware attributes class helper out of platform/x86, rename the coreboot-table firmware driver directory from google to coreboot, and add a coreboot CFR firmware attributes driver. Changes in v13: - Rebase on current upstream master. - Restore the CONFIG_GOOGLE_* to CONFIG_COREBOOT_* renames for generic coreboot firmware symbols, with the old names kept as transitional symbols. Julius clarified that the symbol names are part of the directory rename cleanup and should describe coreboot rather than Google. Update the matching Kconfig dependencies and Makefile gates to use the new symbols. - Split the arm64 defconfig symbol update into a separate final patch, as requested by Krzysztof and Julius, instead of folding it into the rename. - Move the COREBOOT FIRMWARE DRIVERS MAINTAINERS entry to its alphabetical position. - Make the CFR APM_CNT runtime-apply dependency explicit with HAS_IOPORT instead of using an x86-only runtime branch. Changes in v12: - Temporarily kept the existing CONFIG_GOOGLE_* symbols and dropped the arm64 defconfig update after review feedback against the user-visible config rename. v13 supersedes this with transitional symbols and a split defconfig patch. - Free invalid enum labels before returning an error from CFR enum parsing. Changes in v11: - Keep the scoped cleanup in the CFR driver, but use explicit goto cleanup for the nested sysfs group registration path. Changes in v10: - Rename generic firmware Kconfig symbols from CONFIG_GOOGLE_* to CONFIG_COREBOOT_* and keep the old names as transitional symbols, as suggested by Julius. - Update arm64 defconfig and DRM coreboot framebuffer dependencies for the new symbols. In v13, the arm64 defconfig update is split into its own patch. - Address the nested cleanup-path review on CFR attribute registration. Changes in v9: - Add the missing kstrtox.h include used by kstrtou32(). - Use a single kobject rollback path when setting registration fails. - Split a few helper locals for readability, including the pending reboot device lookup and enum-value population. - Avoid an intermediate void pointer cast while parsing numeric CFR options. - Check the possible-values buffer length before computing each label length. Changes in v8: - Add a preparatory include-order cleanup before moving the firmware attributes class helper. - Add direct includes for __packed and container_of(), use scoped cleanup for EFI names and the driver mutex, and document the efivar lock requirement on private helpers. - Replace the duplicated CFR record walkers with one checked iterator that distinguishes malformed input from the end of a record list. - Validate enum entries before accessing them and propagate malformed child records instead of treating them as absent. - Restore the EFI variable after a failed runtime apply without retrying the failed firmware operation, and only emit a change event when the new EFI value remains stored. - Document the possible-values size limit and why CFR entries without a usable runtime EFI variable are skipped. Tested on a Star Labs Byte with firmware 26.07: runtime APM_CNT apply was verified with power_led, and reboot-needed behavior was verified with debug_level. Sean Rhodes (5): platform/x86: Sort firmware attributes class includes firmware: Move firmware attributes class helper firmware: Rename google firmware directory to coreboot firmware: coreboot: Add CFR firmware attributes driver arm64: defconfig: Update coreboot firmware symbols MAINTAINERS | 34 +- arch/arm64/configs/defconfig | 6 +- drivers/firmware/Kconfig | 5 +- drivers/firmware/Makefile | 3 +- drivers/firmware/{google => coreboot}/Kconfig | 89 +- drivers/firmware/coreboot/Makefile | 15 + drivers/firmware/{google => coreboot}/cbmem.c | 0 drivers/firmware/coreboot/coreboot-cfr.c | 1204 +++++++++++++++++ .../{google => coreboot}/coreboot_table.c | 0 .../{google => coreboot}/coreboot_table.h | 0 .../framebuffer-coreboot.c | 0 drivers/firmware/{google => coreboot}/gsmi.c | 0 .../memconsole-coreboot.c | 0 .../memconsole-x86-legacy.c | 0 .../{google => coreboot}/memconsole.c | 0 .../{google => coreboot}/memconsole.h | 6 +- drivers/firmware/{google => coreboot}/vpd.c | 0 .../{google => coreboot}/vpd_decode.c | 0 .../{google => coreboot}/vpd_decode.h | 0 .../firmware_attributes_class.c | 2 +- drivers/firmware/google/Makefile | 14 - drivers/gpu/drm/sysfb/Kconfig | 2 +- drivers/platform/x86/Kconfig | 3 - drivers/platform/x86/Makefile | 2 - drivers/platform/x86/asus-armoury.c | 2 +- .../x86/dell/dell-wmi-sysman/sysman.c | 9 +- drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 9 +- drivers/platform/x86/lenovo/think-lmi.c | 5 +- drivers/platform/x86/lenovo/wmi-other.c | 2 +- drivers/platform/x86/samsung-galaxybook.c | 3 +- .../linux/firmware_attributes.h | 6 +- 31 files changed, 1348 insertions(+), 73 deletions(-) rename drivers/firmware/{google => coreboot}/Kconfig (57%) create mode 100644 drivers/firmware/coreboot/Makefile rename drivers/firmware/{google => coreboot}/cbmem.c (100%) create mode 100644 drivers/firmware/coreboot/coreboot-cfr.c rename drivers/firmware/{google => coreboot}/coreboot_table.c (100%) rename drivers/firmware/{google => coreboot}/coreboot_table.h (100%) rename drivers/firmware/{google => coreboot}/framebuffer-coreboot.c (100%) rename drivers/firmware/{google => coreboot}/gsmi.c (100%) rename drivers/firmware/{google => coreboot}/memconsole-coreboot.c (100%) rename drivers/firmware/{google => coreboot}/memconsole-x86-legacy.c (100%) rename drivers/firmware/{google => coreboot}/memconsole.c (100%) rename drivers/firmware/{google => coreboot}/memconsole.h (82%) rename drivers/firmware/{google => coreboot}/vpd.c (100%) rename drivers/firmware/{google => coreboot}/vpd_decode.c (100%) rename drivers/firmware/{google => coreboot}/vpd_decode.h (100%) rename drivers/{platform/x86 => firmware}/firmware_attributes_class.c (94%) delete mode 100644 drivers/firmware/google/Makefile rename drivers/platform/x86/firmware_attributes_class.h => include/linux/firmware_attributes.h (60%)