aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86/include
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-06-14 19:00:04 +0200
committerPatrick Rudolph <siro@das-labor.org>2019-06-19 11:26:54 +0000
commit9d98e5ae0dc0ff0833c762586b296f4f91f9d485 (patch)
tree54d0b40fbe6a82ef220fd6a29510b4fe1b564726 /src/arch/x86/include
parent7752645041c3094f9f58bc347d2bc1c23fe2cfb0 (diff)
acpi: Add SPMI table
Add the SPMI table as defined in the IPMI spec v2: https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf Tested on Wedge100s. Change-Id: Idff5134ce4c124f7e76acb0080da404b0c0dfffe Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33487 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r--src/arch/x86/include/arch/acpi.h48
1 files changed, 47 insertions, 1 deletions
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index dbf46a9b1b..e48b2da567 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -82,7 +82,7 @@ enum acpi_tables {
BERT, DBG2, DMAR, DSDT, FACS, FADT, HEST, HPET, IVRS, MADT, MCFG,
RSDP, RSDT, SLIT, SRAT, SSDT, TCPA, TPM2, XSDT, ECDT,
/* Additional proprietary tables used by coreboot */
- VFCT, NHLT
+ VFCT, NHLT, SPMI
};
/* RSDP (Root System Description Pointer) */
@@ -782,6 +782,43 @@ enum acpi_upc_type {
UPC_TYPE_HUB
};
+enum acpi_ipmi_interface_type {
+ IPMI_INTERFACE_RESERVED = 0,
+ IPMI_INTERFACE_KCS,
+ IPMI_INTERFACE_SMIC,
+ IPMI_INTERFACE_BT,
+ IPMI_INTERFACE_SSIF,
+};
+
+#define ACPI_IPMI_PCI_DEVICE_FLAG (1 << 0)
+#define ACPI_IPMI_INT_TYPE_SCI (1 << 0)
+#define ACPI_IPMI_INT_TYPE_APIC (1 << 1)
+
+/* ACPI IPMI 2.0 */
+struct acpi_spmi {
+ struct acpi_table_header header;
+ u8 interface_type;
+ u8 reserved;
+ u16 specification_revision;
+ u8 interrupt_type;
+ u8 gpe;
+ u8 reserved2;
+ u8 pci_device_flag;
+
+ u32 global_system_interrupt;
+ acpi_addr_t base_address;
+ union {
+ struct {
+ u8 pci_segment_group;
+ u8 pci_bus;
+ u8 pci_device;
+ u8 pci_function;
+ };
+ u8 uid[4];
+ };
+ u8 reserved3;
+} __packed;
+
unsigned long fw_cfg_acpi_tables(unsigned long start);
/* These are implemented by the target port or north/southbridge. */
@@ -834,6 +871,15 @@ void acpi_create_vfct(struct device *device,
struct acpi_vfct *vfct_struct,
unsigned long current));
+void acpi_create_ipmi(struct device *device,
+ struct acpi_spmi *spmi,
+ const u16 ipmi_revision,
+ const acpi_addr_t *addr,
+ const enum acpi_ipmi_interface_type type,
+ const s8 gpe_interrupt,
+ const u32 apic_interrupt,
+ const u32 uid);
+
void acpi_create_ivrs(acpi_ivrs_t *ivrs,
unsigned long (*acpi_fill_ivrs)(acpi_ivrs_t *ivrs_struct,
unsigned long current));