diff options
author | Benji Dial <benji6283@gmail.com> | 2020-09-06 00:48:07 -0400 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2020-09-06 00:48:07 -0400 |
commit | e8c6577617bffa4402c07c7aa20e3c24f03c1c20 (patch) | |
tree | 2fb9230b62d2344a44453117de9e656892219788 /src/kernel/task.h | |
parent | 7ff724fe8f709440da9c730fdb8dcbaa4f989ed5 (diff) | |
download | portland-os-e8c6577617bffa4402c07c7aa20e3c24f03c1c20.tar.gz |
program loading, others
big kernel additions: paging, elf loading, separate kernel and user page allocation
it now properly loads and runs sd0:bin/init.elf
still need to determine which disk was booted from, and start the init on that disk
Diffstat (limited to 'src/kernel/task.h')
-rw-r--r-- | src/kernel/task.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/kernel/task.h b/src/kernel/task.h index c3f2acd..838f27b 100644 --- a/src/kernel/task.h +++ b/src/kernel/task.h @@ -4,11 +4,27 @@ #include <stdbool.h> #include <stdint.h> -typedef uint8_t segment_id; -typedef uint8_t task_handle; +struct task_state { + uint32_t ret_addr; + void *page_directory; + //maybe put scheduling or priviledge information here? -segment_id new_segment(bool is_code, uint32_t length, uint32_t *location_out); -segment_id mirror_segment(bool is_code, segment_id other); -task_handle new_task(segment_id cs, segment_id ds, uint32_t eip, uint32_t esp); + uint32_t ebx; + uint32_t ecx; + uint32_t edx; + uint32_t esi; + uint32_t edi; + uint32_t ebp; + uint32_t esp; +} __attribute__ ((packed)); + +extern struct task_state *active_task; + +void init_tasks(); + +void new_task(struct task_state state); +void advance_active_task(); + +void delete_task(struct task_state *state); #endif
\ No newline at end of file |