From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D365C41A569 for ; Mon, 24 Aug 2026 15:09:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787584152; cv=none; b=sHqIemRZX324AJkk3adgVtcPZPp5BFoMya7GVPhcMpBxcobiNjjPW6MWHQ91b3XLH++aCMlNEVhicUFgnLCJuBY3moyPqRJtBkrF3srXuFLd7aGqh0mrGrolYGaAbhk/UAVlpZrpq1AS+Y8DI9gjKaz6MyFTlrtzSMe+L3VuZKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787584152; c=relaxed/simple; bh=JQyRpI8j7w1b1klCJajkWAEryhwrrdGvQg42aPShEIo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=h8ABMltmlYze4NV+e8Fb9lc3f23hnqU5eCKzH9eqf43yFeGQr2tndeMBs0fpjH4uGrYRcB3v6br/HIFu0fbZU7qbF8fAZKwga3u5+WM+6M7M+MiaKXVVaD5pkXKEz38UCuQo5QrmLGjB4fNfAj8sgejaRxpazt8XhZW1niZ/cLM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=starlabs.systems; spf=pass smtp.mailfrom=starlabs.systems; dkim=pass (2048-bit key) header.d=starlabs-systems.20251104.gappssmtp.com header.i=@starlabs-systems.20251104.gappssmtp.com header.b=WkiY/KG7; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=starlabs.systems Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starlabs.systems Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=starlabs-systems.20251104.gappssmtp.com header.i=@starlabs-systems.20251104.gappssmtp.com header.b="WkiY/KG7" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4921eed3fa2so28076735e9.0 for ; Mon, 24 Aug 2026 08:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starlabs-systems.20251104.gappssmtp.com; s=20251104; t=1787584148; x=1788188948; darn=vger.kernel.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=WkiY/KG7PcEjwCE2J+IT4W1J1AyKwHOpkRJOqCdbzwSIh7BDVjzLn+3nVbuUEqEjmc X20gb2mONppSGgFXtPW4wzltIl+pRzICSZQGZ1/OtwLbk50+Mhv7mPNGC28wGrQs8mS0 8VtJ0IZmYqa1yCpfrlt42rF80Errfg6Wor3F7p5eYPqAodouvjY0+6HLfmDY1v3Gq3e+ iZqpK+aQDCupsfy8m7pVh3QL0aK72m/ChBQANU5hdQ5CWWJQEnKqA6H0dxdvFnCO1bpN 231dQUgvtCk3aysh2yPQTnCvqzdsS8+/DaPVSVhPHVgInlxdVog9YamqownxzpnatTeA 57rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787584148; x=1788188948; 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=R1Jmwacwfj3o74GRNfjh+PEujiDI7+99xx6wPI8FRNXRBMALMDhUlvtWBwDhhO6k/R gOyNwGiy7kDy3oiGvkff+Hrvrpyfz2CcJmSEM2OOsPbf9tITmkKbH684Tnqu5CAJGr7+ HPujn/FvDTRTHjOOfaDdHnYLSerpRuq3qtZD8hfG4SbpPW3jH2J897st48QjkIA2BxYw 5IA9PBajryZq3+rs0uYUHzHM0lDwEzhL+ua/DgoFTJznzoqcL3EAveBX4DLklG7scg9e oW6IIuFulDggDU3BllsRtVQZ6OSKAdq4Foz88khSuF11l45cQXCT2HatF3jklWfR54N+ 8xLQ== X-Gm-Message-State: AFuF++mivxMJrQHW7iUUJnUGTmvSttPXY/ikur3zgb/u2TXQMFHpZ7Al nvOITPQDBJCEZzsKbHV1tMOlt1vsKJLoyVhXvo1Qja0m7G3SiZcO00YmaFD/WnD3HFTNJhFrQpJ jCyAccQ== X-Gm-Gg: AR+sD12WYb8Vb0A6A+QU84n2+vrb4zBmhwsvjFW4+N46fFYyrZhaGRaZmnyS2zT6rd1 /U0AMLBga9Psf3BKXMnWjN8geNPvmAPaV1XNmIYD4vPw9VIRafNudR2VhWpmpE6y9gZAdNnsZ4q qN8dCEai+K0MLOGhENDzPQ5X1Y57gy7VETIN72Ig8wxPw8x8/OStDZ7TuuxftoxzISYL71FbEHk EWsPWGiGmXBgKTf/pMVppktXlU1i/k9oCF5lGeSbEZ6naLlRzQLRUH+9l4MbUnIfCsRIMcZmj0z b75Bkh/nYRpX7DnrbCmHMH9hXCrvr40wO9anNrW/GtDkLtG5Fx45bSWTM/UV5hrAj2hErK62UAK L3Pir14rdTAfpqhQvrQ5fL6pEMsFEezu5QLEzuFoVzFeqx7O3j2yjA238K62P4qC1eNgceaBObD tFu52/cWuFY+42rGDZctfZEk8jmZeBD2G1gGeLJHvMkCm09RlN99rZhMc1jFHj9regO/XJtXfvI OqBisftR8XXbcfjsy/9xw2ehcpgWqE= X-Received: by 2002:a05:600c:4f09:b0:496:bffb:fb7b with SMTP id 5b1f17b1804b1-499b8457b10mr339689055e9.10.1787584147711; Mon, 24 Aug 2026 08:09:07 -0700 (PDT) Received: from horizon.localdomain ([216.128.28.240]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-499c8f382b1sm63920035e9.8.2026.08.24.08.09.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2026 08:09:07 -0700 (PDT) From: Sean Rhodes To: linux-kernel@vger.kernel.org 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 , Danilo Krummrich , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= , Titouan Ameline de Cadeville , Takashi Sakamoto , Kees Cook , Bjorn Helgaas , chrome-platform@lists.linux.dev, dri-devel@lists.freedesktop.org, Krzysztof Kozlowski , Bjorn Andersson , Dmitry Baryshkov , Geert Uytterhoeven , Arnd Bergmann , Eric Biggers , Luca Weiss , Michal Simek , Sven Peter Subject: [PATCH v13 RESEND 0/5] coreboot CFR firmware attributes Date: Mon, 24 Aug 2026 16:08:57 +0100 Message-ID: X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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%)