From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 A2BB73CB918 for ; Mon, 27 Jul 2026 19:51:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785181883; cv=none; b=M0lUeX65p0x9ANNhoS5TkxIGih+xkICh5vD+hGn8K2HoS/qAeatYxR/fW4ftPNtbfs9ZQxVw2fEApCslqbB6PJTQNRVmxDRLfStFArNKyDz89/NcfxzmM01KmIC2ooE/vexTd0yxguE4tk5V2YMkVfXh6AtqFSRpWKmwRafx3EI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785181883; c=relaxed/simple; bh=LHEp5xjNPXRmYTOl7iyUCGaVLVxa648GYyPPCRFkFXs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IVLdHtBgZ0BEdImT6xeCLG0of0UmdVvDXwWBVAch139vZ0SzKq8pShiRGsSO701Ey4y5JQDTUldtCJlaNR0Xfl0PJAw0zW3uI1p/A43OhplRL+aUmyWkrt3m/is+Z+j5VzCWNJDaWegzj3IctIbt9qL6KRUBpPyiK8P4GeAM2ms= 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=FoTVfR1v; arc=none smtp.client-ip=209.85.128.46 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="FoTVfR1v" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4957eefd361so23095745e9.1 for ; Mon, 27 Jul 2026 12:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starlabs-systems.20251104.gappssmtp.com; s=20251104; t=1785181879; x=1785786679; 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=5JSXCQoc1JHZ6Nq5YFbS6Dsa7OqY+l43Qmo2JkxGjUI=; b=FoTVfR1vJaJIHhe1S3xqzcuaiZ5Bwizis7iHbPEa2bGj0RzRDeE2uOJ4TCx0YKXaO3 t+iJcOucqAgM7eI+fObtJe1ve7dWKjaDcj85Cr1fRVuDuud3QVaMX410VcmE8HPwQqVZ b6Sty+H9/5ctXjuNSKxXm7f2jp4UVGSR2UFys4vsSwUB7Q8Spd6iqhB+1rPU/JxjNsbR A7+ZjUztmLcQXwPYBZF50/AlwfOUpAdsOnRb+vVGobviLWLVKFqAgWRJKx1B9cW+Yz7A JCK15slAIV5D7bVUtWb8NPIVTEKtLN3O36aHVVKgHbba4igWlr96pMVI6i73QjRR4ZE7 YHCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785181879; x=1785786679; 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=5JSXCQoc1JHZ6Nq5YFbS6Dsa7OqY+l43Qmo2JkxGjUI=; b=j+eQkvQjw/Xzu9lhNklEXtopMPeS21yyL2dhCgXyVtEvNShHVMoD3vwls91kHP/Vmv dl3sgv1A555zb7tJZEnDB+ETCIbHOd/22jFMANhTefw7iDLZzPL6m5ra0+eXBDj3/pyK Dsye54zVhhywQ3m/u9jPZrLHIYDVCmbN3Msr3d7AL6mLC5Hwh21tQgCbP72k5nzvEebo pxXzKQ6Napgjy6Ij9iAM+t/pV78uk9Mt2r6aHikK6ytF4FXwkB/PYxMnrxlPux9lEfpN OQAiE/6VUVV2TZqJc+o5/VsTA3YjwgbU93pSKvjs/6OxGRp72h2oitm/+cG3hSlMmNc7 nsvQ== X-Forwarded-Encrypted: i=1; AHgh+Rqlo/g/yKOeS91qnVth70D7cwivZULvjJ6a1dRsFev/fmHz7bZ5/7n9myKqoSL0jasYjSCVj8S9xxSU/jA=@vger.kernel.org X-Gm-Message-State: AOJu0Yxg/0XBYzIH1vW8tWLRN6S/vea9et1ipiuoC/gXt2z0wNL+Q5Pl ybVb4lUrK6ik3EHGRspLLpAItQESPgg4c937lntEwYDCzGrN7FRjAFUXTiMblI81IQ== X-Gm-Gg: AR+sD10c8+X2FOv8vNLaFQxP6Fm7E6RAIcLsxq6KCbTldtURt3yj51xtXnLNPZrru+Z cQC+OLoD9kkt1Fro0CJAfYGTfaUU5J+uUqdznIO0IuIEaIcdUeS4SlE9P6LQy9w4A8Y/Ul2GVfr 8+NDfG45OOCoysLHfphBHYHkvqi+1Yf5aMn6d3FMMvm0iaGIcTLZnrjEc0ARlAHZAwRhPhlIXkc nClsHJ3grNmwRgimfyqp5nytJF2tWcFT1YI8hxq/Mozq015QYN9qZjRZbMl9VU0c1hiuygXz4IN TaJoiXeKleJfAw7e7dHRy+T3oThkcSEKbmCnvrKC6y6MV1K3IoOvlQswxkeEwpi8IhWtZ/SVof8 QSkW25r+wrYBRjZI503bvl2QJwW1/kbZEd5q4XxO/zdoYe/aaEeXBMgv8NNo+EOuRnfbbg3ak3R aXQ3eNgzP7zHKlrIkNSoaMl4e0qSeS X-Received: by 2002:a05:600c:a016:b0:495:63e6:5fb8 with SMTP id 5b1f17b1804b1-496b56fa3c4mr122769075e9.12.1785181878642; Mon, 27 Jul 2026 12:51:18 -0700 (PDT) Received: from horizon ([217.155.46.38]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4957bd9e980sm253362445e9.0.2026.07.27.12.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2026 12:51:17 -0700 (PDT) From: Sean Rhodes To: tzungbi@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, linux-kernel@vger.kernel.org, Dell.Client.Kernel@dell.com, Sean Rhodes , "Michael S. Tsirkin" , Florian Fainelli , Huacai Chen , Chen-Yu Tsai , Brian Norris , Julius Werner , Thomas Zimmermann , Javier Martinez Canillas , Takashi Sakamoto , Bjorn Helgaas , Danilo Krummrich , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= , Titouan Ameline de Cadeville , Kees Cook , chrome-platform@lists.linux.dev Subject: [PATCH v9 0/4] firmware: Add coreboot CFR firmware attributes driver Date: Mon, 27 Jul 2026 20:51:10 +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 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 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. Testing: - x86_64 out-of-tree W=1 build of drivers/firmware/coreboot/coreboot-cfr.o. - checkpatch --strict --git HEAD. - v8 x86_64 and UML allmodconfig W=1 builds of the driver and helper. - v8 runtime APM_CNT apply and reboot-needed behavior on a Star Labs Byte with firmware 26.07 and Linux 6.17. Sean Rhodes (4): 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 MAINTAINERS | 18 +- drivers/firmware/Kconfig | 5 +- drivers/firmware/Makefile | 3 +- drivers/firmware/{google => coreboot}/Kconfig | 20 +- .../firmware/{google => coreboot}/Makefile | 1 + drivers/firmware/{google => coreboot}/cbmem.c | 0 drivers/firmware/coreboot/coreboot-cfr.c | 1193 +++++++++++++++++ .../{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/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 +- 28 files changed, 1257 insertions(+), 32 deletions(-) rename drivers/firmware/{google => coreboot}/Kconfig (82%) rename drivers/firmware/{google => coreboot}/Makefile (92%) 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%) rename drivers/platform/x86/firmware_attributes_class.h => include/linux/firmware_attributes.h (60%)