[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56f56bdd-80be-d140-1b9b-6c1d75df252f@linux.intel.com>
Date: Tue, 20 May 2025 17:01:53 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: "David E. Box" <david.e.box@...ux.intel.com>
cc: LKML <linux-kernel@...r.kernel.org>, platform-driver-x86@...r.kernel.org,
srinivas.pandruvada@...ux.intel.com,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, tony.luck@...el.com,
xi.pardee@...ux.intel.com, Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH 07/15] platform/x86/intel/vsec: Add new Discovery
feature
On Wed, 30 Apr 2025, David E. Box wrote:
> Add the PCIe VSEC ID for new Intel Platform Monitoring Technology
> Capability Discovery feature. Discovery provides detailed information for
> the various Intel VSEC features. Also make the driver a supplier for
> TPMI and Telemetry drivers which will use the information.
>
> Signed-off-by: David E. Box <david.e.box@...ux.intel.com>
> ---
> drivers/platform/x86/intel/vsec.c | 26 ++++++++++++++++++++++++--
> include/linux/intel_vsec.h | 4 +++-
> 2 files changed, 27 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/vsec.c b/drivers/platform/x86/intel/vsec.c
> index 5374abef0b48..e3ec17a53e62 100644
> --- a/drivers/platform/x86/intel/vsec.c
> +++ b/drivers/platform/x86/intel/vsec.c
> @@ -65,6 +65,9 @@ static const char *intel_vsec_name(enum intel_vsec_id id)
> case VSEC_ID_TPMI:
> return "tpmi";
>
> + case VSEC_ID_DISCOVERY:
> + return "discovery";
> +
> default:
> return NULL;
> }
> @@ -83,6 +86,8 @@ static bool intel_vsec_supported(u16 id, unsigned long caps)
> return !!(caps & VSEC_CAP_SDSI);
> case VSEC_ID_TPMI:
> return !!(caps & VSEC_CAP_TPMI);
> + case VSEC_ID_DISCOVERY:
> + return !!(caps & VSEC_CAP_DISCOVERY);
> default:
> return false;
> }
> @@ -140,6 +145,8 @@ static bool vsec_driver_present(int cap_id)
> return IS_ENABLED(CONFIG_INTEL_SDSI);
> case VSEC_CAP_TPMI:
> return IS_ENABLED(CONFIG_INTEL_TPMI);
> + case VSEC_CAP_DISCOVERY:
> + return IS_ENABLED(CONFIG_INTEL_PMT_DISCOVERY);
> default:
> return false;
> }
> @@ -392,6 +399,9 @@ static int get_cap_id(u32 header_id, unsigned long *cap_id)
> case VSEC_ID_TPMI:
> *cap_id = ilog2(VSEC_CAP_TPMI);
> break;
> + case VSEC_ID_DISCOVERY:
> + *cap_id = ilog2(VSEC_CAP_DISCOVERY);
> + break;
> default:
> return -EINVAL;
> }
> @@ -677,14 +687,26 @@ static const struct intel_vsec_platform_info mtl_info = {
> .caps = VSEC_CAP_TELEMETRY,
> };
>
> +static const struct vsec_feature_dependency oobmsm_deps[] = {
> + {
> + .feature = VSEC_CAP_TELEMETRY,
> + .supplier_bitmap = VSEC_CAP_DISCOVERY
Missing a comma.
> + },
> +};
> +
> /* OOBMSM info */
> static const struct intel_vsec_platform_info oobmsm_info = {
> - .caps = VSEC_CAP_TELEMETRY | VSEC_CAP_SDSI | VSEC_CAP_TPMI,
> + .caps = VSEC_CAP_TELEMETRY | VSEC_CAP_SDSI | VSEC_CAP_TPMI |
> + VSEC_CAP_DISCOVERY,
> + .deps = oobmsm_deps,
> + .num_deps = ARRAY_SIZE(oobmsm_deps),
> };
>
> /* DMR OOBMSM info */
> static const struct intel_vsec_platform_info dmr_oobmsm_info = {
> - .caps = VSEC_CAP_TELEMETRY | VSEC_CAP_TPMI,
> + .caps = VSEC_CAP_TELEMETRY | VSEC_CAP_TPMI | VSEC_CAP_DISCOVERY,
> + .deps = oobmsm_deps,
> + .num_deps = ARRAY_SIZE(oobmsm_deps),
> };
>
> /* TGL info */
> diff --git a/include/linux/intel_vsec.h b/include/linux/intel_vsec.h
> index 71067afaca99..a07796d7d43b 100644
> --- a/include/linux/intel_vsec.h
> +++ b/include/linux/intel_vsec.h
> @@ -16,7 +16,8 @@
> #define VSEC_CAP_CRASHLOG BIT(3)
> #define VSEC_CAP_SDSI BIT(4)
> #define VSEC_CAP_TPMI BIT(5)
> -#define VSEC_FEATURE_COUNT 6
> +#define VSEC_CAP_DISCOVERY BIT(6)
> +#define VSEC_FEATURE_COUNT 7
>
> /* Intel DVSEC offsets */
> #define INTEL_DVSEC_ENTRIES 0xA
> @@ -33,6 +34,7 @@ enum intel_vsec_id {
> VSEC_ID_TELEMETRY = 2,
> VSEC_ID_WATCHER = 3,
> VSEC_ID_CRASHLOG = 4,
> + VSEC_ID_DISCOVERY = 12,
> VSEC_ID_SDSI = 65,
> VSEC_ID_TPMI = 66,
> };
>
--
i.
Powered by blists - more mailing lists