Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45760 )
Change subject: sb/intel/lynxpoint: Update GNVS using common save state accessors
......................................................................
sb/intel/lynxpoint: Update GNVS using common save state accessors
Change-Id: I4dd53d4bba20fd813137bc166e7eda547085db56
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/southbridge/intel/lynxpoint/smihandler.c
1 file changed, 8 insertions(+), 42 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/45760/1
diff --git a/src/southbridge/intel/lynxpoint/smihandler.c b/src/southbridge/intel/lynxpoint/smihandler.c
index 7890b17..0b88ec8 100644
--- a/src/southbridge/intel/lynxpoint/smihandler.c
+++ b/src/southbridge/intel/lynxpoint/smihandler.c
@@ -7,7 +7,7 @@
#include <cpu/x86/cache.h>
#include <device/pci_def.h>
#include <cpu/x86/smm.h>
-#include <cpu/intel/em64t101_save_state.h>
+#include <cpu/x86/save_state.h>
#include <elog.h>
#include <halt.h>
#include <option.h>
@@ -181,46 +181,10 @@
}
}
-/*
- * Look for Synchronous IO SMI and use save state from that
- * core in case we are not running on the same core that
- * initiated the IO transaction.
- */
-static em64t101_smm_state_save_area_t *smi_apmc_find_state_save(u8 cmd)
-{
- em64t101_smm_state_save_area_t *state;
- int node;
-
- /* Check all nodes looking for the one that issued the IO */
- for (node = 0; node < CONFIG_MAX_CPUS; node++) {
- state = smm_get_save_state(node);
-
- /* Check for Synchronous IO (bit0 == 1) */
- if (!(state->io_misc_info & (1 << 0)))
- continue;
-
- /* Make sure it was a write (bit4 == 0) */
- if (state->io_misc_info & (1 << 4))
- continue;
-
- /* Check for APMC IO port */
- if (((state->io_misc_info >> 16) & 0xff) != APM_CNT)
- continue;
-
- /* Check AX against the requested command */
- if ((state->rax & 0xff) != cmd)
- continue;
-
- return state;
- }
-
- return NULL;
-}
-
static void southbridge_smi_apmc(void)
{
u8 reg8;
- em64t101_smm_state_save_area_t *state;
+ int node;
static int chipset_finalized = 0;
/* Emulate B2 register as the FADT / Linux expects it */
@@ -268,10 +232,12 @@
"SMI#: SMM structures already initialized!\n");
return;
}
- state = smi_apmc_find_state_save(reg8);
- if (state) {
- /* EBX in the state save contains the GNVS pointer */
- gnvs = (struct global_nvs *)((u32)state->rbx);
+ int node = get_apmc_node(reg8);
+ if (node >= 0) {
+ if (get_save_state_reg(RBX, node, &gnvs, sizeof(gnvs))) {
+ printk(BIOS_ERR, "SMI#: ERROR: unable to get GNVS pointer\n");
+ return;
+ }
if (smm_points_to_smram(gnvs, sizeof(*gnvs))) {
printk(BIOS_ERR, "SMI#: ERROR: GNVS overlaps SMM\n");
return;
--
To view, visit https://review.coreboot.org/c/coreboot/+/45760
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4dd53d4bba20fd813137bc166e7eda547085db56
Gerrit-Change-Number: 45760
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
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/+/48736 )
Change subject: [WIP]soc/intel/xeon_sp/cpx: Run romstage from CAR
......................................................................
[WIP]soc/intel/xeon_sp/cpx: Run romstage from CAR
Tested works on ocp/deltalake
Change-Id: Ie51677dd1f2be7200098bb83f756ddb0dbe69e44
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/xeon_sp/Kconfig
M src/soc/intel/xeon_sp/cpx/Kconfig
2 files changed, 10 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/48736/1
diff --git a/src/soc/intel/xeon_sp/Kconfig b/src/soc/intel/xeon_sp/Kconfig
index 664f960..907e1f9 100644
--- a/src/soc/intel/xeon_sp/Kconfig
+++ b/src/soc/intel/xeon_sp/Kconfig
@@ -65,6 +65,7 @@
select HAVE_SMI_HANDLER
select X86_SMM_LOADER_VERSION2
select REG_SCRIPT
+ select NO_XIP_EARLY_STAGES
config MAINBOARD_USES_FSP2_0
bool
diff --git a/src/soc/intel/xeon_sp/cpx/Kconfig b/src/soc/intel/xeon_sp/cpx/Kconfig
index 43337b5..a31d372 100644
--- a/src/soc/intel/xeon_sp/cpx/Kconfig
+++ b/src/soc/intel/xeon_sp/cpx/Kconfig
@@ -31,11 +31,11 @@
config DCACHE_RAM_BASE
hex
- default 0xfe800000
+ default 0xfe940000
config DCACHE_RAM_SIZE
hex
- default 0x1fff00
+ default 0xbff00
help
The size of the cache-as-ram region required during bootblock
and/or romstage. FSP-T reserves the upper 0x100 for
@@ -43,7 +43,7 @@
config DCACHE_BSP_STACK_SIZE
hex
- default 0x140000
+ default 0x40000
help
The amount of anticipated stack usage in CAR by bootblock and
other stages. It needs to include FSP-M stack requirement and
@@ -51,6 +51,12 @@
says this needs to be 256KiB, but practice show this needs to
be a lot more.
+config ROMSTAGE_ADDR
+ hex
+ default 0xfe9d0000
+ help
+ The base address (in CAR) where romstage should be linked.
+
config CPU_MICROCODE_CBFS_LOC
hex
default 0xfff0fdc0
--
To view, visit https://review.coreboot.org/c/coreboot/+/48736
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie51677dd1f2be7200098bb83f756ddb0dbe69e44
Gerrit-Change-Number: 48736
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48674 )
Change subject: mb/ocp/tiogapass: Don't select PARALLEL_MP_AP_WORK
......................................................................
mb/ocp/tiogapass: Don't select PARALLEL_MP_AP_WORK
There is currently no use for AP after CPU init and it looks like
something goes wrong when halting APs right before booting the
payload.
Change-Id: Id64425730a367d7a31716d26a1e99024e326baf2
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/mainboard/ocp/tiogapass/Kconfig
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/48674/1
diff --git a/src/mainboard/ocp/tiogapass/Kconfig b/src/mainboard/ocp/tiogapass/Kconfig
index 67c1fa9..4399401 100644
--- a/src/mainboard/ocp/tiogapass/Kconfig
+++ b/src/mainboard/ocp/tiogapass/Kconfig
@@ -10,7 +10,6 @@
select IPMI_KCS_ROMSTAGE
select MAINBOARD_USES_FSP2_0
select OCP_DMI
- select PARALLEL_MP_AP_WORK
select SOC_INTEL_SKYLAKE_SP
select SUPERIO_ASPEED_AST2400
select VPD
--
To view, visit https://review.coreboot.org/c/coreboot/+/48674
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id64425730a367d7a31716d26a1e99024e326baf2
Gerrit-Change-Number: 48674
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Anjaneya "Reddy" Chagam <anjaneya.chagam(a)intel.com>
Gerrit-Reviewer: Johnny Lin <Johnny_Lin(a)wiwynn.com>
Gerrit-Reviewer: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Reviewer: Morgan Jang <Morgan_Jang(a)wiwynn.com>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48504 )
Change subject: arch/x86/car.ld: Align the stack at buildtime
......................................................................
arch/x86/car.ld: Align the stack at buildtime
Change-Id: I4abf58619e4a09563451683960918c8794f186dc
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/arch/x86/car.ld
M src/include/memlayout.h
2 files changed, 7 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/48504/1
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 9f8c2ad..aa28b43 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -27,9 +27,8 @@
/* Stack for CAR stages. Since it persists across all stages that
* use CAR it can be reused. The chipset/SoC is expected to provide
* the stack size. */
- _car_stack = .;
- . += CONFIG_DCACHE_BSP_STACK_SIZE;
- _ecar_stack = .;
+ CAR_STACK(., CONFIG_DCACHE_BSP_STACK_SIZE)
+
/* The pre-ram cbmem console as well as the timestamp region are fixed
* in size. Therefore place them above the car global section so that
* multiple stages (romstage and verstage) have a consistent
diff --git a/src/include/memlayout.h b/src/include/memlayout.h
index bf830b7..413248a 100644
--- a/src/include/memlayout.h
+++ b/src/include/memlayout.h
@@ -60,6 +60,11 @@
#define EARLYRAM_STACK(addr, size) \
REGION(earlyram_stack, addr, size, ARCH_STACK_ALIGN_SIZE)
+#define CAR_STACK(addr, size) \
+ REGION(car_stack, addr, size, ARCH_STACK_ALIGN_SIZE) \
+ _ = ASSERT(. == ALIGN(ARCH_STACK_ALIGN_SIZE), \
+ STR(_ecar_stack must be aligned to ARCH_STACK_ALIGN_SIZE));
+
/* Use either CBFS_CACHE (unified) or both (PRERAM|POSTRAM)_CBFS_CACHE */
#define CBFS_CACHE(addr, size) \
REGION(cbfs_cache, addr, size, 4) \
--
To view, visit https://review.coreboot.org/c/coreboot/+/48504
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4abf58619e4a09563451683960918c8794f186dc
Gerrit-Change-Number: 48504
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46376 )
Change subject: drivers/txt/getsec_enteraccs.S: Make sure the MTRR save hits dram
......................................................................
drivers/txt/getsec_enteraccs.S: Make sure the MTRR save hits dram
Since we change the caching setup it is probably a good idea to make
sure our saved MTRR setup hits dram.
Change-Id: Ifa04f6de8af35c043fe049bc9a1bd3a8a4f1c330
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/security/intel/txt/getsec_enteraccs.S
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/46376/1
diff --git a/src/security/intel/txt/getsec_enteraccs.S b/src/security/intel/txt/getsec_enteraccs.S
index 563dc08..31f41ed 100644
--- a/src/security/intel/txt/getsec_enteraccs.S
+++ b/src/security/intel/txt/getsec_enteraccs.S
@@ -107,6 +107,7 @@
movl %cr0, %eax
orl $(CR0_CD | CR0_NW), %eax
movl %eax, %cr0
+ wbinvd
/* Disable fixed MTRRs */
movl $(MTRR_DEF_TYPE_MSR), %ecx
--
To view, visit https://review.coreboot.org/c/coreboot/+/46376
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifa04f6de8af35c043fe049bc9a1bd3a8a4f1c330
Gerrit-Change-Number: 46376
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange