aboutsummaryrefslogtreecommitdiff
path: root/src/arch/riscv/virtual_memory.c
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2016-07-26 01:54:34 +0200
committerMartin Roth <martinroth@google.com>2016-08-02 23:35:49 +0200
commitcc5be8b72ba5b072030fdd1d382d7156da43114f (patch)
treecb94bc583e87b6c58bdf675fdec363003d316227 /src/arch/riscv/virtual_memory.c
parentaded214e74bcb63990d69551bec7ab03c6785b08 (diff)
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>
Diffstat (limited to 'src/arch/riscv/virtual_memory.c')
-rw-r--r--src/arch/riscv/virtual_memory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/arch/riscv/virtual_memory.c b/src/arch/riscv/virtual_memory.c
index cda9057939..f0cd5f656a 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;