From patchwork Fri Jan 12 13:18:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13518472 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32AF86D1A9 for ; Fri, 12 Jan 2024 13:21:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="nBq3PbDy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705065674; bh=L+28NgGOIiCoYRdT/O15SQx+OK5WNhSsQoOnP70V+rE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nBq3PbDy9JluN0ABov4e5gHyDfO1sVRroFlx7r4gUxjxDcW697MV7/glA4Gc5wekN aCyiXzLcivCObF0Hb6Ovw/30z2prfulK6/ACxJpSw6753CYzeEYC763Ds3xwaasjVs NYeux67OafiJt9ChjzFbcrJ8/ZjXMkiOG8PiU3eV6ZNXt8N25ou5EK7ej6WprCrR3e UMWv+QBiDFd9WwC6aOyjkmvIidjt5mVSzSNm3DJf2XJQscd8rUFg1PKfqxf+qyxavE nQ8pfuAXgicJP5jCBwDzXZvb1tbDNW0+F2UX0CIMT3DeRIR6rqgaDlx1LZenboqtUZ 5l/MEP1Gd0kkg== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id B540E3782031; Fri, 12 Jan 2024 13:21:11 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Tzung-Bi Shih Cc: kernel@collabora.com, AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Brian Norris , Julius Werner , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/7] firmware: coreboot: Generate modalias uevent for devices Date: Fri, 12 Jan 2024 10:18:30 -0300 Message-ID: <20240112131857.900734-2-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112131857.900734-1-nfraprado@collabora.com> References: <20240112131857.900734-1-nfraprado@collabora.com> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Generate a modalias uevent for devices in the coreboot bus to allow userspace to automatically load the corresponding modules. Acked-by: Brian Norris Signed-off-by: Nícolas F. R. A. Prado --- (no changes since v1) drivers/firmware/google/coreboot_table.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c index 2a4469bf1b81..c1b9a9e8e8ed 100644 --- a/drivers/firmware/google/coreboot_table.c +++ b/drivers/firmware/google/coreboot_table.c @@ -53,11 +53,20 @@ static void coreboot_bus_remove(struct device *dev) driver->remove(device); } +static int coreboot_bus_uevent(const struct device *dev, struct kobj_uevent_env *env) +{ + struct coreboot_device *device = CB_DEV(dev); + u32 tag = device->entry.tag; + + return add_uevent_var(env, "MODALIAS=coreboot:t%08X", tag); +} + static struct bus_type coreboot_bus_type = { .name = "coreboot", .match = coreboot_bus_match, .probe = coreboot_bus_probe, .remove = coreboot_bus_remove, + .uevent = coreboot_bus_uevent, }; static void coreboot_device_release(struct device *dev) From patchwork Fri Jan 12 13:18:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13518473 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41A1D6D1A3 for ; Fri, 12 Jan 2024 13:21:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="T3qA3z5I" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705065680; bh=sPz7qlYsrHlq3cCOtHZi7BOxHqEKVr3tJDgaD7Qlm4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T3qA3z5IeURvAorefJ8yBC9ViApTUBJv7sEOilZu1dK9dPr99ixr/x5svUv3Yc5xQ j3hW3cAO3CKI73X3LCB6LyfIviNFq8IOOCkJWSj/b2SDVr2KH3hNsm7Ks6P1SZBvK2 sHkvvm2bN8OLRPTVc2UU3pRk+0hveFvAsNqDv5PE7yX+xfeHVsqKVEqCwVLplS2YvO YRFiZbvuNUZ/5cV5CyYuYP1iRikzbXEmE/gwzMfWZr3G2RpxOHEcEgYNDcvvsGWQ3l DmdrGOnVYVpVKwkpAfd/G2poivJI35vMzqBeQl3vaySdsB3fhd/tFdCeVSADM1Ktlk h8PtR3BdBI3RA== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 685293782032; Fri, 12 Jan 2024 13:21:15 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Tzung-Bi Shih Cc: kernel@collabora.com, AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Abhijit Gangurde , Andy Shevchenko , Greg Kroah-Hartman , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Nipun Gupta , Pieter Jansen van Vuuren , Umang Jain , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/7] firmware: coreboot: Generate aliases for coreboot modules Date: Fri, 12 Jan 2024 10:18:31 -0300 Message-ID: <20240112131857.900734-3-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112131857.900734-1-nfraprado@collabora.com> References: <20240112131857.900734-1-nfraprado@collabora.com> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Generate aliases for coreboot modules to allow automatic module probing. Signed-off-by: Nícolas F. R. A. Prado --- (no changes since v1) include/linux/mod_devicetable.h | 8 ++++++++ scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 10 ++++++++++ 3 files changed, 21 insertions(+) diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index f458469c5ce5..24e0dcfde809 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -960,4 +960,12 @@ struct vchiq_device_id { char name[32]; }; +/** + * struct coreboot_device_id - Identifies a coreboot table entry + * @tag: tag ID + */ +struct coreboot_device_id { + __u32 tag; +}; + #endif /* LINUX_MOD_DEVICETABLE_H */ diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c index e91a3c38143b..518200813d4e 100644 --- a/scripts/mod/devicetable-offsets.c +++ b/scripts/mod/devicetable-offsets.c @@ -274,5 +274,8 @@ int main(void) DEVID(vchiq_device_id); DEVID_FIELD(vchiq_device_id, name); + DEVID(coreboot_device_id); + DEVID_FIELD(coreboot_device_id, tag); + return 0; } diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 4829680a0a6d..5d1c61fa5a55 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -1494,6 +1494,15 @@ static int do_vchiq_entry(const char *filename, void *symval, char *alias) return 1; } +/* Looks like: coreboot:tN */ +static int do_coreboot_entry(const char *filename, void *symval, char *alias) +{ + DEF_FIELD(symval, coreboot_device_id, tag); + sprintf(alias, "coreboot:t%08X", tag); + + return 1; +} + /* Does namelen bytes of name exactly match the symbol? */ static bool sym_is(const char *name, unsigned namelen, const char *symbol) { @@ -1575,6 +1584,7 @@ static const struct devtable devtable[] = { {"ishtp", SIZE_ishtp_device_id, do_ishtp_entry}, {"cdx", SIZE_cdx_device_id, do_cdx_entry}, {"vchiq", SIZE_vchiq_device_id, do_vchiq_entry}, + {"coreboot", SIZE_coreboot_device_id, do_coreboot_entry}, }; /* Create MODULE_ALIAS() statements. From patchwork Fri Jan 12 13:18:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13518474 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2104B6D1D9 for ; Fri, 12 Jan 2024 13:21:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="VT/FEgjx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705065684; bh=vv7XfyY64AL9x6v0k9WhuSkPS+mvCU15xYmyHxujMQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VT/FEgjxDcYivmSqj8BoJVzPD5kxRg3ansgj2EbmqAD3msqLK6hO1SEOG/XLLVY2i luv8RlWniiUjMey+Gofv04EFijpja4SxG1yJR948rtauLCVfo04QxVG8SDa/KkBdbQ 7psziR/FGNHjLvDtlBx4xNsktEGeoI/hw3sydU6ytcbrzBTTjX8DBFOlTgdcA3qTEu JcPF3qlFd5AEHe+BJ7BDsx2pNfNLn8gYXWDAV9sKVLBxsXbxBiqT7VJCB9NTn8CvIS ADPihfelHE6NiXgWgbfDTu6KXslilFEzU7uktZJ9wcpKpV4VRFCHEv3zTwYhWf4KIv KsMLtKnvqG73g== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 8BB743781FE5; Fri, 12 Jan 2024 13:21:21 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Tzung-Bi Shih Cc: kernel@collabora.com, AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Brian Norris , Julius Werner , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/7] firmware: google: cbmem: Add to module device table Date: Fri, 12 Jan 2024 10:18:32 -0300 Message-ID: <20240112131857.900734-4-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112131857.900734-1-nfraprado@collabora.com> References: <20240112131857.900734-1-nfraprado@collabora.com> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Create an id table and add it to the module device table to allow the cbmem driver to be automatically loaded when a matching device is found. Acked-by: Brian Norris Signed-off-by: Nícolas F. R. A. Prado --- (no changes since v1) drivers/firmware/google/cbmem.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/firmware/google/cbmem.c b/drivers/firmware/google/cbmem.c index 88e587ba1e0d..ceb89b4cdbe0 100644 --- a/drivers/firmware/google/cbmem.c +++ b/drivers/firmware/google/cbmem.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -114,6 +115,12 @@ static int cbmem_entry_probe(struct coreboot_device *dev) return 0; } +static const struct coreboot_device_id cbmem_ids[] = { + { .tag = LB_TAG_CBMEM_ENTRY }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(coreboot, cbmem_ids); + static struct coreboot_driver cbmem_entry_driver = { .probe = cbmem_entry_probe, .drv = { From patchwork Fri Jan 12 13:18:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13518475 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2C096DCEE for ; Fri, 12 Jan 2024 13:21:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="eBucHIo9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705065688; bh=5Zlhk9FViXuszWd2wU0HPdwd/advjvRNhG7guG3jd6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eBucHIo9anWE6EJwEzY9Q7buyISHqVTcdyY6Ok13pHm51PVG4FgDJpcMxuikzivgO sD2i1iVIuQMoKKLUw6Ww5AQNt68xWYyZ7H/sX0+U2W9LKoNIyQYOkHY/BbfWwtg0va 45sCbBiP3MLvHnpn/Fa/3ZZOez1XgnfXdaJG4RX6/sOZtUFCYfU49p1b1AptFf8N6+ 4Vy46pbklk3nhy9t3aCVJ56VJ1wmPM7ygG9VE0E/J4eZ6Qad9pxg/5j0KZZrEkvgFH xay+P+4p+XupZ3u/OUFy0VdvvPp4qihJyJp+RXtbY/KbkzksZa0Ez/lqg/jaTYd+ZN qSzMTRNIfA6Hw== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 5CD503782031; Fri, 12 Jan 2024 13:21:25 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Tzung-Bi Shih Cc: kernel@collabora.com, AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Brian Norris , Julius Werner , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/7] firmware: google: vpd: Add to module device table Date: Fri, 12 Jan 2024 10:18:33 -0300 Message-ID: <20240112131857.900734-5-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112131857.900734-1-nfraprado@collabora.com> References: <20240112131857.900734-1-nfraprado@collabora.com> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Create an id table and add it to the module device table to allow the vpd driver to be automatically loaded when a matching device is found. Suggested-by: Brian Norris Signed-off-by: Nícolas F. R. A. Prado --- Changes in v2: - Added this commit drivers/firmware/google/vpd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c index ee6e08c0592b..9e9fe9ca1920 100644 --- a/drivers/firmware/google/vpd.c +++ b/drivers/firmware/google/vpd.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -306,6 +307,12 @@ static void vpd_remove(struct coreboot_device *dev) kobject_put(vpd_kobj); } +static const struct coreboot_device_id vpd_ids[] = { + { .tag = CB_TAG_VPD }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(coreboot, vpd_ids); + static struct coreboot_driver vpd_driver = { .probe = vpd_probe, .remove = vpd_remove, From patchwork Fri Jan 12 13:18:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13518476 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E9876E2A3 for ; Fri, 12 Jan 2024 13:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="iVk9KxSs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705065692; bh=BLXPKaAyUYO+6jqUrFyRS5lwMciTPldwcRsUMbzDyc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iVk9KxSsQtvtgQz99f/zijk6igWk9tf4efY5mWTJjXTiEETjQMS13rTN3ln0twZVs 4/ezaRE8z4zx+YEt0EydLp9Ej7iv6+W/ruOnP+vXE95sNb3aoDXzehdHBTLeQaLMEa xqN7Erkn3v7tljPsnPRAu7m6PH/aVICOjQIDlpmgD8vjtEOdwCbLyaY5Dyt0EK+7/z lmLV54ySEsj2ar2+JxWaKXo63IxX+otyt3Vdg99T7s91XngUE7kcikhVHJmufzbD3A q/7jX2eiLbo/g88JZgTvLfcNcROHF4TCwAyi1/KYiPBTt0mB7BJzgo27vU9bKRcpIT CkMdrSxCA8zww== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id E69583781FE5; Fri, 12 Jan 2024 13:21:28 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Tzung-Bi Shih Cc: kernel@collabora.com, AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Brian Norris , Julius Werner , linux-kernel@vger.kernel.org Subject: [PATCH v2 5/7] firmware: google: memconsole: Add to module device table Date: Fri, 12 Jan 2024 10:18:34 -0300 Message-ID: <20240112131857.900734-6-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112131857.900734-1-nfraprado@collabora.com> References: <20240112131857.900734-1-nfraprado@collabora.com> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Create an id table and add it to the module device table to allow the memconsole driver to be automatically loaded when a matching device is found. Suggested-by: Brian Norris Signed-off-by: Nícolas F. R. A. Prado --- Changes in v2: - Added this commit drivers/firmware/google/memconsole-coreboot.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/firmware/google/memconsole-coreboot.c b/drivers/firmware/google/memconsole-coreboot.c index 74b5286518ee..b8e65b9d8cc0 100644 --- a/drivers/firmware/google/memconsole-coreboot.c +++ b/drivers/firmware/google/memconsole-coreboot.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "memconsole.h" #include "coreboot_table.h" @@ -96,6 +97,12 @@ static void memconsole_remove(struct coreboot_device *dev) memconsole_exit(); } +static const struct coreboot_device_id memconsole_ids[] = { + { .tag = CB_TAG_CBMEM_CONSOLE }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(coreboot, memconsole_ids); + static struct coreboot_driver memconsole_driver = { .probe = memconsole_probe, .remove = memconsole_remove, From patchwork Fri Jan 12 13:18:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13518477 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 318A16E2B8 for ; Fri, 12 Jan 2024 13:21:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="u598Lenm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705065695; bh=gIUn32GOZvNsfDJEtW4SBOOpxVUI+08upkQ6PKTzhZg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u598Lenmeb95HeOuDOhyRzOU/puSD8AwcBF+nzTySLpZZfVZIyNSfSFyfacdwN5kW +v7989vDBjlU+0+mV70V6iFqOe3gPw1PqTbw5QzIaD9wdphdgjIfvP0pcx2yuOQTou 3SWcQhKs1cO4VYTup+KRxUzIXK8HTuo0WMcy2Xyh4uoyFABPSYu1es328E5vd7MhXy lFKa1xIwV4gD6Ipe0aPMMmZy+Os3oj5f6rOjA8dS0eacDP1/dc110lAGriyyGjUevP HsRFpr3f/wXn778wFrMQy3zmVPlNQmM6rads4iJua6odIt1diE3A7rViX5W25FdVOX 6GGR/nJlOLPOw== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id CBCF43782031; Fri, 12 Jan 2024 13:21:32 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Tzung-Bi Shih Cc: kernel@collabora.com, AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Brian Norris , Julius Werner , linux-kernel@vger.kernel.org Subject: [PATCH v2 6/7] firmware: google: framebuffer: Add to module device table Date: Fri, 12 Jan 2024 10:18:35 -0300 Message-ID: <20240112131857.900734-7-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112131857.900734-1-nfraprado@collabora.com> References: <20240112131857.900734-1-nfraprado@collabora.com> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Create an id table and add it to the module device table to allow the framebuffer driver to be automatically loaded when a matching device is found. Suggested-by: Brian Norris Signed-off-by: Nícolas F. R. A. Prado --- Changes in v2: - Added this commit drivers/firmware/google/framebuffer-coreboot.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/firmware/google/framebuffer-coreboot.c b/drivers/firmware/google/framebuffer-coreboot.c index 5c84bbebfef8..b33e9c6f97d7 100644 --- a/drivers/firmware/google/framebuffer-coreboot.c +++ b/drivers/firmware/google/framebuffer-coreboot.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -80,6 +81,12 @@ static void framebuffer_remove(struct coreboot_device *dev) platform_device_unregister(pdev); } +static const struct coreboot_device_id framebuffer_ids[] = { + { .tag = CB_TAG_FRAMEBUFFER }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(coreboot, framebuffer_ids); + static struct coreboot_driver framebuffer_driver = { .probe = framebuffer_probe, .remove = framebuffer_remove, From patchwork Fri Jan 12 13:18:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13518478 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21CAA6E2D0 for ; Fri, 12 Jan 2024 13:21:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="s1sYTm6l" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705065701; bh=FzrVgnbK0n6uYdCumXFsahNGrfl5vwlqsMbeKRKrufA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s1sYTm6liVXdRWh8JDkAX5Lk0MZSbaArK3AfqrMebCSsN7CcXUgITWBxJWKj8IqwR pK5fBkjY3InlhtiDGaIO2AqiOUAXJ1G/cvXU9qOxd0VLoZGggKyLGBjOl3p4PQPft+ Fst3Ra9KsZDEscU0bTiQyokFwwkbuWBbsQByObJLErxlGYMYDSz/4qyObiy1JJHo+I hxclylwIBqHa18mvRV4X7IwLsUvSFuE7hZqhhfCL1RdOe+DjCB79X3AWJA1lspt5XJ M0zZ+0BDygD6qUIn2x5lm68AfQqyFb/m2m3YzH5m1hbJbS66J/gU4IOXhLRySnZBE1 gjO3pzpQaryWw== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 661783781FE5; Fri, 12 Jan 2024 13:21:36 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Tzung-Bi Shih Cc: kernel@collabora.com, AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Arnd Bergmann , Bjorn Andersson , Catalin Marinas , Geert Uytterhoeven , Konrad Dybcio , Krzysztof Kozlowski , Marek Szyprowski , Neil Armstrong , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/7] arm64: defconfig: Enable support for cbmem entries in the coreboot table Date: Fri, 12 Jan 2024 10:18:36 -0300 Message-ID: <20240112131857.900734-8-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112131857.900734-1-nfraprado@collabora.com> References: <20240112131857.900734-1-nfraprado@collabora.com> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Enable the cbmem driver and dependencies in order to support reading cbmem entries from the coreboot table, which are used to store logs from coreboot on arm64 Chromebooks, and provide useful information for debugging the boot process on those devices. Signed-off-by: Nícolas F. R. A. Prado --- (no changes since v1) arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 0b0ef6877a12..cd94d55b23b2 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -255,6 +255,9 @@ CONFIG_INTEL_STRATIX10_RSU=m CONFIG_MTK_ADSP_IPC=m CONFIG_QCOM_QSEECOM=y CONFIG_QCOM_QSEECOM_UEFISECAPP=y +CONFIG_GOOGLE_FIRMWARE=y +CONFIG_GOOGLE_CBMEM=m +CONFIG_GOOGLE_COREBOOT_TABLE=m CONFIG_EFI_CAPSULE_LOADER=y CONFIG_IMX_SCU=y CONFIG_IMX_SCU_PD=y