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 e352411b7d3dc4861551671ae77218431f114e1e
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 7141d7b..333cc6e 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 a7a81fb..bfdd84d 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>
the following patch was just integrated into master:
commit 828e73e0b69896c769e2b9baf6a22c22eafd3734
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Thu Jul 28 17:26:39 2016 +0300
intel/wifi: Include conditionally in the build
Keep this enabled by default as most x86 platforms could have PCI-e
slots equipped with one of these Intel WiFi adapters.
The Kconfig entries under google boards had no function previously,
the variable was never referenced.
Change-Id: I728ce3fd83d51d4e5e32b848a2079c5fcee29349
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: https://review.coreboot.org/15931
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Duncan Laurie <dlaurie(a)chromium.org>
See https://review.coreboot.org/15931 for details.
-gerrit
HAOUAS Elyes (ehaouas(a)noos.fr) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15942
-gerrit
commit 76d542221dbb2cb8f199f1b5b9520f91c896fda4
Author: Elyes HAOUAS <ehaouas(a)noos.fr>
Date: Thu Jul 28 21:25:21 2016 +0200
src/include: Capitalize CPU, RAM and ROM
Change-Id: Id40c1bf868820c77ea20146d19c6d552c2f970c4
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
src/include/cbfs.h | 2 +-
src/include/console/post_codes.h | 6 +++---
src/include/cpu/x86/cache.h | 2 +-
src/include/cpu/x86/mp.h | 12 ++++++------
src/include/cpu/x86/msr.h | 2 +-
src/include/cpu/x86/mtrr.h | 2 +-
src/include/cpu/x86/smm.h | 8 ++++----
src/include/gic.h | 2 +-
src/include/rmodule.h | 2 +-
9 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/include/cbfs.h b/src/include/cbfs.h
index 2d19218..6d9dd42 100644
--- a/src/include/cbfs.h
+++ b/src/include/cbfs.h
@@ -23,7 +23,7 @@
* Perform CBFS operations on the boot device. *
***********************************************/
-/* Return mapping of option rom found in boot device. NULL on error. */
+/* Return mapping of option ROM found in boot device. NULL on error. */
void *cbfs_boot_map_optionrom(uint16_t vendor, uint16_t device);
/* Load stage by name into memory. Returns entry address on success. NULL on
* failure. */
diff --git a/src/include/console/post_codes.h b/src/include/console/post_codes.h
index 8e47905..c7722e5 100644
--- a/src/include/console/post_codes.h
+++ b/src/include/console/post_codes.h
@@ -82,14 +82,14 @@
#define POST_ENTRY_C_START 0x13
/**
- * \brief Pre call to ram stage main()
+ * \brief Pre call to RAM stage main()
*
- * POSTed right before ram stage main() is called from c_start.S
+ * POSTed right before RAM stage main() is called from c_start.S
*/
#define POST_PRE_HARDWAREMAIN 0x79
/**
- * \brief Entry into coreboot in ram stage main()
+ * \brief Entry into coreboot in RAM stage main()
*
* This is the first call in hardwaremain.c. If this code is POSTed, then
* ramstage has successfully loaded and started executing.
diff --git a/src/include/cpu/x86/cache.h b/src/include/cpu/x86/cache.h
index 9c1af29..2c8c44b 100644
--- a/src/include/cpu/x86/cache.h
+++ b/src/include/cpu/x86/cache.h
@@ -52,7 +52,7 @@ static inline void invd(void)
/* The following functions require the always_inline due to AMD
* function STOP_CAR_AND_CPU that disables cache as
- * ram, the cache as ram stack can no longer be used. Called
+ * RAM, the cache as RAM stack can no longer be used. Called
* functions must be inlined to avoid stack usage. Also, the
* compiler must keep local variables register based and not
* allocated them from the stack. With gcc 4.5.0, some functions
diff --git a/src/include/cpu/x86/mp.h b/src/include/cpu/x86/mp.h
index 9742df0..cea3139 100644
--- a/src/include/cpu/x86/mp.h
+++ b/src/include/cpu/x86/mp.h
@@ -59,9 +59,9 @@ struct mp_ops {
void (*get_microcode_info)(const void **microcode, int *parallel);
/*
* Optionally provide a function which adjusts the APIC id
- * map to cpu number. By default the cpu number and APIC id
- * are 1:1. To change the APIC id for a given cpu return the
- * new APIC id. It's called for each cpu as indicated by
+ * map to CPU number. By default the CPU number and APIC id
+ * are 1:1. To change the APIC id for a given CPU return the
+ * new APIC id. It's called for each CPU as indicated by
* get_cpu_count().
*/
int (*adjust_cpu_apic_entry)(int cpu, int cur_apic_id);
@@ -78,7 +78,7 @@ struct mp_ops {
void (*adjust_smm_params)(struct smm_loader_params *slp, int is_perm);
/*
* Optionally provide a callback prior to the APs starting SMM
- * relocation or cpu driver initialization. However, note that
+ * relocation or CPU driver initialization. However, note that
* this callback is called after SMM handlers have been loaded.
*/
void (*pre_mp_smm_init)(void);
@@ -88,11 +88,11 @@ struct mp_ops {
*/
void (*per_cpu_smm_trigger)(void);
/*
- * This function is called while each cpu is in the SMM relocation
+ * This function is called while each CPU is in the SMM relocation
* handler. Its primary purpose is to adjust the SMBASE for the
* permanent handler. The parameters passed are the current cpu
* running the relocation handler, current SMBASE of relocation handler,
- * and the pre-calculated staggered cpu SMBASE address of the permanent
+ * and the pre-calculated staggered CPU SMBASE address of the permanent
* SMM handler.
*/
void (*relocation_handler)(int cpu, uintptr_t curr_smbase,
diff --git a/src/include/cpu/x86/msr.h b/src/include/cpu/x86/msr.h
index d644edd..db35ef1 100644
--- a/src/include/cpu/x86/msr.h
+++ b/src/include/cpu/x86/msr.h
@@ -48,7 +48,7 @@ static inline __attribute__((always_inline)) void wrmsr(unsigned index,
/* The following functions require the always_inline due to AMD
* function STOP_CAR_AND_CPU that disables cache as
- * ram, the cache as ram stack can no longer be used. Called
+ * RAM, the cache as RAM stack can no longer be used. Called
* functions must be inlined to avoid stack usage. Also, the
* compiler must keep local variables register based and not
* allocated them from the stack. With gcc 4.5.0, some functions
diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h
index d09c77e..f32bece 100644
--- a/src/include/cpu/x86/mtrr.h
+++ b/src/include/cpu/x86/mtrr.h
@@ -91,7 +91,7 @@ int get_free_var_mtrr(void);
(x>>6)|(x>>7)|(x>>8)|((1<<18)-1))
#define _ALIGN_UP_POW2(x) ((x + _POW2_MASK(x)) & ~_POW2_MASK(x))
-/* At the end of romstage, low ram 0..CACHE_TM_RAMTOP may be set
+/* At the end of romstage, low RAM 0..CACHE_TM_RAMTOP may be set
* as write-back cacheable to speed up ramstage decompression.
* Note MTRR boundaries, must be power of two.
*/
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index 2b13f8c..c1051ad 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -491,8 +491,8 @@ u16 smm_get_pmbase(void);
struct smm_runtime {
u32 smbase;
u32 save_state_size;
- /* The apic_id_to_cpu provides a mapping from APIC id to cpu number.
- * The cpu number is indicated by the index into the array by matching
+ /* The apic_id_to_cpu provides a mapping from APIC id to CPU number.
+ * The CPU number is indicated by the index into the array by matching
* the default APIC id and value at the index. The stub loader
* initializes this array with a 1:1 mapping. If the APIC ids are not
* contiguous like the 1:1 mapping it is up to the caller of the stub
@@ -525,7 +525,7 @@ void *smm_get_save_state(int cpu);
/* The smm_loader_params structure provides direction to the SMM loader:
* - stack_top - optional external stack provided to loader. It must be at
* least per_cpu_stack_size * num_concurrent_stacks in size.
- * - per_cpu_stack_size - stack size per cpu for smm modules.
+ * - per_cpu_stack_size - stack size per CPU for smm modules.
* - num_concurrent_stacks - number of concurrent cpus in handler needing stack
* optional for setting up relocation handler.
* - per_cpu_save_state_size - the smm save state size per cpu
@@ -537,7 +537,7 @@ void *smm_get_save_state(int cpu);
* the address of the module's parameters (if present).
* - runtime - this field is a result only. The SMM runtime location is filled
* into this field so the code doing the loading can manipulate the
- * runtime's assumptions. e.g. updating the apic id to cpu map to
+ * runtime's assumptions. e.g. updating the apic id to CPU map to
* handle sparse apic id space.
*/
struct smm_loader_params {
diff --git a/src/include/gic.h b/src/include/gic.h
index 1ac1eab..f7339a4 100644
--- a/src/include/gic.h
+++ b/src/include/gic.h
@@ -26,7 +26,7 @@ void gic_enable(void);
/* Return a pointer to the base of the GIC distributor mmio region. */
void *gicd_base(void);
-/* Return a pointer to the base of the GIC cpu mmio region. */
+/* Return a pointer to the base of the GIC CPU mmio region. */
void *gicc_base(void);
#else /* CONFIG_GIC */
diff --git a/src/include/rmodule.h b/src/include/rmodule.h
index c0c062c..c5de9c3 100644
--- a/src/include/rmodule.h
+++ b/src/include/rmodule.h
@@ -40,7 +40,7 @@ int rmodule_load_alignment(const struct rmodule *m);
/* rmodule_calc_region() calculates the region size, offset to place an
* rmodule in memory, and load address offset based off of a region allocator
* with an alignment of region_alignment. This function helps place an rmodule
- * in the same location in ram it will run from. The offset to place the
+ * in the same location in RAM it will run from. The offset to place the
* rmodule into the region allocated of size region_size is returned. The
* load_offset is the address to load and relocate the rmodule.
* region_alignment must be a power of 2. */
the following patch was just integrated into master:
commit 783d0c146f6a2c3710ce7cd9ebe2aabb5825d854
Author: Antonello Dettori <dev(a)dettori.io>
Date: Thu Jul 28 13:59:44 2016 +0200
bayou: delete pbuilder utility
Delete pbuilder since it is not needed anymore.
Change-Id: I685547e9692944b89521864fc3bee4e9a2f1139f
Signed-off-by: Antonello Dettori <dev(a)dettori.io>
Reviewed-on: https://review.coreboot.org/15955
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Omar Pakker
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/15955 for details.
-gerrit