From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 1E95D383993 for ; Mon, 17 Aug 2026 21:54:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787003697; cv=none; b=MBobRaOEIu5Dl3PiPuzCr71RzDwzPL5AOlZpdUY/KHdemq8Wh0daVDro/s6mEBpapl66VP2RGbAyFIKfsgQtl3pn76keVm5DXHo31pjNiSpW0zWTgFZTgbjYNHx3CwiB7kYY543ekcJE0+0Q+3/+ww6P4TdX/pCSfZhgcivG14U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787003697; c=relaxed/simple; bh=JQyRpI8j7w1b1klCJajkWAEryhwrrdGvQg42aPShEIo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RLTUQB3LfQCoi2zYXnCmjZKkRLFui6a2ZMdjSB7+214w5s74KmsitU3PCeA2lwhR9yIEa3S++ZyQGHGGb6qQpn6x2m6fM09yIZrzSWRoE5ButReWLl0m4mlR18IXHhDfO55u2UrnuWdCCl36d2lbjUhWzV2nKEA2sBr6frPp1HA= 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=E6bpcCOA; arc=none smtp.client-ip=209.85.221.53 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="E6bpcCOA" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-47db714766aso231176f8f.0 for ; Mon, 17 Aug 2026 14:54:54 -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=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=E6bpcCOADT5pPKZqNYhUS0UIj2KTIdS7l1y51JDq8oITSyWxPuZS5uvtDMs0LjHF2/ XBQQRATX3St//XjLAoOByP6uQjSV7By9KbgCy8elK6FVRItZzNZ40tDyL5o9NppZJkY/ Ward3HIn4Kt1yq31BGkteHQr7LHvvftzsZE32vih+PH4FFxSkksw7dTEvib993J9NGPb TKqppUhGfBheGpMup8afJlN4IodNh26bV0k4JuuR31dxKcj7oYqMiaeMgc6zjIR9OMCz SSW73u6qvxJPuxj3Mo5Zhvr6jzN4ZKD0jgMgHuw/m/qHXa5IEhcFG5C2prOuvSjSFRXB gE8Q== 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=QD1rF8TwRfoohUTKsx372wx8g4k1mc1+G1MIt00KvPhr/o58/RiexblT/V6Y9kcb+D jMdY1HvJG1XELKKYqA5Kvl0FcAcp/98mvCaMmLxaQ4uqjLwiOi1Gx44zTyfI0RM/SXn0 FFXdEU7CvJA9bMjDFsHOqh2q/9/UJX+4XD8xhKV5Llv8YILFUutrTVFg1nl8vLm4P+8A 0LSVFNA7rg9hg9cGZ60E8INyPcC1pb8uQH3H7ofuZ04YY8jA6MeSHo/ZYki2VtKSTSN7 GQfsbio5HrZeAFdeS68LWgcAlv1zteNAGpzWLt0LRArpWoUkcZHXK7+pxpFdo51cH5CS OP5g== X-Forwarded-Encrypted: i=1; AHgh+RqOOb/VeGMjo9VDjjYYstVcke0lWaT8j59gqEMRPTuQV5aN/w9k9GTlxmuwI6/RNbExzGzyd/Bu5nNaGFM=@vger.kernel.org X-Gm-Message-State: AOJu0YwC4Z3HLNw0rAOeqbkbELGinNjTtwvTwFAQY7Ivaebaz2ZyOYVr Ws1r6193s4qHtNXOM1l+c1gGiGLOT2eLT6creksRdUmxR5Zc+cYcblenI7HADIhz1w== X-Gm-Gg: AR+sD13sfjmZ1qWhJdBbA/eZqSF6B2g63VqryRb22xa0aL0KNYj/uYx/yHpfl/RoY4V ZX7pEiAOE5+zr0UYJyVbatQ44vQpqoiH27aKXC/STPmw8b6LwwnPRtw8Xoq8AJ5n0+4VrMSmKE2 1weOQsFLx58lfU9UIIn92zY/wK5l+GvCTBnqLE6uWBnOTcF6UYpkP3TvP2DfBHtBiRoglI8kA/b T8lDfpZ5yQ7xinGRjJJhW+ccmPz2byYuP2FUH1bfGFNfqpouPZpjRoEcg4DK9UlDj04ua9VDj4R RNp85ojRezsMUrVAFq4mVytLdHJ2A3XdobQ2uxPnbJFwqj/XV4gAMmtFkEwXcPLGQ/ISeXv9Uax YH+Pez85ceIAUMwhuSw7nnOgba7tmk2psM2DzSJG/7utMJJebbrMH2pxvAy94G+tE4udCi5Joyv yOkrWCYValQx+zgnE3bEYkzM4JCXxgxbuWKudjSQmVsrcEpw3BcfzWJSHKUTsy2Ykv/hcIH6cgR JhyQqU67Knxx6T5lVVSf4Ts 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 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%)