mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
platform/x86/intel/pmt: telemetry: Fix fixed region handling
Use the telem_type and the fixed block guid to determine if an entry is a fixed region. For certain platforms we don't support this. Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: David E. Box <david.e.box@linux.intel.com> Signed-off-by: Gayatri Kammela <gayatri.kammela@linux.intel.com> Link: https://lore.kernel.org/r/20220629221334.434307-4-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
99de05043e
commit
ba7e421eee
1 changed files with 15 additions and 3 deletions
|
@ -23,12 +23,19 @@
|
||||||
#define TELEM_GUID_OFFSET 0x4
|
#define TELEM_GUID_OFFSET 0x4
|
||||||
#define TELEM_BASE_OFFSET 0x8
|
#define TELEM_BASE_OFFSET 0x8
|
||||||
#define TELEM_ACCESS(v) ((v) & GENMASK(3, 0))
|
#define TELEM_ACCESS(v) ((v) & GENMASK(3, 0))
|
||||||
|
#define TELEM_TYPE(v) (((v) & GENMASK(7, 4)) >> 4)
|
||||||
/* size is in bytes */
|
/* size is in bytes */
|
||||||
#define TELEM_SIZE(v) (((v) & GENMASK(27, 12)) >> 10)
|
#define TELEM_SIZE(v) (((v) & GENMASK(27, 12)) >> 10)
|
||||||
|
|
||||||
/* Used by client hardware to identify a fixed telemetry entry*/
|
/* Used by client hardware to identify a fixed telemetry entry*/
|
||||||
#define TELEM_CLIENT_FIXED_BLOCK_GUID 0x10000000
|
#define TELEM_CLIENT_FIXED_BLOCK_GUID 0x10000000
|
||||||
|
|
||||||
|
enum telem_type {
|
||||||
|
TELEM_TYPE_PUNIT = 0,
|
||||||
|
TELEM_TYPE_CRASHLOG,
|
||||||
|
TELEM_TYPE_PUNIT_FIXED,
|
||||||
|
};
|
||||||
|
|
||||||
struct pmt_telem_priv {
|
struct pmt_telem_priv {
|
||||||
int num_entries;
|
int num_entries;
|
||||||
struct intel_pmt_entry entry[];
|
struct intel_pmt_entry entry[];
|
||||||
|
@ -39,10 +46,15 @@ static bool pmt_telem_region_overlaps(struct intel_pmt_entry *entry,
|
||||||
{
|
{
|
||||||
u32 guid = readl(entry->disc_table + TELEM_GUID_OFFSET);
|
u32 guid = readl(entry->disc_table + TELEM_GUID_OFFSET);
|
||||||
|
|
||||||
if (guid != TELEM_CLIENT_FIXED_BLOCK_GUID)
|
if (intel_pmt_is_early_client_hw(dev)) {
|
||||||
return false;
|
u32 type = TELEM_TYPE(readl(entry->disc_table));
|
||||||
|
|
||||||
return intel_pmt_is_early_client_hw(dev);
|
if ((type == TELEM_TYPE_PUNIT_FIXED) ||
|
||||||
|
(guid == TELEM_CLIENT_FIXED_BLOCK_GUID))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pmt_telem_header_decode(struct intel_pmt_entry *entry,
|
static int pmt_telem_header_decode(struct intel_pmt_entry *entry,
|
||||||
|
|
Loading…
Add table
Reference in a new issue