riscv/spike: fix seL4_UserTop for riscv

Use correct values and document them.
This commit is contained in:
Anna Lyons 2018-12-13 10:18:35 +11:00
parent e7bc274833
commit 5fe6d0bcef
5 changed files with 16 additions and 8 deletions

View file

@ -13,7 +13,11 @@
#define __PLAT_MODE_MACHINE_HARDWARE_H
#include <config.h>
#include <plat/api/constants.h>
#define PPTR_BASE 0x80000000lu
/* This is the base of the kernel window, which is directly mapped to PADDR_BASE */
#define PPTR_BASE seL4_UserTop
/* This is the mapping of the kernel (mapped above the kernel window currently) */
#define KERNEL_BASE 0xFF800000lu
#endif

View file

@ -19,7 +19,14 @@
* entires are for the user, and 256 are for the kernel. This will be further split into the
* 'regular' kernel window, which contains mappings to physical memory, and a small higher
* kernel image window that we use for running the actual kernel from */
/* We steal the top 2 gb entries for the kernel, this means that between PPTR_BASE and
* KERNEL_BASE there are 254 entries remaining, which represents how much physical memory
* can be used */
/* This is the base of the kernel window, which is directly mapped to PADDR_BASE */
#define PPTR_BASE 0xFFFFFFC000000000lu
/* This is the mapping of the kernel (mapped above the kernel window currently) */
#define KERNEL_BASE 0xFFFFFFFF80000000lu
#else
#error Only PT_LEVELS == 3 is supported
#endif

View file

@ -42,7 +42,6 @@
#endif
/* The highest valid physical address that can be indexed in the kernel window */
#define KERNEL_BASE seL4_UserTop
#define PADDR_TOP (KERNEL_BASE - PPTR_BASE + PADDR_BASE)
/* The highest valid physical address that can be used for the kernel image. We offset by
* PADDR_LOAD as the window for the kernel image is mapped started at PADDR_LOAD */
@ -52,7 +51,8 @@
#define KERNEL_BASE_OFFSET (KERNEL_BASE - PADDR_LOAD)
/* Convert our values into general values expected by the common code */
#define kernelBase seL4_UserTop
#define kernelBase KERNEL_BASE
/* This is the top of the kernel window, not including the kernel image */
#define PPTR_TOP KERNEL_BASE
#define PPTR_USER_TOP PPTR_BASE
#define BASE_OFFSET (PPTR_BASE - PADDR_BASE)

View file

@ -82,6 +82,6 @@ enum {
} seL4_UserException_Msg;
/* First address in the virtual address space that is not accessible to user level */
#define seL4_UserTop 0xFF800000lu
#define seL4_UserTop 0x80000000lu
#endif

View file

@ -83,9 +83,6 @@ enum {
} seL4_UserException_Msg;
/* First address in the virtual address space that is not accessible to user level */
/* We steal the top 2 gb entries for the kernel, this means that between PPTR_BASE and
* KERNEL_BASE there are 254 entries remaining, which represents how much physical memory
* can be used */
#define seL4_UserTop 0xFFFFFFFF80000000lu
#define seL4_UserTop 0x0000003ffffff000
#endif