Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35266 )
Change subject: drivers/intel/fsp2_0: Use generic defines for early storage
......................................................................
drivers/intel/fsp2_0: Use generic defines for early storage
Add the ability to run memory_init.c in an enviornment where there
exists no CAR storage. CONFIG(RESET_VECTOR_IN_RAM) uses DRAM as
early storage and created using a .ld file without _car symbols.
Substitute _car* with #defines and account for symbols generated
when RESET_VECTOR_IN_RAM is active.
Change-Id: Ie9d102c3c1110bbb54ce788ec432da1a27e2f61f
Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
---
M src/drivers/intel/fsp2_0/memory_init.c
1 file changed, 22 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/35266/1
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 56771e2..b209786 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -34,6 +34,20 @@
#include <fsp/memory_init.h>
#include <types.h>
+#if CONFIG(RESET_VECTOR_IN_RAM)
+ #define EARLY_STORAGE_START _earlyram_region_start
+ #define EARLY_STORAGE_USED (_earlyram_unallocated_start - _earlyram_region_start)
+ #define END_OF_ALLOCATED _earlyram_region_end
+ #define BSP_STACK_BASE _earlyram_stack_start
+ #define BSP_STACK_SIZE CONFIG_EARLYRAM_BSP_STACK_SIZE
+#else
+ #define EARLY_STORAGE_START _car_region_start
+ #define EARLY_STORAGE_USED (_car_unallocated_start - _car_region_start)
+ #define END_OF_ALLOCATED _car_region_end
+ #define BSP_STACK_BASE _car_stack_start
+ #define BSP_STACK_SIZE CONFIG_DCACHE_BSP_STACK_SIZE
+#endif
+
/* TPM MRC hash functionality depends on vboot starting before memory init. */
_Static_assert(!CONFIG(FSP2_0_USES_TPM_MRC_HASH) ||
CONFIG(VBOOT_STARTS_IN_BOOTBLOCK),
@@ -174,17 +188,18 @@
* top and does not reinitialize stack pointer.
*/
if (CONFIG(FSP_USES_CB_STACK)) {
- arch_upd->StackBase = (void *)_car_stack_start;
- arch_upd->StackSize = CONFIG_DCACHE_BSP_STACK_SIZE;
+ arch_upd->StackBase = (void *)BSP_STACK_BASE;
+ arch_upd->StackSize = BSP_STACK_SIZE;
return CB_SUCCESS;
}
/*
* FSPM_UPD passed here is populated with default values
- * provided by the blob itself. We let FSPM use top of CAR
- * region of the size it requests.
+ * provided by the blob itself. We let FSPM use unallocated
+ * space at the top of CAR or EARLYRAM region for the size
+ * it requests.
*/
- stack_end = (uintptr_t)_car_region_end;
+ stack_end = (uintptr_t)END_OF_ALLOCATED;
stack_begin = stack_end - arch_upd->StackSize;
if (check_region_overlap(memmap, "FSPM stack", stack_begin,
stack_end) != CB_SUCCESS)
@@ -404,8 +419,8 @@
/* Build up memory map of romstage address space including CAR. */
memranges_init_empty(&memmap, &freeranges[0], ARRAY_SIZE(freeranges));
- memranges_insert(&memmap, (uintptr_t)_car_region_start,
- _car_unallocated_start - _car_region_start, 0);
+ memranges_insert(&memmap, (uintptr_t)EARLY_STORAGE_START,
+ EARLY_STORAGE_USED, 0);
memranges_insert(&memmap, (uintptr_t)_program, REGION_SIZE(program), 0);
if (!CONFIG(FSP_M_XIP))
--
To view, visit https://review.coreboot.org/c/coreboot/+/35266
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie9d102c3c1110bbb54ce788ec432da1a27e2f61f
Gerrit-Change-Number: 35266
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
Hello Martin Roth, Furquan Shaikh,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/34426
to review the following change.
Change subject: NOT_FOR_MERGE: soc/amd/picasso: Disable BERT table generation
......................................................................
NOT_FOR_MERGE: soc/amd/picasso: Disable BERT table generation
For the moment, the reserved memory for BERT goofs our presumed
memory map.
Change-Id: I789ece3c324b88652dc60776afe5a7b9edf08b2a
Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
---
M src/soc/amd/picasso/Kconfig
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/34426/1
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig
index 3c27f15..fd1b221 100644
--- a/src/soc/amd/picasso/Kconfig
+++ b/src/soc/amd/picasso/Kconfig
@@ -232,7 +232,6 @@
config ACPI_BERT
bool "Build ACPI BERT Table"
- default y
depends on HAVE_ACPI_TABLES
help
Report Machine Check errors identified in POST to the OS in an
--
To view, visit https://review.coreboot.org/c/coreboot/+/34426
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I789ece3c324b88652dc60776afe5a7b9edf08b2a
Gerrit-Change-Number: 34426
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange
huayang duan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35481 )
Change subject: mediatek/mt8183: Clean the calibration result if calibration or mem test fail
......................................................................
mediatek/mt8183: Clean the calibration result if calibration or mem test fail
If DRAM calibration fail or mem test fail by using the params store at flash,
should clean the calibration result which store at flash and
triggle system reset to regenerate new params.
BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui.
Change-Id: I8e1d4f5bc7b45f45a8bfef74e86ec0ff6a556af4
---
M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
M src/soc/mediatek/mt8183/memory.c
2 files changed, 15 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/35481/1
diff --git a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
old mode 100644
new mode 100755
index 2bd185c..4769620
--- a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
+++ b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
@@ -17,6 +17,7 @@
#include <console/console.h>
#include <delay.h>
#include <device/mmio.h>
+#include <reset.h>
#include <soc/emi.h>
#include <soc/dramc_register.h>
#include <soc/dramc_pi_api.h>
@@ -1964,7 +1965,12 @@
dramc_engine2_end(chn);
write32(&ch[chn].ao.dummy_rd, dummy_rd_backup);
- assert(sum != 0);
+ if (sum == 0) {
+ clean_calibration_data();
+ dramc_show("system will be reboot in 5 secoeds.\n");
+ delay(5);
+ do_board_reset();
+ }
if (sum <= 3)
best_step = first + (sum >> 1);
diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c
index 67f6c65..6a37c4e 100644
--- a/src/soc/mediatek/mt8183/memory.c
+++ b/src/soc/mediatek/mt8183/memory.c
@@ -15,6 +15,8 @@
#include <assert.h>
#include <console/console.h>
+#include <delay.h>
+#include <reset.h>
#include <soc/dramc_pi_api.h>
#include <soc/emi.h>
#include <symbols.h>
@@ -43,7 +45,12 @@
printk(BIOS_DEBUG, "[MEM] complex R/W mem test %s : %d\n",
(i == 0) ? "pass" : "fail", i);
- ASSERT(i == 0);
+ if (i != 0) {
+ clean_calibration_data();
+ dramc_show("system will be reboot in 5 secoeds.\n");
+ delay(5);
+ do_board_reset();
+ }
addr += rank_size[r];
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/35481
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8e1d4f5bc7b45f45a8bfef74e86ec0ff6a556af4
Gerrit-Change-Number: 35481
Gerrit-PatchSet: 1
Gerrit-Owner: huayang duan <huayangduan(a)gmail.com>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33549
Change subject: [RFC]sb/intel/bd82x6x/lpc: Setup default LPC decode ranges
......................................................................
[RFC]sb/intel/bd82x6x/lpc: Setup default LPC decode ranges
Most mainboards do nothing but setting up a similar decode range so
move it to a common place. All IO ports below 0x1000 are allocated to
the LPC device by default so this should not be an issue.
Lynxpoint does this too.
TODO remove most mainboard specific setups.
Change-Id: Ifeb5a862e56f415aa847d0118a33a31537ab8037
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/southbridge/intel/bd82x6x/early_pch.c
1 file changed, 12 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/33549/1
diff --git a/src/southbridge/intel/bd82x6x/early_pch.c b/src/southbridge/intel/bd82x6x/early_pch.c
index 0082c91..ef3ee77 100644
--- a/src/southbridge/intel/bd82x6x/early_pch.c
+++ b/src/southbridge/intel/bd82x6x/early_pch.c
@@ -258,8 +258,16 @@
write_pmbase16(TCO1_CNT, 1 << 11); /* halt timer */
}
-static void pch_enable_lpc_gen_decode(void)
+static void pch_enable_lpc_decode(void)
{
+ /* Set COM1/COM2 decode range */
+ pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
+
+ /* Enable SuperIO + MC + COM1 + PS/2 Keyboard/Mouse */
+ u16 lpc_config = CNF1_LPC_EN | CNF2_LPC_EN | COMA_LPC_EN
+ | KBC_LPC_EN | MC_LPC_EN;
+ pci_write_config16(PCH_LPC_DEV, LPC_EN, lpc_config);
+
const struct device *dev = pcidev_on_root(0x1f, 0);
const struct southbridge_intel_bd82x6x_config *config = NULL;
@@ -279,9 +287,10 @@
void early_pch_init(void)
{
- pch_enable_lpc();
- pch_enable_lpc_gen_decode();
+ pch_enable_lpc_decode();
+
+ pch_enable_lpc();
pch_enable_bars();
--
To view, visit https://review.coreboot.org/c/coreboot/+/33549
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifeb5a862e56f415aa847d0118a33a31537ab8037
Gerrit-Change-Number: 33549
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange