From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "David E. Box" <david.e.box@linux.intel.com>
Cc: thomas.hellstrom@linux.intel.com, rodrigo.vivi@intel.com,
irenic.rajneesh@gmail.com, srinivas.pandruvada@linux.intel.com,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
xi.pardee@linux.intel.comn, Hans de Goede <hansg@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH 4/4] platform/x86/intel/vsec: Plumb ACPI PMT discovery tables through vsec
Date: Thu, 15 Jan 2026 15:15:01 +0200 (EET) [thread overview]
Message-ID: <35e7afb6-2aad-1729-bb79-2c56a64c3277@linux.intel.com> (raw)
In-Reply-To: <20260107002153.63830-5-david.e.box@linux.intel.com>
On Tue, 6 Jan 2026, David E. Box wrote:
> Newer platform will optionally expose PMT discovery via ACPI instead of PCI
> BARs. Add a generic discovery source flag and carry ACPI discovery entries
> alongside the existing PCI resource path so PMT clients can consume either.
>
> Changes:
> - Add enum intel_vsec_disc_source { _PCI, _ACPI }.
> - Extend intel_vsec_platform_info and intel_vsec_device with source enum
> and ACPI discovery table pointer/
> - When src==ACPI, skip BAR resource setup and copy the ACPI discovery
> entries into the aux device.
>
> No user-visible behavior change yet; this only wires ACPI data through vsec
> in preparation for ACPI-enumerated PMT clients.
>
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> ---
> drivers/platform/x86/intel/vsec.c | 16 ++++++++++++++++
> include/linux/intel_vsec.h | 20 +++++++++++++++++++-
> 2 files changed, 35 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel/vsec.c b/drivers/platform/x86/intel/vsec.c
> index 42471fd609b1..705672dcdd11 100644
> --- a/drivers/platform/x86/intel/vsec.c
> +++ b/drivers/platform/x86/intel/vsec.c
> @@ -109,6 +109,7 @@ static void intel_vsec_dev_release(struct device *dev)
>
> ida_free(intel_vsec_dev->ida, intel_vsec_dev->auxdev.id);
>
> + kfree(intel_vsec_dev->acpi_disc);
> kfree(intel_vsec_dev->resource);
> kfree(intel_vsec_dev);
> }
> @@ -321,6 +322,10 @@ static int intel_vsec_add_dev(struct device *dev, struct intel_vsec_header *head
> * auxiliary device driver.
> */
> for (i = 0, tmp = res; i < header->num_entries; i++, tmp++) {
> + /* This check doesn't apply to ACPI based discovery */
"This check" is somewhat vague, if it doesn't require a novel, it would be
better to write out what check.
> + if (info->src == INTEL_VSEC_DISC_ACPI)
> + break;
> +
> tmp->start = base_addr + header->offset + i * (header->entry_size * sizeof(u32));
> tmp->end = tmp->start + (header->entry_size * sizeof(u32)) - 1;
> tmp->flags = IORESOURCE_MEM;
> @@ -339,6 +344,17 @@ static int intel_vsec_add_dev(struct device *dev, struct intel_vsec_header *head
> intel_vsec_dev->base_addr = info->base_addr;
> intel_vsec_dev->priv_data = info->priv_data;
> intel_vsec_dev->cap_id = cap_id;
> + intel_vsec_dev->src = info->src;
> +
> + if (info->src == INTEL_VSEC_DISC_ACPI) {
> + size_t bytes;
> +
> + bytes = intel_vsec_dev->num_resources * sizeof(info->acpi_disc[0]);
Should this use some overflow.h helper?
> +
> + intel_vsec_dev->acpi_disc = kmemdup(info->acpi_disc, bytes, GFP_KERNEL);
include for kmemdup() seems missing.
> + if (!intel_vsec_dev->acpi_disc)
> + return -ENOMEM;
> + }
>
> if (header->id == VSEC_ID_SDSI)
> intel_vsec_dev->ida = &intel_vsec_sdsi_ida;
> diff --git a/include/linux/intel_vsec.h b/include/linux/intel_vsec.h
> index 931ff42361a9..9d7795480c49 100644
> --- a/include/linux/intel_vsec.h
> +++ b/include/linux/intel_vsec.h
> @@ -32,6 +32,11 @@
> struct resource;
> struct pci_dev;
>
> +enum intel_vsec_disc_source {
> + INTEL_VSEC_DISC_PCI, /* PCI, default */
> + INTEL_VSEC_DISC_ACPI, /* ACPI */
> +};
> +
> enum intel_vsec_id {
> VSEC_ID_TELEMETRY = 2,
> VSEC_ID_WATCHER = 3,
> @@ -102,6 +107,10 @@ struct vsec_feature_dependency {
> * @parent: parent device in the auxbus chain
> * @headers: list of headers to define the PMT client devices to create
> * @deps: array of feature dependencies
> + * @acpi_disc: ACPI discovery tables, each entry is two QWORDs
> + * in little-endian format as defined by the PMT ACPI spec.
> + * Valid only when @provider == INTEL_VSEC_PROV_ACPI.
> + * @src: source of discovery table data
> * @priv_data: private data, usable by parent devices, currently a callback
> * @caps: bitmask of PMT capabilities for the given headers
> * @quirks: bitmask of VSEC device quirks
> @@ -112,6 +121,8 @@ struct intel_vsec_platform_info {
> struct device *parent;
> struct intel_vsec_header **headers;
> const struct vsec_feature_dependency *deps;
> + u32 (*acpi_disc)[4];
> + enum intel_vsec_disc_source src;
> void *priv_data;
> unsigned long caps;
> unsigned long quirks;
> @@ -123,7 +134,12 @@ struct intel_vsec_platform_info {
> * struct intel_sec_device - Auxbus specific device information
> * @auxdev: auxbus device struct for auxbus access
> * @dev: struct device associated with the device
> - * @resource: any resources shared by the parent
> + * @resource: PCI discovery resources (BAR windows), one per discovery
> + * instance. Valid only when @src == INTEL_VSEC_PROV_PCI
> + * @acpi_disc: ACPI discovery tables, each entry is two QWORDs
> + * in little-endian format as defined by the PMT ACPI spec.
> + * Valid only when @src == INTEL_VSEC_PROV_ACPI.
> + * @src: source of discovery table data
> * @ida: id reference
> * @num_resources: number of resources
> * @id: xarray id
> @@ -136,6 +152,8 @@ struct intel_vsec_device {
> struct auxiliary_device auxdev;
> struct device *dev;
> struct resource *resource;
> + u32 (*acpi_disc)[4];
> + enum intel_vsec_disc_source src;
> struct ida *ida;
> int num_resources;
> int id; /* xa */
>
--
i.
prev parent reply other threads:[~2026-01-15 13:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 0:21 [PATCH 0/4] platform/x86/intel/vsec: Prep for ACPI PMT discovery David E. Box
2026-01-07 0:21 ` [PATCH 1/4] platform/x86/intel/vsec: Decouple add/link helpers from PCI David E. Box
2026-01-15 13:09 ` Ilpo Järvinen
2026-01-07 0:21 ` [PATCH 2/4] platform/x86/intel/vsec: Switch exported helpers from pci_dev to device David E. Box
2026-01-08 20:39 ` Rodrigo Vivi
2026-01-15 13:08 ` Ilpo Järvinen
2026-01-20 23:47 ` David Box
2026-01-07 0:21 ` [PATCH 3/4] platform/x86/intel/vsec: Return real error codes from registration path David E. Box
2026-01-15 13:09 ` Ilpo Järvinen
2026-01-07 0:21 ` [PATCH 4/4] platform/x86/intel/vsec: Plumb ACPI PMT discovery tables through vsec David E. Box
2026-01-15 13:15 ` Ilpo Järvinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35e7afb6-2aad-1729-bb79-2c56a64c3277@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=david.e.box@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hansg@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=irenic.rajneesh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=thomas.hellstrom@linux.intel.com \
--cc=xi.pardee@linux.intel.comn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox