diff options
| author | Ada Christine <adachristine18@gmail.com> | 2021-12-16 12:06:04 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2021-12-16 12:06:04 +0000 |
| commit | ec1233b4fcd61a8d1eccbf030cede36e9848e06c (patch) | |
| tree | 13ffdc3b3948275e8c764ccf10368d555ff4d5e1 /api/kernel | |
| parent | a7f79219706c357c6c15978cea5e654042b14acb (diff) | |
reworking loader
Diffstat (limited to 'api/kernel')
| -rw-r--r-- | api/kernel/entry.h | 1 | ||||
| -rw-r--r-- | api/kernel/memory/paging.h | 1 | ||||
| -rw-r--r-- | api/kernel/memory/range.h | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/api/kernel/entry.h b/api/kernel/entry.h index 8a26125..d119ca1 100644 --- a/api/kernel/entry.h +++ b/api/kernel/entry.h @@ -5,3 +5,4 @@ #define KERNEL_ENTRY_STACK_BASE ((char *)KERNEL_ENTRY_STACK_HEAD - KERNEL_ENTRY_STACK_SIZE) typedef void (*kernel_entry_func)(void *data); + diff --git a/api/kernel/memory/paging.h b/api/kernel/memory/paging.h index fc1aa45..000d12b 100644 --- a/api/kernel/memory/paging.h +++ b/api/kernel/memory/paging.h @@ -31,3 +31,4 @@ #define page_address(a, l) ((uintptr_t)a & ~(page_size(l) - 1)) #define page_offset(a, l) ((uintptr_t)a & (page_size(l) - 1)) #define page_count(s, l) (((s + page_size(l) - 1) & ~(page_size(l) - 1)) / page_size(l)) + diff --git a/api/kernel/memory/range.h b/api/kernel/memory/range.h index 6a68467..90b3354 100644 --- a/api/kernel/memory/range.h +++ b/api/kernel/memory/range.h @@ -11,6 +11,7 @@ enum memory_range_type RESERVED_MEMORY, SYSTEM_MEMORY, AVAILABLE_MEMORY, + INVALID_MEMORY = 0xff }; struct memory_range @@ -19,3 +20,4 @@ struct memory_range phys_addr_t base; size_t size; }; + |
