Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34360 )
Change subject: cpu/intel/speedstep: Add comment to clarify define
......................................................................
cpu/intel/speedstep: Add comment to clarify define
Add a comment to clarify that the define must match the define in
southbridge headers.
Change-Id: Ie0e97b170c81e3bca38975d6a3fe9a368c70e622
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/include/cpu/intel/speedstep.h
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/34360/1
diff --git a/src/include/cpu/intel/speedstep.h b/src/include/cpu/intel/speedstep.h
index 05d83ed..660e5ae 100644
--- a/src/include/cpu/intel/speedstep.h
+++ b/src/include/cpu/intel/speedstep.h
@@ -25,6 +25,7 @@
/* MWAIT coordination I/O base address. This must match
* the \_PR_.CP00 PM base address.
+ * PMB0_BASE - 0x10 should match PMBASE for legacy C-state emulation.
*/
#define PMB0_BASE 0x510
--
To view, visit https://review.coreboot.org/c/coreboot/+/34360
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie0e97b170c81e3bca38975d6a3fe9a368c70e622
Gerrit-Change-Number: 34360
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
Name of user not set #1002476 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35847 )
Change subject: coreinfo/coreinfo.c: Provide information of time format
......................................................................
coreinfo/coreinfo.c: Provide information of time format
Specify Coordinated Universal Time (UTC) time format while print date and time
in the coreinfo payload.
Change-Id: I359cef7697daf5d92d2c9fb58bf75c5b1345e982
Signed-off-by: Sourabh Kashyap <sourabhka(a)hcl.com>
---
M payloads/coreinfo/coreinfo.c
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/35847/1
diff --git a/payloads/coreinfo/coreinfo.c b/payloads/coreinfo/coreinfo.c
index 53985b2..ea4d424 100644
--- a/payloads/coreinfo/coreinfo.c
+++ b/payloads/coreinfo/coreinfo.c
@@ -124,8 +124,10 @@
rtc_read_clock(&tm);
- mvwprintw(menuwin, 1, 57, "%02d/%02d/%04d - %02d:%02d:%02d",
- tm.tm_mon + 1, tm.tm_mday, 1900 + tm.tm_year, tm.tm_hour,
+ mvwprintw(menuwin, 1, 53, "%02d/%02d/%04d", tm.tm_mon + 1,
+ tm.tm_mday, 1900 + tm.tm_year);
+ mvwprintw(menuwin, 1, 63, " - UTC ");
+ mvwprintw(menuwin, 1, 70, "%02d:%02d:%02d", tm.tm_hour,
tm.tm_min, tm.tm_sec);
}
#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/35847
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I359cef7697daf5d92d2c9fb58bf75c5b1345e982
Gerrit-Change-Number: 35847
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1002476
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36407 )
Change subject: soc/intel/(fsp_)baytrail: Initialize SPI before console init
......................................................................
soc/intel/(fsp_)baytrail: Initialize SPI before console init
This makes the spi flash console function during romstage. It was
tested with the FSP baytrail codepath but it's a safe assumption that
the same fix also applies for the google mrc.bin codepath.
Tested on Intel Minnowboard Turbot.
Change-Id: If6ef0eeea902ab76d398d0218ee943e482f69b43
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/baytrail/romstage/romstage.c
M src/soc/intel/fsp_baytrail/romstage/romstage.c
2 files changed, 5 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/36407/1
diff --git a/src/soc/intel/baytrail/romstage/romstage.c b/src/soc/intel/baytrail/romstage/romstage.c
index 7c129e2..e06c39e 100644
--- a/src/soc/intel/baytrail/romstage/romstage.c
+++ b/src/soc/intel/baytrail/romstage/romstage.c
@@ -165,10 +165,10 @@
if (CONFIG(ENABLE_BUILTIN_COM1))
byt_config_com1_and_enable();
- console_init();
-
spi_init();
+ console_init();
+
set_max_freq();
punit_init();
diff --git a/src/soc/intel/fsp_baytrail/romstage/romstage.c b/src/soc/intel/fsp_baytrail/romstage/romstage.c
index f347591..78aa9fc 100644
--- a/src/soc/intel/fsp_baytrail/romstage/romstage.c
+++ b/src/soc/intel/fsp_baytrail/romstage/romstage.c
@@ -171,9 +171,11 @@
byt_config_com1_and_enable();
post_code(0x43);
- console_init();
spi_init();
+
+ console_init();
+
baytrail_rtc_init();
/* Call into mainboard. */
--
To view, visit https://review.coreboot.org/c/coreboot/+/36407
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If6ef0eeea902ab76d398d0218ee943e482f69b43
Gerrit-Change-Number: 36407
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34992 )
Change subject: soc/intel/common: Make use of clflush in common platform_segment_loaded
......................................................................
soc/intel/common: Make use of clflush in common platform_segment_loaded
This patch clear cache lines based on platform_segment_loaded() supplied
start and size values before loading the targeted stage.
This changes is required to fix hang issues appeared due to marking DRAM
ranges as WB (CONFIG_MARK_DRAM_CACHE_WB) to speed up next stage loading/
decompression/execution time.
Idea is to run clflush on those ranges just before tearing down the CAR
(running invd instruction) and after that postcar frame will set up new MTRR
ranges.
Change-Id: I591f21cb4199477af271f0dd6c073e1c11831bfd
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
M src/soc/intel/common/block/cpu/Kconfig
M src/soc/intel/common/block/cpu/Makefile.inc
A src/soc/intel/common/block/cpu/car/car.c
3 files changed, 71 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/34992/1
diff --git a/src/soc/intel/common/block/cpu/Kconfig b/src/soc/intel/common/block/cpu/Kconfig
index 8cc572d..0d1506b 100644
--- a/src/soc/intel/common/block/cpu/Kconfig
+++ b/src/soc/intel/common/block/cpu/Kconfig
@@ -66,3 +66,15 @@
help
This option allows FSP to make use of MP services PPI published by
coreboot to perform multiprocessor initialization.
+
+config MARK_DRAM_CACHE_WB
+ bool
+ default n
+ help
+ This option allows you to select how DRAM intermediate cache is set up.
+ Till discovering DRAM ranges, system will make use of CAR and CAR tear
+ down will handle by postcar/ramstage, that means entire postcar/ramstage
+ stage will execute from UC range. Intention here is to optimize the boot
+ flow hence enabling the caching for applicable DRAM ranges before CAR
+ tear down and setting up new DRAM based MTRR range. MTRR type WB
+ provides best optimization.
diff --git a/src/soc/intel/common/block/cpu/Makefile.inc b/src/soc/intel/common/block/cpu/Makefile.inc
index a6c4f37..63a2ac9 100644
--- a/src/soc/intel/common/block/cpu/Makefile.inc
+++ b/src/soc/intel/common/block/cpu/Makefile.inc
@@ -5,6 +5,7 @@
romstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_CAR) += car/exit_car.S
romstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_CPU) += cpulib.c
+romstage-$(CONFIG_MARK_DRAM_CACHE_WB) += car.c
postcar-$(CONFIG_SOC_INTEL_COMMON_BLOCK_CAR) += car/exit_car.S
postcar-$(CONFIG_FSP_CAR) += car/exit_car_fsp.S
diff --git a/src/soc/intel/common/block/cpu/car/car.c b/src/soc/intel/common/block/cpu/car/car.c
new file mode 100644
index 0000000..82d8e9a
--- /dev/null
+++ b/src/soc/intel/common/block/cpu/car/car.c
@@ -0,0 +1,58 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corp.
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 <assert.h>
+#include <cbmem.h>
+#include <cpu/x86/cache.h>
+#include <program_loading.h>
+
+static inline int is_usable_dram_addr(uintptr_t addr)
+{
+ return (addr < (uintptr_t) cbmem_top());
+}
+
+/*
+ * CLFLUSH the impacted WB'ed cache lines before loading postcar/ramstage
+ * in order to avoid getting stuck while tearing down (invd) the CAR.
+ */
+static void flush_cache(uintptr_t start, size_t size)
+{
+ uintptr_t end;
+ uintptr_t addr;
+
+ end = start + (ALIGN_DOWN(size + 4096, 4096));
+ for (addr = start; addr < end; addr += 64)
+ clflush((void *)addr);
+}
+
+void platform_segment_loaded(uintptr_t start, size_t size, int flags)
+{
+ /* Bail out if this is not the final segment. */
+ if (!(flags & SEG_FINAL))
+ return;
+
+ char start_dram_check = is_usable_dram_addr(start);
+ char end_dram_check = is_usable_dram_addr(start + size - 1);
+
+ /*
+ * Bail out if loaded program segment does not lie in
+ * usable DRAM region.
+ */
+ if (!start_dram_check && !end_dram_check)
+ return;
+
+ flush_cache(start, size);
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/34992
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I591f21cb4199477af271f0dd6c073e1c11831bfd
Gerrit-Change-Number: 34992
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik(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-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-MessageType: newchange
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34751 )
Change subject: arch/x86: Move generic functions from postcar_loader.c to stage_loader.c
......................................................................
arch/x86: Move generic functions from postcar_loader.c to stage_loader.c
This patch moves few generic functions (finalize_load and stack_push)
from postcar_loader.c to stage_loader.c file so that other callers can
also use these functions.
Change-Id: I4d2200d95e68c0eb01681b8f9b71b3d30d122c43
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
M src/arch/x86/Makefile.inc
A src/arch/x86/include/arch/stage_loader.h
M src/arch/x86/postcar_loader.c
A src/arch/x86/stage_loader.c
4 files changed, 62 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/34751/1
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 32e0173..2fad75e 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -239,6 +239,7 @@
romstage-y += memset.c
romstage-$(CONFIG_X86_TOP4G_BOOTMEDIA_MAP) += mmap_boot.c
romstage-y += postcar_loader.c
+romstage-y += stage_loader.c
romstage-$(CONFIG_COLLECT_TIMESTAMPS_TSC) += timestamp.c
romstage-$(CONFIG_ARCH_ROMSTAGE_X86_32) += walkcbfs.S
diff --git a/src/arch/x86/include/arch/stage_loader.h b/src/arch/x86/include/arch/stage_loader.h
new file mode 100644
index 0000000..23ac6e9
--- /dev/null
+++ b/src/arch/x86/include/arch/stage_loader.h
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corp.
+ *
+ * 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.
+ */
+
+#ifndef STAGE_LOADER_H
+#define STAGE_LOADER_H
+
+#include <arch/cpu.h>
+
+static inline void stack_push(struct postcar_frame *pcf, uint32_t val)
+{
+ uint32_t *ptr;
+
+ pcf->stack -= sizeof(val);
+ ptr = (void *)pcf->stack;
+ *ptr = val;
+}
+
+void finalize_load(uintptr_t *stack_top_ptr, uintptr_t stack_top);
+
+#endif /* STAGE_LOADER_H */
diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c
index 35e139f..3f42298 100644
--- a/src/arch/x86/postcar_loader.c
+++ b/src/arch/x86/postcar_loader.c
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*/
-#include <arch/cpu.h>
+#include <arch/stage_loader.h>
#include <cbmem.h>
#include <console/console.h>
#include <cpu/cpu.h>
@@ -25,15 +25,6 @@
#include <stage_cache.h>
#include <timestamp.h>
-static inline void stack_push(struct postcar_frame *pcf, uint32_t val)
-{
- uint32_t *ptr;
-
- pcf->stack -= sizeof(val);
- ptr = (void *)pcf->stack;
- *ptr = val;
-}
-
static void postcar_frame_prepare(struct postcar_frame *pcf)
{
msr_t msr;
@@ -131,17 +122,6 @@
return (void *) pcf->stack;
}
-static void finalize_load(uintptr_t *stack_top_ptr, uintptr_t stack_top)
-{
- *stack_top_ptr = stack_top;
- /*
- * Signal to rest of system that another update was made to the
- * postcar program prior to running it.
- */
- prog_segment_loaded((uintptr_t)stack_top_ptr, sizeof(uintptr_t),
- SEG_FINAL);
-}
-
static void load_postcar_cbfs(struct prog *prog, struct postcar_frame *pcf)
{
struct rmod_stage_load rsl = {
diff --git a/src/arch/x86/stage_loader.c b/src/arch/x86/stage_loader.c
new file mode 100644
index 0000000..ca6a987
--- /dev/null
+++ b/src/arch/x86/stage_loader.c
@@ -0,0 +1,28 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corp.
+ *
+ * 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 <arch/stage_loader.h>
+#include <stage_cache.h>
+
+void finalize_load(uintptr_t *stack_top_ptr, uintptr_t stack_top)
+{
+ *stack_top_ptr = stack_top;
+ /*
+ * Signal to rest of system that another update was made to the
+ * postcar program prior to running it.
+ */
+ prog_segment_loaded((uintptr_t)stack_top_ptr, sizeof(uintptr_t),
+ SEG_FINAL);
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/34751
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4d2200d95e68c0eb01681b8f9b71b3d30d122c43
Gerrit-Change-Number: 34751
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-MessageType: newchange