mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/acpi: Import PPTT definitions from Linux
Import the Processor Properties Topology Table (PPTT) definitions from the Linux kernel header (include/acpi/actbl2.h) into Xen. Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp> Origin: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git b8355bcac253 Origin: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git e62f8227851d Origin: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git 091c4af3562d Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
fa61af950b
commit
99794c8a8f
1 file changed
+113
@@ -72,6 +72,7 @@
|
||||
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
|
||||
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
|
||||
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
|
||||
#define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */
|
||||
#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
|
||||
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
|
||||
#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
|
||||
@@ -937,6 +938,118 @@ struct acpi_table_mchi {
|
||||
u8 pci_function;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* PPTT - Processor Properties Topology Table (ACPI 6.2)
|
||||
* Version 1
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct acpi_table_pptt {
|
||||
struct acpi_table_header header; /* Common ACPI table header */
|
||||
};
|
||||
|
||||
/* Values for Type field above */
|
||||
|
||||
enum acpi_pptt_type {
|
||||
ACPI_PPTT_TYPE_PROCESSOR = 0,
|
||||
ACPI_PPTT_TYPE_CACHE = 1,
|
||||
ACPI_PPTT_TYPE_ID = 2,
|
||||
ACPI_PPTT_TYPE_RESERVED = 3
|
||||
};
|
||||
|
||||
/* 0: Processor Hierarchy Node Structure */
|
||||
|
||||
struct acpi_pptt_processor {
|
||||
struct acpi_subtable_header header;
|
||||
u16 reserved;
|
||||
u32 flags;
|
||||
u32 parent;
|
||||
u32 acpi_processor_id;
|
||||
u32 number_of_priv_resources;
|
||||
};
|
||||
|
||||
/* Flags */
|
||||
|
||||
#define ACPI_PPTT_PHYSICAL_PACKAGE (1)
|
||||
#define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (1<<1)
|
||||
#define ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD (1<<2) /* ACPI 6.3 */
|
||||
#define ACPI_PPTT_ACPI_LEAF_NODE (1<<3) /* ACPI 6.3 */
|
||||
#define ACPI_PPTT_ACPI_IDENTICAL (1<<4) /* ACPI 6.3 */
|
||||
|
||||
/* 1: Cache Type Structure */
|
||||
|
||||
struct acpi_pptt_cache {
|
||||
struct acpi_subtable_header header;
|
||||
u16 reserved;
|
||||
u32 flags;
|
||||
u32 next_level_of_cache;
|
||||
u32 size;
|
||||
u32 number_of_sets;
|
||||
u8 associativity;
|
||||
u8 attributes;
|
||||
u16 line_size;
|
||||
};
|
||||
|
||||
/* 1: Cache Type Structure for PPTT version 3 */
|
||||
|
||||
struct acpi_pptt_cache_v1 {
|
||||
struct acpi_subtable_header header;
|
||||
u16 reserved;
|
||||
u32 flags;
|
||||
u32 next_level_of_cache;
|
||||
u32 size;
|
||||
u32 number_of_sets;
|
||||
u8 associativity;
|
||||
u8 attributes;
|
||||
u16 line_size;
|
||||
u32 cache_id;
|
||||
};
|
||||
|
||||
/* Flags */
|
||||
|
||||
#define ACPI_PPTT_SIZE_PROPERTY_VALID (1) /* Physical property valid */
|
||||
#define ACPI_PPTT_NUMBER_OF_SETS_VALID (1<<1) /* Number of sets valid */
|
||||
#define ACPI_PPTT_ASSOCIATIVITY_VALID (1<<2) /* Associativity valid */
|
||||
#define ACPI_PPTT_ALLOCATION_TYPE_VALID (1<<3) /* Allocation type valid */
|
||||
#define ACPI_PPTT_CACHE_TYPE_VALID (1<<4) /* Cache type valid */
|
||||
#define ACPI_PPTT_WRITE_POLICY_VALID (1<<5) /* Write policy valid */
|
||||
#define ACPI_PPTT_LINE_SIZE_VALID (1<<6) /* Line size valid */
|
||||
#define ACPI_PPTT_CACHE_ID_VALID (1<<7) /* Cache ID valid */
|
||||
|
||||
/* Masks for Attributes */
|
||||
|
||||
#define ACPI_PPTT_MASK_ALLOCATION_TYPE (0x03) /* Allocation type */
|
||||
#define ACPI_PPTT_MASK_CACHE_TYPE (0x0C) /* Cache type */
|
||||
#define ACPI_PPTT_MASK_WRITE_POLICY (0x10) /* Write policy */
|
||||
|
||||
/* Attributes describing cache */
|
||||
#define ACPI_PPTT_CACHE_READ_ALLOCATE (0x0) /* Cache line is allocated on read */
|
||||
#define ACPI_PPTT_CACHE_WRITE_ALLOCATE (0x01) /* Cache line is allocated on write */
|
||||
#define ACPI_PPTT_CACHE_RW_ALLOCATE (0x02) /* Cache line is allocated on read and write */
|
||||
#define ACPI_PPTT_CACHE_RW_ALLOCATE_ALT (0x03) /* Alternate representation of above */
|
||||
|
||||
#define ACPI_PPTT_CACHE_TYPE_DATA (0x0) /* Data cache */
|
||||
#define ACPI_PPTT_CACHE_TYPE_INSTR (1<<2) /* Instruction cache */
|
||||
#define ACPI_PPTT_CACHE_TYPE_UNIFIED (2<<2) /* Unified I & D cache */
|
||||
#define ACPI_PPTT_CACHE_TYPE_UNIFIED_ALT (3<<2) /* Alternate representation of above */
|
||||
|
||||
#define ACPI_PPTT_CACHE_POLICY_WB (0x0) /* Cache is write back */
|
||||
#define ACPI_PPTT_CACHE_POLICY_WT (1<<4) /* Cache is write through */
|
||||
|
||||
/* 2: ID Structure */
|
||||
|
||||
struct acpi_pptt_id {
|
||||
struct acpi_subtable_header header;
|
||||
u16 reserved;
|
||||
u32 vendor_id;
|
||||
u64 level1_id;
|
||||
u64 level2_id;
|
||||
u16 major_rev;
|
||||
u16 minor_rev;
|
||||
u16 spin_rev;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* SLIC - Software Licensing Description Table
|
||||
|
||||