Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35884 )
Change subject: soc/intel/Kconfig: Move MMCONF_BASE_ADDRESS out of a common place
......................................................................
soc/intel/Kconfig: Move MMCONF_BASE_ADDRESS out of a common place
include/device/pci_mmio_cfg.h now has a compile time error if
MMCONF_BASE_ADDRESS is not defined. This requires soc/intel target to
explicitly set this in the SOC dir, instead of potentially using a
possibly wrong common default.
Change-Id: Idcfea1718cc36ae16b491604786c26c6ed320f06
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/apollolake/Kconfig
M src/soc/intel/cannonlake/Kconfig
M src/soc/intel/common/block/systemagent/Kconfig
M src/soc/intel/denverton_ns/Kconfig
M src/soc/intel/skylake/Kconfig
5 files changed, 16 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/35884/1
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index a1d3c07..24a4b7a 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -128,6 +128,10 @@
TPM part is conntected on Fast SPI interface, but the LPC MMIO
TPM transactions are decoded and serialized over the SPI interface.
+config MMCONF_BASE_ADDRESS
+ hex
+ default 0xe0000000
+
config PCR_BASE_ADDRESS
hex
default 0xd0000000
diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig
index c1fda95..aeef75c 100644
--- a/src/soc/intel/cannonlake/Kconfig
+++ b/src/soc/intel/cannonlake/Kconfig
@@ -109,6 +109,10 @@
select FSP_T_XIP if FSP_CAR
select HECI_DISABLE_USING_SMM if !SOC_INTEL_COFFEELAKE && !SOC_INTEL_WHISKEYLAKE && !SOC_INTEL_COMETLAKE
+config MMCONF_BASE_ADDRESS
+ hex
+ default 0xe0000000
+
config DCACHE_RAM_BASE
default 0xfef00000
diff --git a/src/soc/intel/common/block/systemagent/Kconfig b/src/soc/intel/common/block/systemagent/Kconfig
index 1222573..d7619a0 100644
--- a/src/soc/intel/common/block/systemagent/Kconfig
+++ b/src/soc/intel/common/block/systemagent/Kconfig
@@ -3,10 +3,6 @@
help
Intel Processor common System Agent support
-config MMCONF_BASE_ADDRESS
- hex
- default 0xe0000000
-
config SA_PCIEX_LENGTH
hex
default 0x10000000 if (PCIEX_LENGTH_256MB)
diff --git a/src/soc/intel/denverton_ns/Kconfig b/src/soc/intel/denverton_ns/Kconfig
index 2aadcae..d12e4e3 100644
--- a/src/soc/intel/denverton_ns/Kconfig
+++ b/src/soc/intel/denverton_ns/Kconfig
@@ -91,6 +91,10 @@
int
default 16
+config MMCONF_BASE_ADDRESS
+ hex
+ default 0xe0000000
+
config PCR_BASE_ADDRESS
hex
default 0xfd000000
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index 901e5f9..a9b8aaa 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -120,6 +120,10 @@
hex
default 0x200000
+config MMCONF_BASE_ADDRESS
+ hex
+ default 0xe0000000
+
config DCACHE_RAM_BASE
hex
default 0xfef00000
--
To view, visit https://review.coreboot.org/c/coreboot/+/35884
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idcfea1718cc36ae16b491604786c26c6ed320f06
Gerrit-Change-Number: 35884
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/+/36696 )
Change subject: arch/x86/car.ld: Use REGION macro
......................................................................
arch/x86/car.ld: Use REGION macro
The advantages of using the REGION macro:
- less boilerplate for defining start and end symbols
- overlap between regions checking
- automatic alignment
Change-Id: I9c327343eb40d3e2cc8513354ec3a83d803ff1ee
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/arch/x86/car.ld
1 file changed, 4 insertions(+), 16 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/36696/1
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 74fc74b..c601d2e 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -18,9 +18,7 @@
#if CONFIG(PAGING_IN_CACHE_AS_RAM)
/* Page table pre-allocation. CONFIG_DCACHE_RAM_BASE should be 4KiB
* aligned when using this option. */
- _pagetables = . ;
- . += 4096 * CONFIG_NUM_CAR_PAGE_TABLE_PAGES;
- _epagetables = . ;
+ REGION(pagetables, ., 4096 * CONFIG_NUM_CAR_PAGE_TABLE_PAGES, 4096)
#endif
/* Vboot work buffer only needs to be available when verified boot
* starts in bootblock. */
@@ -37,9 +35,7 @@
* use CAR it can be reused. The chipset/SoC is expected to provide
* the stack size. */
#if CONFIG(C_ENVIRONMENT_BOOTBLOCK)
- _car_stack = .;
- . += CONFIG_DCACHE_BSP_STACK_SIZE;
- _ecar_stack = .;
+ REGION(car_stack, ., CONFIG_DCACHE_BSP_STACK_SIZE, 16)
#endif
/* 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
@@ -47,22 +43,17 @@
* link address of these shared objects. */
PRERAM_CBMEM_CONSOLE(., CONFIG_PRERAM_CBMEM_CONSOLE_SIZE)
#if CONFIG(PAGING_IN_CACHE_AS_RAM)
- . = ALIGN(32);
/* Page directory pointer table resides here. There are 4 8-byte entries
* totalling 32 bytes that need to be 32-byte aligned. The reason the
* pdpt are not colocated with the rest of the page tables is to reduce
* fragmentation of the CAR space that persists across stages. */
- _pdpt = .;
- . += 32;
- _epdpt = .;
+ REGION(pdpt, ., 32, 32)
#endif
TIMESTAMP(., 0x200)
- _car_ehci_dbg_info = .;
/* Reserve sizeof(struct ehci_dbg_info). */
- . += 80;
- _ecar_ehci_dbg_info = .;
+ REGION(car_ehci_dbg_info, ., 80, ARCH_POINTER_ALIGN_SIZE)
/* _bss and _ebss provide symbols to per-stage
* variables that are not shared like the timestamp and the pre-ram
@@ -114,9 +105,6 @@
}
_bogus = ASSERT((CONFIG_DCACHE_RAM_SIZE == 0) || (SIZEOF(.car.data) <= CONFIG_DCACHE_RAM_SIZE), "Cache as RAM area is too full");
-#if CONFIG(PAGING_IN_CACHE_AS_RAM)
-_bogus2 = ASSERT(_pagetables == ALIGN(_pagetables, 4096), "_pagetables aren't 4KiB aligned");
-#endif
#if CONFIG(C_ENVIRONMENT_BOOTBLOCK)
_bogus3 = ASSERT(CONFIG_DCACHE_BSP_STACK_SIZE > 0x0, "BSP stack size not configured");
#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/36696
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9c327343eb40d3e2cc8513354ec3a83d803ff1ee
Gerrit-Change-Number: 36696
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/+/37279 )
Change subject: src/soc/intel/fsp-car: Align stack before jumping to C code
......................................................................
src/soc/intel/fsp-car: Align stack before jumping to C code
GCC has had a 16 byte stack requirement since quite some time now...
Change-Id: I0f5b62b5fef3ca7ec6d9010723527a356eb566ed
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, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/37279/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 d7ef834..4174f36 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
@@ -99,6 +99,10 @@
xorl %eax, %eax
rep stosl
+ /* Need to align stack to 16 bytes at call instruction. Account for
+ the two pushes below. */
+ andl $0xfffffff0, %esp
+ sub $8, %esp
/* Restore the timestamp from bootblock_crt0.S (ebp:mm1) */
push %ebp
movd %mm1, %eax
--
To view, visit https://review.coreboot.org/c/coreboot/+/37279
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0f5b62b5fef3ca7ec6d9010723527a356eb566ed
Gerrit-Change-Number: 37279
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
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37277 )
Change subject: soc/intel/fsp-car: Clear the whole usable CAR region
......................................................................
soc/intel/fsp-car: Clear the whole usable CAR region
Other symbols in car.ld likely expect to be zero initialized.
Change-Id: I44a0d3947eb6dd67dfd2d7f03e5c0766b043f61b
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, 6 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/37277/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 091fc4a..ec43311 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
@@ -89,13 +89,14 @@
/* Setup bootblock stack */
mov %edx, %esp
- /* clear .bss section as it is not shared */
+ /* coreboot assumes CAR region will be zero */
cld
- xor %eax, %eax
- movl $(_ebss), %ecx
- movl $(_bss), %edi
- sub %edi, %ecx
+ movl %ecx, %edi
+ neg %ecx
+ /* Clear up to Temp Ram top. */
+ add %edx, %ecx
shrl $2, %ecx
+ xorl %eax, %eax
rep stosl
/* Restore the timestamp from bootblock_crt0.S (ebp:mm1) */
--
To view, visit https://review.coreboot.org/c/coreboot/+/37277
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I44a0d3947eb6dd67dfd2d7f03e5c0766b043f61b
Gerrit-Change-Number: 37277
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange