Rewrote physical memory allocator

The physical memory allocator now uses a buddy allocator instead of a stack.

Also moved some of the platform-independent context code to kernel.c.
This commit is contained in:
2022-08-23 13:00:26 -05:00
parent 54e2beefc1
commit bacedbea86
10 changed files with 314 additions and 156 deletions

View File

@@ -7,8 +7,8 @@
.type load_context, @function
load_context:
mov 4(%esp), %eax
push 0x1C(%eax)
push 0x20(%eax)
push 0x1C(%eax)
push 0x2C(%eax)
push 0x24(%eax)
push 0x28(%eax)
@@ -19,10 +19,11 @@ load_context:
mov 0x10(%eax), %edi
mov 0x14(%eax), %esi
mov 0x18(%eax), %ebp
mov 0x1C(%eax), %ax
mov 0x20(%eax), %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
pop %eax
iret
iret
.size load_context, . - load_context