2023-03-10 10:32:50 +00:00
|
|
|
// This file is part of noxos and licensed under the MIT open source license
|
2023-03-04 21:36:52 +00:00
|
|
|
|
|
|
|
#ifndef NOX_REGION_H
|
|
|
|
#define NOX_REGION_H
|
|
|
|
|
2023-03-07 18:22:46 +00:00
|
|
|
#include "utils/stdtypes.h"
|
2023-03-04 21:36:52 +00:00
|
|
|
|
2023-03-07 18:22:46 +00:00
|
|
|
#define KERNEL_START_ADDRESS (uint64_t)&_kernel_start
|
|
|
|
#define KERNEL_END_ADDRESS (uint64_t)&_kernel_end
|
|
|
|
|
2023-03-08 00:01:12 +00:00
|
|
|
#define MEM_REGION_THREAD_OFFSET 0x100000000
|
|
|
|
|
2023-03-07 18:22:46 +00:00
|
|
|
#define MEM_REGION_PROCESS 0x0000000000000000
|
|
|
|
#define MEM_REGION_PROCESS_EXEC 0x0000010000000000
|
2023-03-08 00:01:12 +00:00
|
|
|
#define MEM_REGION_PROCESS_THREAD_BASE 0x0000010100000000
|
2023-04-20 16:53:01 +00:00
|
|
|
#define MEM_REGION_PROCESS_USABLE 0x0000080000000000
|
2023-03-07 18:22:46 +00:00
|
|
|
|
2023-04-20 16:53:01 +00:00
|
|
|
#define MEM_REGION_KERNEL 0x0000800000000000
|
2023-05-30 20:26:58 +00:00
|
|
|
#define MEM_REGION_KERNEL_DRIVERS 0xFFFFE80000000000 // size: up to 8 TB
|
|
|
|
#define MEM_REGION_KERNEL_STACK_DUMMY 0xFFFFF00000000000 // size: 4 KB
|
|
|
|
#define MEM_REGION_KERNEL_HEAP 0xFFFFF80000000000 // size: up to 8 TB
|
|
|
|
#define MEM_REGION_KERNEL_THREAD_BASE 0xFFFFFF0000000000 // size: up to 1022 GB
|
|
|
|
#define MEM_REGION_KERNEL_EXEC 0xFFFFFFFF80000000 // size: up to 2 GB
|
2023-03-07 18:22:46 +00:00
|
|
|
|
|
|
|
extern uint64_t _kernel_start;
|
|
|
|
extern uint64_t _kernel_end;
|
2023-03-04 21:36:52 +00:00
|
|
|
|
|
|
|
#endif //NOX_REGION_H
|