Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37008 )
Change subject: cpu/x86/smm: Add a helper function returning top of save state
......................................................................
cpu/x86/smm: Add a helper function returning top of save state
Some entries like smm base and smm revision have a fixed location in
the save w.r.t. the save state top.
Change-Id: I82dadcb966ee686c1652c7a1298dcb9938ae888c
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/cpu/x86/smm/smihandler.c
M src/cpu/x86/smm/smm_module_handler.c
M src/include/cpu/x86/smm.h
3 files changed, 21 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/37008/1
diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c
index 20417d1..79a3936 100644
--- a/src/cpu/x86/smm/smihandler.c
+++ b/src/cpu/x86/smm/smihandler.c
@@ -132,6 +132,13 @@
return (void *)base;
}
+uint8_t *smm_get_save_state_top(int cpu)
+{
+ const uint32_t smm_base = 0xa0000;
+
+ return (uint8_t *)smm_base + SMM_ENTRY_OFFSET * 2 - (cpu * 0x400);
+}
+
/**
* @brief Interrupt handler for SMI#
*
diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c
index bd4d48c..80bff9f 100644
--- a/src/cpu/x86/smm/smm_module_handler.c
+++ b/src/cpu/x86/smm/smm_module_handler.c
@@ -114,6 +114,19 @@
return base;
}
+uint8_t *smm_get_save_state_top(int cpu)
+{
+ uint8_t *base;
+
+ /* This function assumes all save states start at top of default
+ * SMRAM size space and are staggered down by save state size. */
+ base = (void *)smm_runtime->smbase;
+ base += SMM_DEFAULT_SIZE;
+ base -= cpu * smm_runtime->save_state_size;
+
+ return base;
+}
+
asmlinkage void smm_handler_start(void *arg)
{
const struct smm_module_params *p;
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index cf107b1..0ade970 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -94,6 +94,7 @@
/* Retrieve SMM save state for a given CPU. WARNING: This does not take into
* account CPUs which are configured to not save their state to RAM. */
void *smm_get_save_state(int cpu);
+uint8_t *smm_get_save_state_top(int cpu);
/* SMM Module Loading API */
--
To view, visit https://review.coreboot.org/c/coreboot/+/37008
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I82dadcb966ee686c1652c7a1298dcb9938ae888c
Gerrit-Change-Number: 37008
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Aamir Bohra has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34517 )
Change subject: soc/intel/{cnl,icl}: Enable support to configure interrupt overrides
......................................................................
soc/intel/{cnl,icl}: Enable support to configure interrupt overrides
This implementation selects SOC_INTEL_COMMON_ITSS_INTERRUPT_OVERRIDE
config. It would enable support from SOC to dynamically populate the
PCI IRQ routing table based on the devices enabled from the mainboard.
And pass the same to FSP to configure the IRQ entries in ITSS PIRx
register. The same table can be used to generate the ACPI PIRQ mapping
table.
Change-Id: I8464d5797cb4ff85406c06e1ecb92c7207380acd
Signed-off-by: Aamir Bohra <aamir.bohra(a)intel.com>
---
M src/soc/intel/cannonlake/Kconfig
M src/soc/intel/icelake/Kconfig
2 files changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/34517/1
diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig
index f859cd5..0283f2c 100644
--- a/src/soc/intel/cannonlake/Kconfig
+++ b/src/soc/intel/cannonlake/Kconfig
@@ -97,6 +97,7 @@
select SOC_INTEL_COMMON_BLOCK_XHCI_ELOG
select SOC_INTEL_COMMON_BLOCK_SMM
select SOC_INTEL_COMMON_BLOCK_SMM_IO_TRAP
+ select SOC_INTEL_COMMON_ITSS_INTERRUPT_OVERRIDE
select SOC_INTEL_COMMON_PCH_BASE
select SOC_INTEL_COMMON_NHLT
select SOC_INTEL_COMMON_RESET
diff --git a/src/soc/intel/icelake/Kconfig b/src/soc/intel/icelake/Kconfig
index 5dca44b..79a19ee 100644
--- a/src/soc/intel/icelake/Kconfig
+++ b/src/soc/intel/icelake/Kconfig
@@ -51,6 +51,7 @@
select SOC_INTEL_COMMON_BLOCK_SA
select SOC_INTEL_COMMON_BLOCK_SMM
select SOC_INTEL_COMMON_BLOCK_SMM_IO_TRAP
+ select SOC_INTEL_COMMON_ITSS_INTERRUPT_OVERRIDE
select SOC_INTEL_COMMON_PCH_BASE
select SOC_INTEL_COMMON_RESET
select SSE2
--
To view, visit https://review.coreboot.org/c/coreboot/+/34517
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8464d5797cb4ff85406c06e1ecb92c7207380acd
Gerrit-Change-Number: 34517
Gerrit-PatchSet: 1
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-MessageType: newchange
Aamir Bohra has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34348 )
Change subject: src/soc/intel/*/include: Get list of devices that needs IRQ programming
......................................................................
src/soc/intel/*/include: Get list of devices that needs IRQ programming
This implementation adds SOC function that returns list of PCI devices
that needs IRQ programming. This list can be further used to program
IRQ for these devices.
Change-Id: I3482172f6cb549dece23e2b8b09b8b79578b83b7
Signed-off-by: Aamir Bohra <aamir.bohra(a)intel.com>
---
M src/soc/intel/cannonlake/Makefile.inc
A src/soc/intel/cannonlake/irq.c
M src/soc/intel/icelake/Makefile.inc
A src/soc/intel/icelake/irq.c
4 files changed, 150 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/34348/1
diff --git a/src/soc/intel/cannonlake/Makefile.inc b/src/soc/intel/cannonlake/Makefile.inc
index 8a4a8b7..ed0d09c 100644
--- a/src/soc/intel/cannonlake/Makefile.inc
+++ b/src/soc/intel/cannonlake/Makefile.inc
@@ -41,6 +41,7 @@
ramstage-y += graphics.c
ramstage-y += gspi.c
ramstage-y += i2c.c
+ramstage-$(CONFIG_SOC_INTEL_COMMON_ITSS_INTERRUPT_OVERRIDE) += irq.c
ramstage-y += lockdown.c
ramstage-y += lpc.c
ramstage-y += me.c
diff --git a/src/soc/intel/cannonlake/irq.c b/src/soc/intel/cannonlake/irq.c
new file mode 100644
index 0000000..ce0e539
--- /dev/null
+++ b/src/soc/intel/cannonlake/irq.c
@@ -0,0 +1,74 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <intelblocks/irq.h>
+#include <soc/pci_devs.h>
+#include <stdint.h>
+
+static const int irq_devices[] = {
+ PCH_DEVFN_HDA,
+ PCH_DEVFN_SMBUS,
+ PCH_DEVFN_GBE,
+ PCH_DEVFN_TRACEHUB,
+ PCH_DEVFN_PCIE9,
+ PCH_DEVFN_PCIE10,
+ PCH_DEVFN_PCIE11,
+ PCH_DEVFN_PCIE12,
+ PCH_DEVFN_PCIE13,
+ PCH_DEVFN_PCIE14,
+ PCH_DEVFN_PCIE15,
+ PCH_DEVFN_PCIE16,
+ PCH_DEVFN_PCIE1,
+ PCH_DEVFN_PCIE2,
+ PCH_DEVFN_PCIE3,
+ PCH_DEVFN_PCIE4,
+ PCH_DEVFN_PCIE5,
+ PCH_DEVFN_PCIE6,
+ PCH_DEVFN_PCIE7,
+ PCH_DEVFN_PCIE8,
+ PCH_DEVFN_EMMC,
+ PCH_DEVFN_SATA,
+ PCH_DEVFN_CSE,
+ PCH_DEVFN_CSE_2,
+ PCH_DEVFN_CSE_IDER,
+ PCH_DEVFN_CSE_KT,
+ PCH_DEVFN_CSE_3,
+ PCH_DEVFN_CSE_4,
+ PCH_DEVFN_XHCI,
+ PCH_DEVFN_USBOTG,
+ PCH_DEVFN_CNViWIFI,
+ PCH_DEVFN_SDCARD,
+ PCH_DEVFN_ISH,
+ PCH_DEVFN_THERMAL,
+ PCH_DEVFN_UFS,
+ PCH_DEVFN_UART0,
+ PCH_DEVFN_UART1,
+ PCH_DEVFN_GSPI0,
+ PCH_DEVFN_GSPI1,
+ PCH_DEVFN_UART2,
+ PCH_DEVFN_I2C5,
+ PCH_DEVFN_I2C4,
+ PCH_DEVFN_I2C0,
+ PCH_DEVFN_I2C1,
+ PCH_DEVFN_I2C2,
+ PCH_DEVFN_I2C3,
+ PCH_DEVFN_GSPI2,
+};
+
+const int *get_soc_irq_devices(size_t *size)
+{
+ *size = ARRAY_SIZE(irq_devices);
+ return irq_devices;
+}
diff --git a/src/soc/intel/icelake/Makefile.inc b/src/soc/intel/icelake/Makefile.inc
index cd02934..2973e15 100644
--- a/src/soc/intel/icelake/Makefile.inc
+++ b/src/soc/intel/icelake/Makefile.inc
@@ -43,6 +43,7 @@
ramstage-y += graphics.c
ramstage-y += gspi.c
ramstage-y += i2c.c
+ramstage-$(CONFIG_SOC_INTEL_COMMON_ITSS_INTERRUPT_OVERRIDE) += irq.c
ramstage-y += lockdown.c
ramstage-y += memmap.c
ramstage-y += p2sb.c
diff --git a/src/soc/intel/icelake/irq.c b/src/soc/intel/icelake/irq.c
new file mode 100644
index 0000000..ce0e539
--- /dev/null
+++ b/src/soc/intel/icelake/irq.c
@@ -0,0 +1,74 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <intelblocks/irq.h>
+#include <soc/pci_devs.h>
+#include <stdint.h>
+
+static const int irq_devices[] = {
+ PCH_DEVFN_HDA,
+ PCH_DEVFN_SMBUS,
+ PCH_DEVFN_GBE,
+ PCH_DEVFN_TRACEHUB,
+ PCH_DEVFN_PCIE9,
+ PCH_DEVFN_PCIE10,
+ PCH_DEVFN_PCIE11,
+ PCH_DEVFN_PCIE12,
+ PCH_DEVFN_PCIE13,
+ PCH_DEVFN_PCIE14,
+ PCH_DEVFN_PCIE15,
+ PCH_DEVFN_PCIE16,
+ PCH_DEVFN_PCIE1,
+ PCH_DEVFN_PCIE2,
+ PCH_DEVFN_PCIE3,
+ PCH_DEVFN_PCIE4,
+ PCH_DEVFN_PCIE5,
+ PCH_DEVFN_PCIE6,
+ PCH_DEVFN_PCIE7,
+ PCH_DEVFN_PCIE8,
+ PCH_DEVFN_EMMC,
+ PCH_DEVFN_SATA,
+ PCH_DEVFN_CSE,
+ PCH_DEVFN_CSE_2,
+ PCH_DEVFN_CSE_IDER,
+ PCH_DEVFN_CSE_KT,
+ PCH_DEVFN_CSE_3,
+ PCH_DEVFN_CSE_4,
+ PCH_DEVFN_XHCI,
+ PCH_DEVFN_USBOTG,
+ PCH_DEVFN_CNViWIFI,
+ PCH_DEVFN_SDCARD,
+ PCH_DEVFN_ISH,
+ PCH_DEVFN_THERMAL,
+ PCH_DEVFN_UFS,
+ PCH_DEVFN_UART0,
+ PCH_DEVFN_UART1,
+ PCH_DEVFN_GSPI0,
+ PCH_DEVFN_GSPI1,
+ PCH_DEVFN_UART2,
+ PCH_DEVFN_I2C5,
+ PCH_DEVFN_I2C4,
+ PCH_DEVFN_I2C0,
+ PCH_DEVFN_I2C1,
+ PCH_DEVFN_I2C2,
+ PCH_DEVFN_I2C3,
+ PCH_DEVFN_GSPI2,
+};
+
+const int *get_soc_irq_devices(size_t *size)
+{
+ *size = ARRAY_SIZE(irq_devices);
+ return irq_devices;
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/34348
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3482172f6cb549dece23e2b8b09b8b79578b83b7
Gerrit-Change-Number: 34348
Gerrit-PatchSet: 1
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37278 )
Change subject: soc/intel/fsp-car: Use the coreboot defined stack
......................................................................
soc/intel/fsp-car: Use the coreboot defined stack
The stack needs to be in the coreboot defined region to not collide
with other symbols.
Change-Id: I02a379d2ac73ae30239bd45859c3f09de1a9d0e0
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/37278/1
diff --git a/src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S b/src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S
index ec43311..d7ef834 100644
--- a/src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S
+++ b/src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S
@@ -87,7 +87,7 @@
jnz .halt_forever
/* Setup bootblock stack */
- mov %edx, %esp
+ movl _ecar_stack, %esp
/* coreboot assumes CAR region will be zero */
cld
--
To view, visit https://review.coreboot.org/c/coreboot/+/37278
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I02a379d2ac73ae30239bd45859c3f09de1a9d0e0
Gerrit-Change-Number: 37278
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange