docs: documented process memory isolation implementation
This commit is contained in:
parent
1af6191748
commit
1b1a5ed653
|
@ -876,6 +876,35 @@ If **_divisor_** is smaller than 100, it will be set to 100.
|
|||
|
||||
## mm
|
||||
|
||||
### region.h
|
||||
|
||||
The first 4 digits can be ignored, they are ignored by the MMU,
|
||||
but for clarity / readability reasons they are `FFFF` in the kernel space.
|
||||
See _General Concepts / Memory Layout_ and _General Concepts / Process Memory Isolation_ for more details.
|
||||
|
||||
| Name | Start | Description |
|
||||
|----------------------------------|--------------------|-------------------------------------------------------------------------|
|
||||
| `MEM_REGION_PROCESS` | 0x0000000000000000 | This is the start of the process space |
|
||||
| `MEM_REGION_PROCESS_EXEC` | 0x0000010000000000 | Every processes' executable will be mapped here |
|
||||
| `MEM_REGION_PROCESS_THREAD_DATA` | 0x0000010100000000 | The start of the thread specific data ( -> _Process Memory Isolation_ ) |
|
||||
| `MEM_REGION_KERNEL` | 0xFFFF800000000000 | This is the start of the kernel space |
|
||||
| `MEM_REGION_KERNEL_EXEC` | 0xFFFFFFFF80000000 | The kernel executable is mapped here |
|
||||
| `MEM_REGION_KERNEL_HEAP` | 0xFFFFFFFFF0000000 | The kernels' heap begins here |
|
||||
|
||||
#### `KERNEL_START_ADDRESS` - macro
|
||||
Returns the address of `_kernel_start`.
|
||||
|
||||
#### `KERNEL_END_ADDRESS` - macro
|
||||
Returns the address of `_kernel_end`.
|
||||
|
||||
#### `_kernel_start` - global variable
|
||||
This symbol is inserted by the linker at the beginning of the kernel.
|
||||
To access its value use the `KERNEL_START_ADDRESS` macro.
|
||||
|
||||
#### `_kernel_end` - global variable
|
||||
This symbol is inserted by the linker at the end of the kernel.
|
||||
To access its value use the `KERNEL_END_ADDRESS` macro.
|
||||
|
||||
### heap.h
|
||||
|
||||
#### `heap_segment_T` - struct
|
||||
|
@ -1219,8 +1248,8 @@ Thread schematics (schedulers view):
|
|||
|
||||
#### `thread_T` - struct
|
||||
| Name | Type | Description |
|
||||
|-------------|-------------|--------------------------------------------------------------------------------------------------|
|
||||
| state | cpu_state_T | The last saved state of the thread. ( -> _context switching_) |
|
||||
|-------------|--------------|--------------------------------------------------------------------------------------------------|
|
||||
| state | cpu_state_T* | The last saved state of the thread ( -> _context switching_) |
|
||||
| cpu_time | uint64_t | The amount of cpu time the thread had. (currently the amount of context switches the thread had) |
|
||||
| stack | void* | The bottom of the threads stack |
|
||||
| stack_size | uint32_t | The size of the threads stack (in bytes) |
|
||||
|
|
Loading…
Reference in New Issue