diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2018-02-16 13:36:46 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-02-20 20:45:22 +0000 |
commit | b26759d703b636d1462d31cfa38fd3b3d8c90bfe (patch) | |
tree | 07a52b6bf62867d91935456518a164e0c2759c9b /src/arch/riscv/include | |
parent | 2764919dfb78127517dcf13c6ec002f937626b02 (diff) | |
download | coreboot-b26759d703b636d1462d31cfa38fd3b3d8c90bfe.tar.xz |
arch/riscv: Don't set up virtual memory
Due to changes in the RISC-V Privileged Architecture specification,
Linux can now be started in physical memory and it will setup its own
page tables.
Thus we can delete most of virtual_memory.c.
Change-Id: I4e69d15f8ee540d2f98c342bc4ec0c00fb48def0
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/23772
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch/riscv/include')
-rw-r--r-- | src/arch/riscv/include/vm.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/arch/riscv/include/vm.h b/src/arch/riscv/include/vm.h index 1a8f7ad6e0..fd0a2c947c 100644 --- a/src/arch/riscv/include/vm.h +++ b/src/arch/riscv/include/vm.h @@ -32,36 +32,11 @@ #include <stdint.h> #include <arch/encoding.h> -#define SUPERPAGE_SIZE ((uintptr_t)(RISCV_PGSIZE << RISCV_PGLEVEL_BITS)) -#define VM_CHOICE VM_SV39 -#define VA_BITS 39 -#define MEGAPAGE_SIZE (SUPERPAGE_SIZE << RISCV_PGLEVEL_BITS) - #define EXTRACT_FIELD(val, which) (((val) & (which)) / ((which) & ~((which)-1))) #define INSERT_FIELD(val, which, fieldval) (((val) & ~(which)) | ((fieldval) * ((which) & ~((which)-1)))) -#define supervisor_paddr_valid(start, length) \ - ((uintptr_t)(start) >= current.first_user_vaddr + current.bias \ - && (uintptr_t)(start) + (length) < mem_size \ - && (uintptr_t)(start) + (length) >= (uintptr_t)(start)) - -typedef uintptr_t pte_t; -extern pte_t* root_page_table; - -void initVirtualMemory(void); - -size_t pte_ppn(pte_t pte); -pte_t ptd_create(uintptr_t ppn); -pte_t pte_create(uintptr_t ppn, int prot, int user); - -void print_page_table(void); - -void init_vm(uintptr_t virtMemStart, uintptr_t physMemStart, - pte_t *pageTableStart); void mstatus_init(void); // need to setup mstatus so we know we have virtual memory -void flush_tlb(void); - #define DEFINE_MPRV_READ(name, type, insn) \ static inline type name(type *p); \ |