Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36623 )
Change subject: arch/x86/car.ld: Check for out of bound on no-XIP stages
......................................................................
arch/x86/car.ld: Check for out of bound on no-XIP stages
Check that stages running in CAR have their start and end in CAR.
Change-Id: I292aacce564c23d9ae21aa46c5e2f8784fa6a609
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/arch/x86/car.ld
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/36623/1
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 6ccbd8c..e68beb3 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -119,4 +119,9 @@
#endif
#if CONFIG(C_ENVIRONMENT_BOOTBLOCK)
_bogus3 = ASSERT(CONFIG_DCACHE_BSP_STACK_SIZE > 0x0, "BSP stack size not configured");
+#if CONFIG(NO_XIP_EARLY_STAGES) && (ENV_ROMSTAGE || ENV_VERSTAGE)
+_bogus4 = ASSERT(_eprogram <= _car_region_end, "Stage end too high !");
+_bogus5 = ASSERT(_program >= _car_unallocated_start, "Stage start too low!");
+#endif
+
#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/36623
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I292aacce564c23d9ae21aa46c5e2f8784fa6a609
Gerrit-Change-Number: 36623
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36612 )
Change subject: arch/x86: Link NO_XIP_EARLY_STAGES like other stages
......................................................................
arch/x86: Link NO_XIP_EARLY_STAGES like other stages
If stages are not run XIP they can be linked like other stages, which
includes a (*.data) section.
Change-Id: Ib165058abfb07e385461cdcca4aef31928ec7572
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/arch/x86/assembly_entry.S
M src/arch/x86/car.ld
M src/include/rules.h
M src/lib/program.ld
4 files changed, 7 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/36612/1
diff --git a/src/arch/x86/assembly_entry.S b/src/arch/x86/assembly_entry.S
index c36dc1c..a838b6d 100644
--- a/src/arch/x86/assembly_entry.S
+++ b/src/arch/x86/assembly_entry.S
@@ -32,7 +32,8 @@
/* reset stack pointer to CAR stack */
mov $_car_stack_end, %esp
- /* clear .bss section as it is not shared */
+ /* clear .bss section as it is not shared if stages are run XIP*/
+#if !ENV_STAGE_HAS_DATA_SECTION
cld
xor %eax, %eax
movl $(_ebss), %ecx
@@ -40,6 +41,7 @@
sub %edi, %ecx
shrl $2, %ecx
rep stosl
+#endif
#if ((ENV_VERSTAGE && CONFIG(VERSTAGE_DEBUG_SPINLOOP)) \
|| (ENV_ROMSTAGE && CONFIG(ROMSTAGE_DEBUG_SPINLOOP)))
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 6ccbd8c..a68b635 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -69,6 +69,7 @@
* cbmem console. This is useful for clearing this area on a per-stage
* basis when more than one stage uses cache-as-ram for CAR_GLOBALs. */
+#if !ENV_STAGE_HAS_DATA_SECTION
. = ALIGN(ARCH_POINTER_ALIGN_SIZE);
_bss = .;
#if ENV_STAGE_HAS_BSS_SECTION
@@ -84,6 +85,7 @@
#endif
. = ALIGN(ARCH_POINTER_ALIGN_SIZE);
_ebss = .;
+#endif
_car_unallocated_start = .;
#if !CONFIG(C_ENVIRONMENT_BOOTBLOCK)
diff --git a/src/include/rules.h b/src/include/rules.h
index 0436198..fe162f8 100644
--- a/src/include/rules.h
+++ b/src/include/rules.h
@@ -274,7 +274,7 @@
/* Indicates memory layout is determined with arch/x86/car.ld. */
#define ENV_CACHE_AS_RAM (ENV_ROMSTAGE_OR_BEFORE && !CONFIG(RESET_VECTOR_IN_RAM))
/* No .data sections with execute-in-place from ROM. */
-#define ENV_STAGE_HAS_DATA_SECTION !ENV_CACHE_AS_RAM
+#define ENV_STAGE_HAS_DATA_SECTION (!ENV_CACHE_AS_RAM || CONFIG(NO_XIP_EARLY_STAGES))
/* No .bss sections for stage with CAR teardown. */
#define ENV_STAGE_HAS_BSS_SECTION !(ENV_ROMSTAGE && CONFIG(CAR_GLOBAL_MIGRATION))
#else
diff --git a/src/lib/program.ld b/src/lib/program.ld
index a9d4e48..d323ac1 100644
--- a/src/lib/program.ld
+++ b/src/lib/program.ld
@@ -125,7 +125,7 @@
}
#endif
-#if ENV_STAGE_HAS_BSS_SECTION && !ENV_CACHE_AS_RAM
+#if ENV_STAGE_HAS_BSS_SECTION && ENV_STAGE_HAS_DATA_SECTION
.bss . : {
. = ALIGN(ARCH_POINTER_ALIGN_SIZE);
_bss = .;
--
To view, visit https://review.coreboot.org/c/coreboot/+/36612
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib165058abfb07e385461cdcca4aef31928ec7572
Gerrit-Change-Number: 36612
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Hello Patrick Georgi,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/45214
to review the following change.
Change subject: trogdor/sc7180: Clarify USE_QC_BLOBS requirements
......................................................................
trogdor/sc7180: Clarify USE_QC_BLOBS requirements
This patch adds some Kconfig hints to make it clearer that the
USE_QC_BLOBS option is required for SC7180 boards and guide the user in
the right direction through menuconfig. Also add those little arrows to
the Trogdor board options that are there on most other boards.
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: I973cae8026a229408a1a1817c4808b0266387ea7
---
M src/mainboard/google/trogdor/Kconfig.name
M src/soc/qualcomm/sc7180/Kconfig
2 files changed, 12 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/45214/1
diff --git a/src/mainboard/google/trogdor/Kconfig.name b/src/mainboard/google/trogdor/Kconfig.name
index b7c03f9..4c1d351 100644
--- a/src/mainboard/google/trogdor/Kconfig.name
+++ b/src/mainboard/google/trogdor/Kconfig.name
@@ -1,17 +1,24 @@
comment "Trogdor"
+if USE_QC_BLOBS
+
config BOARD_GOOGLE_BUBS
- bool "Bubs"
+ bool "-> Bubs"
select BOARD_GOOGLE_TROGDOR_COMMON
config BOARD_GOOGLE_LAZOR
- bool "Lazor"
+ bool "-> Lazor"
select BOARD_GOOGLE_TROGDOR_COMMON
config BOARD_GOOGLE_POMPOM
- bool "Pompom"
+ bool "-> Pompom"
select BOARD_GOOGLE_TROGDOR_COMMON
config BOARD_GOOGLE_TROGDOR
- bool "Trogdor"
+ bool "-> Trogdor"
select BOARD_GOOGLE_TROGDOR_COMMON
+
+endif
+
+comment "(Trogdor requires 'Allow QC blobs repository')"
+ depends on !USE_QC_BLOBS
diff --git a/src/soc/qualcomm/sc7180/Kconfig b/src/soc/qualcomm/sc7180/Kconfig
index db7350f..488fec6 100644
--- a/src/soc/qualcomm/sc7180/Kconfig
+++ b/src/soc/qualcomm/sc7180/Kconfig
@@ -2,6 +2,7 @@
config SOC_QUALCOMM_SC7180
bool
default n
+ depends on USE_QC_BLOBS
select ARCH_BOOTBLOCK_ARMV8_64
select ARCH_RAMSTAGE_ARMV8_64
select ARCH_ROMSTAGE_ARMV8_64
--
To view, visit https://review.coreboot.org/c/coreboot/+/45214
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I973cae8026a229408a1a1817c4808b0266387ea7
Gerrit-Change-Number: 45214
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange