diff options
author | Benji Dial <benji6283@gmail.com> | 2021-02-17 16:35:02 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-02-17 16:35:02 -0500 |
commit | 3a3602861226e995d95a8898668cd559c3ca1cf6 (patch) | |
tree | 0d5bc0494297a12e9ccb76b31cb365c843216735 /src/kernel/idt.c | |
parent | 49d76d30a55707e2bf95fd9ba03296489fac8d1d (diff) | |
download | portland-os-3a3602861226e995d95a8898668cd559c3ca1cf6.tar.gz |
quick bitmap font format, borrowing new default font from X
Diffstat (limited to 'src/kernel/idt.c')
-rw-r--r-- | src/kernel/idt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/idt.c b/src/kernel/idt.c index 99284ac..c79ae7b 100644 --- a/src/kernel/idt.c +++ b/src/kernel/idt.c @@ -256,9 +256,10 @@ void exception_halt(uint32_t eax, uint32_t ebx, uint32_t ecx, __builtin_unreachable(); } +#define MAX_STACK_EXPAND_PAGES 256 //returns true if stack was expanded bool pf_check_stack(uint32_t cr2) { - if (cr2 >= active_task->stack_bottom - 0x1000) { + if (cr2 >= active_task->stack_bottom - 0x1000 * MAX_STACK_EXPAND_PAGES) { switch_to_kernel_cr3(); pd_user_allocate(active_task->page_directory, active_task->stack_bottom -= 4096, 1, true); switch_to_task_cr3(); |