diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-05-02 14:46:18 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-05-02 14:46:18 +0200 |
| commit | e59104ffb55abe522c82d658f1f285149cca2cb1 (patch) | |
| tree | eb3cc1e46d0dd5b684864903b95ae32e245010da /src/core/scheduler.hpp | |
| parent | 4f08ba2b1d0ad7ea90d4d97a483b56b891b9c902 (diff) | |
Debug GDT enable multitasking
Diffstat (limited to 'src/core/scheduler.hpp')
| -rw-r--r-- | src/core/scheduler.hpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/core/scheduler.hpp b/src/core/scheduler.hpp index 15b4caf..17b7f96 100644 --- a/src/core/scheduler.hpp +++ b/src/core/scheduler.hpp @@ -4,24 +4,32 @@ #define MAX_TASK 5 #define TASK_VMA 0x0 +#if (TASK_VMA % 0x7) + #error TASK_VMA value is not 4096 bits aligned! +#endif +// DO NOT CHANGE THE FOLLOWING STRUCTURE WITHOUT CONCIDERING UPDATING +// THE SWITCH FUNCTION INTO scheduler_asm.S typedef struct { - u32 rax, rbx, rcx, rdx; - u32 cs, rip; - u32 ss, rsp, rbp; - u32 rsi, rdi; - u32 ds, es, fs, gs; - u32 eflags; - u32 ss0, rsp0; + u64 rax, rbx, rcx, rdx; + u64 cs, rip; + u64 ss, rsp, rbp; + u64 rsi, rdi; + u64 ds, es, fs, gs; + u64 eflags; + u64 rsp0; + u64 r8,r9,r10,r11,r12,r13,r14,r15; } __attribute__((packed)) REGS; +// DO NOT CHANGE THE FOLLOWING STRUCTURE WITHOUT CONCIDERING UPDATING +// THE SWITCH FUNCTION INTO scheduler_asm.S typedef struct { + u64* pml4; + REGS registers; u32 id; u32 pid; - u64* pml4; u32 size; - REGS registers; -} __attribute__((packed)) TASK; +} __attribute__((packed)) PROC; extern char show_ticks; |
