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@gmx.net> Reviewed-on: https://review.coreboot.org/15830 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Martin Roth
parent
aded214e74
commit
cc5be8b72b
@@ -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
|
||||
|
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <spike_util.h>
|
||||
#include <arch/barrier.h>
|
||||
#include <arch/errno.h>
|
||||
#include <atomic.h>
|
||||
#include <string.h>
|
||||
|
Reference in New Issue
Block a user