summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-02-17 16:35:02 -0500
committerBenji Dial <benji6283@gmail.com>2021-02-17 16:35:02 -0500
commit3a3602861226e995d95a8898668cd559c3ca1cf6 (patch)
tree0d5bc0494297a12e9ccb76b31cb365c843216735 /src/kernel
parent49d76d30a55707e2bf95fd9ba03296489fac8d1d (diff)
downloadportland-os-3a3602861226e995d95a8898668cd559c3ca1cf6.tar.gz
quick bitmap font format, borrowing new default font from X
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/idt.c3
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();