Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32969
Change subject: soc/intel/baytrail: Use cpu/intel/car/romstage.c entry point
......................................................................
soc/intel/baytrail: Use cpu/intel/car/romstage.c entry point
This moves some boilerplate like setting up timestamps and entering
postcar to a common location.
Change-Id: I256b4149163245697fe1c2d4406bd6229a45b556
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/baytrail/romstage/Makefile.inc
M src/soc/intel/baytrail/romstage/romstage.c
2 files changed, 4 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/32969/1
diff --git a/src/soc/intel/baytrail/romstage/Makefile.inc b/src/soc/intel/baytrail/romstage/Makefile.inc
index f1a3463..8f009bd 100644
--- a/src/soc/intel/baytrail/romstage/Makefile.inc
+++ b/src/soc/intel/baytrail/romstage/Makefile.inc
@@ -1,5 +1,6 @@
cpu_incs-y += $(src)/cpu/intel/car/non-evict/cache_as_ram.S
cpu_incs-y += $(obj)/fmap_config.h
+romstage-y += ../../../../cpu/intel/car/romstage.c
romstage-y += romstage.c
romstage-y += raminit.c
romstage-$(CONFIG_ENABLE_BUILTIN_COM1) += uart.c
diff --git a/src/soc/intel/baytrail/romstage/romstage.c b/src/soc/intel/baytrail/romstage/romstage.c
index cc3bcd9..2a530b4 100644
--- a/src/soc/intel/baytrail/romstage/romstage.c
+++ b/src/soc/intel/baytrail/romstage/romstage.c
@@ -21,6 +21,7 @@
#include <bootblock_common.h>
#include <console/console.h>
#include <cbmem.h>
+#include <cpu/intel/romstage.h>
#include <cpu/x86/mtrr.h>
#if CONFIG(EC_GOOGLE_CHROMEEC)
#include <ec/google/chromeec/ec.h>
@@ -49,8 +50,6 @@
* Because we can't use global variables the stack is used for allocations --
* thus the need to call back and forth. */
-static void platform_enter_postcar(void);
-
static void program_base_addresses(void)
{
uint32_t reg;
@@ -166,18 +165,12 @@
}
/* Entry from cache-as-ram.inc. */
-static void romstage_main(uint64_t tsc, uint32_t bist)
+void mainboard_romstage_entry(unsigned long bist)
{
struct mrc_params mrc_params;
struct chipset_power_state *ps;
int prev_sleep_state;
- /* Save initial timestamp from bootblock. */
- timestamp_init(tsc);
-
- /* Save romstage begin */
- timestamp_add_now(TS_START_ROMSTAGE);
-
program_base_addresses();
tco_disable();
@@ -215,25 +208,13 @@
timestamp_add_now(TS_AFTER_INITRAM);
romstage_handoff_init(prev_sleep_state == ACPI_S3);
-
- platform_enter_postcar();
-
- /* We don't return here */
-}
-
-/* This wrapper enables easy transition towards C_ENVIRONMENT_BOOTBLOCK,
- * keeping changes in cache_as_ram.S easy to manage.
- */
-asmlinkage void bootblock_c_entry_bist(uint64_t base_timestamp, uint32_t bist)
-{
- romstage_main(base_timestamp, bist);
}
#define ROMSTAGE_RAM_STACK_SIZE 0x5000
/* setup_stack_and_mtrrs() determines the stack to use after
* cache-as-ram is torn down as well as the MTRR settings to use. */
-static void platform_enter_postcar(void)
+void platform_enter_postcar(void)
{
struct postcar_frame pcf;
uintptr_t top_of_ram;
--
To view, visit https://review.coreboot.org/c/coreboot/+/32969
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I256b4149163245697fe1c2d4406bd6229a45b556
Gerrit-Change-Number: 32969
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
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-MessageType: newchange
Hello Alexander Couzens, Patrick Rudolph, Duncan Laurie, Paul Menzel, Stefan Reinauer, build bot (Jenkins), Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/22932
to look at the new patch set (#16).
Change subject: mb/lenovo/x200: Use lower C-states on battery
......................................................................
mb/lenovo/x200: Use lower C-states on battery
This adds an array with C6 as lowest CPU cstate on battery for
thinkpad x200. This is changed when the PNOT method is called which
notifies the CPU to update C- and P-states.
This adds a weak function get_bat_cst_entries which is analogous to
get_cst_entries and expects an implementation in a mainboard specific
code.
For other boards the same C-states are on battery as on AC.
Without thorough testing this seems to shave off something between
~0.5W and ~1W while idle compared to having C3/C4 as the lowest
C-state.
Change-Id: Idf32ee2ac3272fee74ce3b92b2c537cb722991d7
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/arch/x86/include/arch/acpigen.h
M src/cpu/intel/speedstep/acpi.c
M src/mainboard/lenovo/x200/cstates.c
3 files changed, 61 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/22932/16
--
To view, visit https://review.coreboot.org/c/coreboot/+/22932
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idf32ee2ac3272fee74ce3b92b2c537cb722991d7
Gerrit-Change-Number: 22932
Gerrit-PatchSet: 16
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)gmail.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/22932 )
Change subject: mb/lenovo/x200: Use lower C-states on battery
......................................................................
Patch Set 15:
(2 comments)
It would be better if this information was passed via devicetree and then checked if both CPU and SB support the C-state. For now this may be good enough?
https://review.coreboot.org/c/coreboot/+/22932/15/src/cpu/intel/speedstep/a…
File src/cpu/intel/speedstep/acpi.c:
https://review.coreboot.org/c/coreboot/+/22932/15/src/cpu/intel/speedstep/a…
PS15, Line 159: acpigen_emit_namestring("PWRS")
> Does PWRS exist on all callers?
PWRS is in the GNVS of i82810{g,i,j}x which are all the platforms using this code.
https://review.coreboot.org/c/coreboot/+/22932/15/src/cpu/intel/speedstep/a…
PS15, Line 163: num_bat_cstates
> Always true?
Can be 0, just like num_cstates can be 0.
--
To view, visit https://review.coreboot.org/c/coreboot/+/22932
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idf32ee2ac3272fee74ce3b92b2c537cb722991d7
Gerrit-Change-Number: 22932
Gerrit-PatchSet: 15
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)gmail.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 13 Oct 2019 18:29:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: comment
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/22932 )
Change subject: mb/lenovo/x200: Use lower C-states on battery
......................................................................
Patch Set 15:
(2 comments)
https://review.coreboot.org/c/coreboot/+/22932/15/src/cpu/intel/speedstep/a…
File src/cpu/intel/speedstep/acpi.c:
https://review.coreboot.org/c/coreboot/+/22932/15/src/cpu/intel/speedstep/a…
PS15, Line 159: acpigen_emit_namestring("PWRS")
Does PWRS exist on all callers?
https://review.coreboot.org/c/coreboot/+/22932/15/src/cpu/intel/speedstep/a…
PS15, Line 163: num_bat_cstates
Always true?
--
To view, visit https://review.coreboot.org/c/coreboot/+/22932
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idf32ee2ac3272fee74ce3b92b2c537cb722991d7
Gerrit-Change-Number: 22932
Gerrit-PatchSet: 15
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)gmail.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 13 Oct 2019 18:20:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Arthur Heymans has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/31309 )
Change subject: soc/intel/skylake: clean up unused header
......................................................................
Abandoned
--
To view, visit https://review.coreboot.org/c/coreboot/+/31309
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifde73533085bf602ffc4595d4292c54fe5e823e7
Gerrit-Change-Number: 31309
Gerrit-PatchSet: 2
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: abandon