Make UEFI boot-platform build again
[haiku.git] / headers / private / kernel / arch / sh4 / kernel.h
bloba6d95b83dfa9efe550744212fe68826c94fa6a2f
1 /*
2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 #ifndef _NEWOS_KERNEL_ARCH_SH4_KERNEL_H
6 #define _NEWOS_KERNEL_ARCH_SH4_KERNEL_H
8 #include <arch/sh4/sh4.h>
10 // memory layout
11 #define KERNEL_BASE P3_AREA
12 #define KERNEL_SIZE P3_AREA_LEN
13 #define KERNEL_TOP (KERNEL_BASE + (KERNEL_SIZE - 1))
16 ** User space layout is a little special:
17 ** The user space does not completely cover the space not covered by the kernel.
18 ** This is accomplished by starting user space at 1Mb and running to 64kb short of kernel space.
19 ** The lower 1Mb reserved spot makes it easy to find null pointer references and guarantees a
20 ** region wont be placed there. The 64kb region assures a user space thread cannot pass
21 ** a buffer into the kernel as part of a syscall that would cross into kernel space.
23 #define USER_BASE (U0_AREA + 0x100000)
24 #define USER_SIZE (U0_AREA_LEN - (0x10000 + 0x100000))
25 #define USER_TOP (USER_BASE + USER_SIZE)
27 #define USER_STACK_REGION (USER_BASE + USER_SIZE - USER_STACK_REGION_SIZE)
28 #define USER_STACK_REGION_SIZE 0x10000000
30 #endif