Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4286
-gerrit
commit 2d6797b8222938f2c28e60b9d930d78bd458c431
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Tue Nov 26 17:49:29 2013 +0100
amd/car/post_cache_as_ram: Switch stack in assembly rather than in C
Compiler may do loads of optimisations around stack switch and so it's allowed
to break stack switch as it sees fit. Do it in assembly instead.
Not tested.
Change-Id: I277a62a9052e8fe9b04e7c65d149e087282ac2a2
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/cpu/amd/car/cache_as_ram.inc | 12 ++++++++++++
src/cpu/amd/car/post_cache_as_ram.c | 25 ++++++++++---------------
2 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/src/cpu/amd/car/cache_as_ram.inc b/src/cpu/amd/car/cache_as_ram.inc
index 7070cf9..8f0abce 100644
--- a/src/cpu/amd/car/cache_as_ram.inc
+++ b/src/cpu/amd/car/cache_as_ram.inc
@@ -414,10 +414,22 @@ CAR_FAM10_ap_out:
pushl %ebx /* Init detected. */
pushl %eax /* BIST */
call cache_as_ram_main
+
/* We will not go back. */
post_code(0xaf) /* Should never see this POST code. */
+ .globl cache_as_ram_switch_stack
+
+cache_as_ram_switch_stack:
+ /* Return address. */
+ popl %eax
+ /* Resume memory. */
+ popl %eax
+ subl $(( (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE)- (CONFIG_RAMTOP) )), %esp
+ pushl %eax
+ call cache_as_ram_new_stack
+
all_mtrr_msrs:
/* fixed MTRR MSRs */
.long MTRRfix64K_00000_MSR
diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c
index eca7673..3fe496e 100644
--- a/src/cpu/amd/car/post_cache_as_ram.c
+++ b/src/cpu/amd/car/post_cache_as_ram.c
@@ -75,11 +75,11 @@ static void vErrata343(void)
#endif
}
+void cache_as_ram_switch_stack(void *resume_backup_memory);
+
static void post_cache_as_ram(void)
{
-#if CONFIG_HAVE_ACPI_RESUME
- void *resume_backup_memory;
-#endif
+ void *resume_backup_memory = NULL;
#if 1
{
/* Check value of esp to verify if we have enough room for stack in Cache as RAM */
@@ -92,9 +92,6 @@ static void post_cache_as_ram(void)
}
#endif
- unsigned testx = 0x5a5a5a5a;
- print_debug_pcar("testx = ", testx);
-
/* copy data from cache as ram to
ram need to set CONFIG_RAMTOP to 2M and use var mtrr instead.
*/
@@ -112,21 +109,19 @@ static void post_cache_as_ram(void)
vErrata343();
memcopy((void *)((CONFIG_RAMTOP)-CONFIG_DCACHE_RAM_SIZE), (void *)CONFIG_DCACHE_RAM_BASE, CONFIG_DCACHE_RAM_SIZE); //inline
+ cache_as_ram_switch_stack(resume_backup_memory);
+}
- __asm__ volatile (
- /* set new esp */ /* before CONFIG_RAMBASE */
- "subl %0, %%esp\n\t"
- ::"a"( (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE)- (CONFIG_RAMTOP) )
- /* discard all registers (eax is used for %0), so gcc redoes everything
- after the stack is moved */
- : "cc", "memory", "%ebx", "%ecx", "%edx", "%esi", "%edi", "%ebp"
- );
+void
+cache_as_ram_new_stack (void *resume_backup_memory);
+void
+cache_as_ram_new_stack (void *resume_backup_memory __attribute__ ((unused)))
+{
/* We can put data to stack again */
/* only global variable sysinfo in cache need to be offset */
print_debug("Done\n");
- print_debug_pcar("testx = ", testx);
print_debug("Disabling cache as ram now \n");
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4218
-gerrit
commit 443b971cf6cb523a37f2e360ff2bf7727d7eaa92
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Jun 4 08:57:54 2013 -0500
vboot: use out_flags to indicate dev mode
In order to make the proper decision on loading the
option rom or not the developer mode setting needs to be
known. Under early firmware selection it is possible to know
the state of developer mode by a flag in out flags. Use this
flag when early firmware selection is being employed to determine
if developer mode is enabled or not.
Change-Id: I9c226d368e92ddf8f14ce4dcde00da144de2a5f3
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/57380
Reviewed-by: Duncan Laurie <dlaurie(a)chromium.org>
---
src/vendorcode/google/chromeos/chromeos.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/vendorcode/google/chromeos/chromeos.c b/src/vendorcode/google/chromeos/chromeos.c
index 6f1fe72..c2cc0e1 100644
--- a/src/vendorcode/google/chromeos/chromeos.c
+++ b/src/vendorcode/google/chromeos/chromeos.c
@@ -26,9 +26,28 @@
#include <cbmem.h>
#include <console/console.h>
+#if CONFIG_VBOOT_VERIFY_FIRMWARE
+static int vboot_enable_developer(void)
+{
+ struct vboot_handoff *vbho;
+
+ vbho = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
+
+ if (vbho == NULL) {
+ printk(BIOS_ERR, "%s: Couldn't find vboot_handoff structure!\n",
+ __func__);
+ return 0;
+ }
+
+ return !!(vbho->init_params.out_flags & VB_INIT_OUT_ENABLE_DEVELOPER);
+}
+#else
+static inline int vboot_enable_developer(void) { return 0; }
+#endif
+
int developer_mode_enabled(void)
{
- return get_developer_mode_switch();
+ return get_developer_mode_switch() || vboot_enable_developer();
}
int recovery_mode_enabled(void)
the following patch was just integrated into master:
commit 5679e5a4b6ddf32a3a5291913a353037938473ae
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Mon Oct 21 20:23:35 2013 +0200
google/parrot/smihandler.c: Use `battery_critical_logged` only with `ELOG_GSMI`
Make the declaration and use of it conditional on the ELOG_GSMI Kconfig variable.
Change-Id: I2ef291d2f3e7d35545014e03ba8e0045da6050e5
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/3987
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3987 for details.
-gerrit
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4212
-gerrit
commit 4948ea8d0afcf3b2da17755eb3389fc6f6315474
Author: Shawn Nematbakhsh <shawnn(a)chromium.org>
Date: Fri May 31 18:57:20 2013 -0700
peppy: Re-enable EC software sync
The EC was disabling flash commands and sysjump was not working
properly. With those two fixed software sync works properly.
(Taken from I63ca00d6c94854f2b395eb736ce20792da5f8de2).
Change-Id: I9c7d1d1f1aaf7de33d0cec5f6daf648576ba8900
Reviewed-on: https://gerrit.chromium.org/gerrit/57289
Reviewed-by: Dave Parker <dparker(a)chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn(a)chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn(a)chromium.org>
---
src/mainboard/google/peppy/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mainboard/google/peppy/Kconfig b/src/mainboard/google/peppy/Kconfig
index b7745e1..5eb8b95 100644
--- a/src/mainboard/google/peppy/Kconfig
+++ b/src/mainboard/google/peppy/Kconfig
@@ -9,6 +9,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select INTEL_LYNXPOINT_LP
select BOARD_ROMSIZE_KB_8192
select EC_GOOGLE_CHROMEEC
+ select EC_SOFTWARE_SYNC
select HAVE_ACPI_TABLES
select HAVE_OPTION_TABLE
select HAVE_ACPI_RESUME
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4210
-gerrit
commit 4b34db99e81a8c2ee9826b854fde848d2ba7442b
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Wed May 29 07:49:55 2013 -0700
lynxpoint: Do not clear ACPI NVS region on resume
There are useful values in NVS that are set at boot
and runtime and they should not be cleared on resume.
suspend/resume twice on slippy and ensure
that the USB ports are still powered on the second suspend.
Change-Id: I4bce60b02b6637f6683120ae9c4a5c64563aacf7
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56941
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/southbridge/intel/lynxpoint/lpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index ff50476..cc95454 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -701,7 +701,7 @@ static void pch_lpc_read_resources(device_t dev)
/* Allocate ACPI NVS in CBMEM */
gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(global_nvs_t));
- if (gnvs)
+ if (acpi_slp_type != 3 && gnvs)
memset(gnvs, 0, sizeof(global_nvs_t));
}