From 3a3602861226e995d95a8898668cd559c3ca1cf6 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Wed, 17 Feb 2021 16:35:02 -0500 Subject: quick bitmap font format, borrowing new default font from X --- src/kernel/idt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/kernel/idt.c') 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(); -- cgit v1.2.3