Furquan Shaikh (furquan(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15997
-gerrit
commit b23075727d665462f3926a942b1169f3574c29ca
Author: Furquan Shaikh <furquan(a)google.com>
Date: Sat Jul 30 11:19:13 2016 -0700
elog: Include declarations for boot count functions unconditionally
There is no need to add guards around boot_count_* functions since the
static definition of boot_count_read is anyways unused.
BUG=chrome-os-partner:55473
Change-Id: I553277cdc09a8af420ecf7caefcb59bc3dcb28f1
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
src/include/elog.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/include/elog.h b/src/include/elog.h
index b94a281..3f949bf 100644
--- a/src/include/elog.h
+++ b/src/include/elog.h
@@ -171,11 +171,7 @@ static inline int elog_smbios_write_type15(unsigned long *current,
extern u32 gsmi_exec(u8 command, u32 *param);
-#if CONFIG_ELOG_BOOT_COUNT
u32 boot_count_read(void);
u32 boot_count_increment(void);
-#else
-static inline u32 boot_count_read(void) { return 0; }
-#endif /* CONFIG_ELOG_BOOT_COUNT */
#endif /* ELOG_H_ */
Jonathan Neuschäfer (j.neuschaefer(a)gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15830
-gerrit
commit a8c46ff458e2cf6f5788e553ffff1f73b067c5c8
Author: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Date: Tue Jul 26 01:54:34 2016 +0200
arch/riscv: Add include/arch/barrier.h
mb() is used in src/arch/riscv/ and src/mainboard/emulation/*-riscv/.
It is currently provided by atomic.h, but I think it fits better into
barrier.h.
The "fence" instruction represents a full memory fence, as opposed to
variants such as "fence r, rw" which represent a partial fence. An
operating system might want to use precisely the right fence, but
coreboot doesn't need this level of performance at the cost of
simplicity.
Change-Id: I8d33ef32ad31e8fda38f6a5183210e7bd6c65815
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
---
src/arch/riscv/include/arch/barrier.h | 39 ++++++++++++++++++++++++
src/arch/riscv/include/atomic.h | 1 -
src/arch/riscv/virtual_memory.c | 5 +--
src/mainboard/emulation/qemu-riscv/qemu_util.c | 5 +--
src/mainboard/emulation/spike-riscv/spike_util.c | 1 +
5 files changed, 46 insertions(+), 5 deletions(-)
diff --git a/src/arch/riscv/include/arch/barrier.h b/src/arch/riscv/include/arch/barrier.h
new file mode 100644
index 0000000..257e2a2
--- /dev/null
+++ b/src/arch/riscv/include/arch/barrier.h
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ * Copyright 2016 Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#ifndef __ARCH_BARRIER_H_
+#define __ARCH_BARRIER_H__
+
+static inline void mb(void) { asm volatile("fence"); }
+static inline void rmb(void) { asm volatile("fence"); }
+static inline void wmb(void) { asm volatile("fence"); }
+
+#endif /* __ARCH_BARRIER_H__ */
diff --git a/src/arch/riscv/include/atomic.h b/src/arch/riscv/include/atomic.h
index df455b9..8f10b9d 100644
--- a/src/arch/riscv/include/atomic.h
+++ b/src/arch/riscv/include/atomic.h
@@ -36,7 +36,6 @@
typedef struct { int lock; } spinlock_t;
#define SPINLOCK_INIT {0}
-#define mb() __sync_synchronize()
#define atomic_set(ptr, val) (*(volatile typeof(*(ptr)) *)(ptr) = val)
#define atomic_read(ptr) (*(volatile typeof(*(ptr)) *)(ptr))
diff --git a/src/arch/riscv/virtual_memory.c b/src/arch/riscv/virtual_memory.c
index cda9057..f0cd5f6 100644
--- a/src/arch/riscv/virtual_memory.c
+++ b/src/arch/riscv/virtual_memory.c
@@ -14,11 +14,12 @@
* GNU General Public License for more details.
*/
-#include <vm.h>
+#include <arch/barrier.h>
#include <arch/encoding.h>
#include <atomic.h>
-#include <stdint.h>
#include <console/console.h>
+#include <stdint.h>
+#include <vm.h>
pte_t* root_page_table;
diff --git a/src/mainboard/emulation/qemu-riscv/qemu_util.c b/src/mainboard/emulation/qemu-riscv/qemu_util.c
index fca7d56..3c2941c 100644
--- a/src/mainboard/emulation/qemu-riscv/qemu_util.c
+++ b/src/mainboard/emulation/qemu-riscv/qemu_util.c
@@ -25,11 +25,12 @@
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#include <spike_util.h>
+#include <arch/barrier.h>
#include <arch/errno.h>
#include <atomic.h>
-#include <string.h>
#include <console/console.h>
+#include <spike_util.h>
+#include <string.h>
uintptr_t translate_address(uintptr_t vAddr) {
// TODO: implement the page table translation algorithm
diff --git a/src/mainboard/emulation/spike-riscv/spike_util.c b/src/mainboard/emulation/spike-riscv/spike_util.c
index 358cb44..f0f5301 100644
--- a/src/mainboard/emulation/spike-riscv/spike_util.c
+++ b/src/mainboard/emulation/spike-riscv/spike_util.c
@@ -26,6 +26,7 @@
*/
#include <spike_util.h>
+#include <arch/barrier.h>
#include <arch/errno.h>
#include <atomic.h>
#include <string.h>
Lee Leahy (leroy.p.leahy(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15993
-gerrit
commit 02c2adb6748b2922a73535173bcb9356a7dce85c
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Sat Jul 30 11:51:28 2016 -0700
mainboard/intel/galileo: Enable BOOTBLOCK_CONSOLE
Turn on debug serial output for the boot block.
TEST=Build and run on Galileo Gen2
Change-Id: I40ce71e802e9da8de6a23259afb84017a16b6e74
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
---
src/mainboard/intel/galileo/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mainboard/intel/galileo/Kconfig b/src/mainboard/intel/galileo/Kconfig
index b0c69e4..cba65ea 100644
--- a/src/mainboard/intel/galileo/Kconfig
+++ b/src/mainboard/intel/galileo/Kconfig
@@ -18,6 +18,7 @@ if BOARD_INTEL_GALILEO
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_8192
+ select BOOTBLOCK_CONSOLE
select CREATE_BOARD_CHECKLIST
select ENABLE_BUILTIN_HSUART1
select HAVE_ACPI_TABLES
Lee Leahy (leroy.p.leahy(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15992
-gerrit
commit 87b1e89259aae42a07c2c59867c59b970dfac485
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Sat Jul 30 10:34:22 2016 -0700
soc/intel/quark: Enable use of hard reset
Select HAVE_HARD_RESET in the KCONFIG file to enable use of the
hard_reset routine.
TEST=Build and run on Galileo Gen2
Change-Id: Ib11a80b64cf1c55aec24f2576d197da9017b9751
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
---
src/soc/intel/quark/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/soc/intel/quark/Kconfig b/src/soc/intel/quark/Kconfig
index 116dc9f..2b6a0eb 100644
--- a/src/soc/intel/quark/Kconfig
+++ b/src/soc/intel/quark/Kconfig
@@ -28,6 +28,7 @@ config CPU_SPECIFIC_OPTIONS
select ARCH_VERSTAGE_X86_32
select BOOTBLOCK_SAVE_BIST_AND_TIMESTAMP
select C_ENVIRONMENT_BOOTBLOCK
+ select HAVE_HARD_RESET
select REG_SCRIPT
select SOC_INTEL_COMMON
select SOC_SETS_MSRS
Lee Leahy (leroy.p.leahy(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15991
-gerrit
commit 64540c713ae8f3b5ff55c23db68eee0e6bba62cb
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Sat Jul 30 07:34:20 2016 -0700
arch/x86: Display MTRRs after MTRR update in postcar
Display the MTRRs after they have been updated during the postcar stage.
TEST=Build and run on Galileo Gen2
Change-Id: I1532250cacd363c1eeaf72edc6cb9e9268a11375
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
---
src/arch/x86/exit_car.S | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/arch/x86/exit_car.S b/src/arch/x86/exit_car.S
index a51d662..90715e4 100644
--- a/src/arch/x86/exit_car.S
+++ b/src/arch/x86/exit_car.S
@@ -108,6 +108,9 @@ _start:
wrmsr
#endif /* CONFIG_SOC_SETS_MSRS */
+ /* Display the MTRRs */
+ call soc_display_mtrrs
+
/* Load and run ramstage. */
call copy_and_run
/* Should never return. */