mirror of
https://github.com/drasko/codezero.git
synced 2026-04-18 09:49:05 +02:00
Removed hard-coded area definitions from kernel
This commit is contained in:
@@ -10,21 +10,6 @@
|
||||
#endif
|
||||
#include INC_PLAT(offsets.h)
|
||||
|
||||
#define USER_AREA_START 0x10000000
|
||||
#define USER_AREA_END 0x20000000
|
||||
#define USER_AREA_SIZE (USER_AREA_END - USER_AREA_START)
|
||||
#define USER_AREA_SECTIONS (USER_AREA_SIZE / ARM_SECTION_SIZE)
|
||||
#define PMDS_PER_TASK (USER_AREA_SIZE / PMD_MAP_SIZE)
|
||||
|
||||
#define SHM_AREA_START 0x20000000
|
||||
#define SHM_AREA_END 0x30000000
|
||||
#define SHM_AREA_SIZE (SHM_AREA_END - SHM_AREA_START)
|
||||
#define SHM_AREA_SECTIONS (SHM_AREA_SIZE / ARM_SECTION_SIZE)
|
||||
|
||||
#define INITTASK_AREA_START 0xE0000000
|
||||
#define INITTASK_AREA_END 0xF0000000 /* 256 MB, too much. */
|
||||
#define INITTASK_AREA_SIZE (INITTASK_AREA_END - INITTASK_AREA_START)
|
||||
|
||||
#define KERNEL_AREA_START 0xF0000000
|
||||
#define KERNEL_AREA_END 0xF8000000 /* 128 MB */
|
||||
#define KERNEL_AREA_SIZE (KERNEL_AREA_END - KERNEL_AREA_START)
|
||||
@@ -65,12 +50,8 @@
|
||||
#define virt_to_phys(addr) ((unsigned int)(addr) - KERNEL_OFFSET)
|
||||
#endif
|
||||
|
||||
#define PAGER_ADDR(x) ((x >= INITTASK_AREA_START) && (x < INITTASK_AREA_END))
|
||||
#define KERN_ADDR(x) ((x >= KERNEL_AREA_START) && (x < KERNEL_AREA_END))
|
||||
#define UTCB_ADDR(x) ((x >= UTCB_AREA_START) && (x < UTCB_AREA_END))
|
||||
#define SHM_ADDR(x) ((x >= SHM_AREA_START) && (x < SHM_AREA_END))
|
||||
#define USER_ADDR(x) (((x >= USER_AREA_START) && (x < USER_AREA_END)) || \
|
||||
UTCB_ADDR(x) || SHM_ADDR(x) || PAGER_ADDR(x))
|
||||
#define PRIVILEGED_ADDR(x) (KERN_ADDR(x) || (x >= ARM_HIGH_VECTOR) || \
|
||||
(x >= IO_AREA_START && x < IO_AREA_END))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user