1/*
2 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
3 * Distributed under the terms of the NewOS License.
4 */
5#ifndef _KERNEL_ARCH_MIPSEL_KERNEL_H
6#define _KERNEL_ARCH_MIPSEL_KERNEL_H
7
8#include <arch/cpu.h>
9
10#warning IMPLEMENT arch_kernel.h
11
12// memory layout
13#define KERNEL_BASE 0x80000000
14#define KERNEL_SIZE 0x80000000
15#define KERNEL_TOP  (KERNEL_BASE + (KERNEL_SIZE - 1))
16
17/*
18 * User space layout is a little special:
19 * The user space does not completely cover the space not covered by the kernel.
20 * This is accomplished by starting user space at 1Mb and running to 64kb short
21 * of kernel space. The lower 1Mb reserved spot makes it easy to find null
22 * pointer references and guarantees a region wont be placed there. The 64kb
23 * region assures a user space thread cannot pass a buffer into the kernel as
24 * part of a syscall that would cross into kernel space.
25 */
26#define USER_BASE     0x100000
27#define USER_BASE_ANY USER_BASE
28#define USER_SIZE     (0x80000000 - (0x10000 + USER_BASE))
29#define USER_TOP      (USER_BASE + (USER_SIZE - 1))
30
31#define KERNEL_USER_DATA_BASE	0x60000000
32#define USER_STACK_REGION              0x70000000
33#define USER_STACK_REGION_SIZE ((USER_TOP - USER_STACK_REGION) + 1)
34
35#endif	/* _KERNEL_ARCH_MIPSEL_KERNEL_H */
36
37