Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3990
-gerrit
commit 7a5551f02022541afdba9cc919ef7d3a6d8cbbb9
Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
Date: Mon Oct 21 01:56:47 2013 +0200
Add a KEEP_BOOT_COUNT Kconfig option.
The use case of that option is to inform coreboot (trough the nvram) at the
next boot, that the computer could not fully boot to boot to an usable state.
In that case, the boot count is incremented by one.
Previously there was no way to tell coreboot that the computer really booted
successfully, because it was assumed that if set_boot_successful was called
in ramstage, then the computer would have booted successfully.
However many things can go wrong after that point, for instance the payload
could fail to boot, or the operating system's kernel could fail to boot too,
due to the wrong configurations passed to it by coreboot and the payload.
Change-Id: I01af053455eb6bd2f7a4f9d37e8c234ba8d55250
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
---
src/arch/x86/Kconfig | 8 ++++++++
src/arch/x86/boot/acpi.c | 12 ++++++++++++
2 files changed, 20 insertions(+)
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 52bafbd..e13ebbb 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -80,6 +80,14 @@ config MAX_REBOOT_CNT
the nvram is reset, which will make it switch to fallback/
again during the next boot.
+config KEEP_BOOT_COUNT
+ bool "Keep boot count"
+ default n
+ depends on PC80_SYSTEM && X86_BOOTBLOCK_NORMAL
+ help
+ If enabled, the boot count is not reset anymore in the ramstage.
+ This delegates that task to the software running after the ramstage.
+
config BOOTBLOCK_SOURCE
string
default "bootblock_simple.c" if X86_BOOTBLOCK_SIMPLE
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 96cb270..2b1e764 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -33,6 +33,9 @@
#include <cbmem.h>
#include <cpu/x86/lapic_def.h>
#include <cpu/cpu.h>
+#if CONFIG_KEEP_BOOT_COUNT
+#include <fallback.h>
+#endif
#if CONFIG_COLLECT_TIMESTAMPS
#include <timestamp.h>
#endif
@@ -638,6 +641,15 @@ void acpi_resume(void *wake_vec)
if (mainboard_suspend_resume)
mainboard_suspend_resume();
+#if CONFIG_KEEP_BOOT_COUNT
+ /* we don't want to resume with the wrong prefix next time.
+ * And doing it in the bootblock seems counterintuitive:
+ * the bootblock would then need to know it's resuming...
+ */
+ if (strncmp(CONFIG_CBFS_PREFIX, "fallback", sizeof("fallback")))
+ set_boot_successful();
+#endif
+
post_code(POST_OS_RESUME);
acpi_jump_to_wakeup(wake_vec);
}
the following patch was just integrated into master:
commit baa782020e9d2d0ce7b6fd1c7c43411c9aa2b900
Author: Gerd Hoffmann <kraxel(a)redhat.com>
Date: Wed Nov 6 14:36:17 2013 +0100
qemu: load e820 from fw_cfg
qemu 1.7+ provides a fw_cfg file named "etc/e820" with e820-like entries
for reservations and ram regions. Use it for ram detection if present,
otherwise fallback to the traditional cmos method.
Change-Id: Icac6c99d2a053e59dfdd28e48d1ceb3d56a61bdc
Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
Reviewed-on: http://review.coreboot.org/4030
Tested-by: build bot (Jenkins)
See http://review.coreboot.org/4030 for details.
-gerrit
the following patch was just integrated into master:
commit 289b45fdffa42db85fa4ad63338677ab8f15e9a2
Author: Gerd Hoffmann <kraxel(a)redhat.com>
Date: Wed Jun 12 10:18:58 2013 +0200
qemu: add fw_cfg files support
Qemu can provide files using the firmware config interface.
This is used to pass config options, virtual machine config
info and option roms into the guest.
This patch adds support for reading the file index and loading
files from qemu.
Change-Id: I57d4a734527c4117239f355121cf1fb8a390ab0d
Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
Reviewed-on: http://review.coreboot.org/4029
Tested-by: build bot (Jenkins)
See http://review.coreboot.org/4029 for details.
-gerrit
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4036
-gerrit
commit 3860976e7857ce81e59c856cadda9fa2c202214e
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Tue Oct 29 20:41:50 2013 +0100
cpu/amd/model_fxx/powernow_acpi.c: Remove set but unused variable `Start_vid`
Removing `-Wno-unused-but-set-variable` from `CFLAGS` the build for the
ASRock 939A785GMH fails with the following error.
CC cpu/amd/model_fxx/powernow_acpi.ramstage.o
src/cpu/amd/model_fxx/powernow_acpi.c: In function 'pstates_algorithm':
src/cpu/amd/model_fxx/powernow_acpi.c:761:25: error: variable 'Start_vid' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
When adding support for PSS object generation for AMD pre Family Fh CPUs
(199c694f) the function `pstates_algorithm` was copied and adapted, but
`Start_vid` is not needed anymore as a static table is used. So remove
the variable `Start_vid`.
Change-Id: I3002951d168cade6461941c16d78373c47792e13
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
src/cpu/amd/model_fxx/powernow_acpi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/cpu/amd/model_fxx/powernow_acpi.c b/src/cpu/amd/model_fxx/powernow_acpi.c
index af1e24b..eca736c 100644
--- a/src/cpu/amd/model_fxx/powernow_acpi.c
+++ b/src/cpu/amd/model_fxx/powernow_acpi.c
@@ -758,7 +758,7 @@ static int pstates_algorithm(u32 pcontrol_blk, u8 plen, u8 onlyBSP)
u16 Pstate_feq[MAXP+1];
u8 Pstate_vid[MAXP+1];
u32 Pstate_power[MAXP+1];
- u8 Max_fid, Start_fid, Start_vid, Max_vid;
+ u8 Max_fid, Start_fid, Max_vid;
struct cpuid_result cpuid1;
/* See if the CPUID(0x80000007) returned EDX[2:1]==11b */
@@ -777,7 +777,6 @@ static int pstates_algorithm(u32 pcontrol_blk, u8 plen, u8 onlyBSP)
Max_fid = (msr.lo & 0x3F0000) >> 16;
Max_vid = (msr.hi & 0x3F0000) >> 16;
Start_fid = (msr.lo & 0x3F00) >> 8;
- Start_vid = (msr.hi & 0x3F00) >> 8;
cmp_cap =
(pci_read_config16(dev_find_slot(0, PCI_DEVFN(0x18, 3)), 0xE8) &