summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-02-24 14:47:25 -0600
committerDanny Holman <dholman@gymli.org>2024-02-24 14:55:51 -0600
commit891f1010bbdc1351bda8d2a6139094a14bdfd5e1 (patch)
treef8fcc9a273ca8df783aee243fcb3aa545887633c /arch
parent2ce0f8af51dae9e7d591ff5fd038f89d6ca9dbbe (diff)
kernel: string: add a strcpy function
Add an implmentation of strcpy. This function is used in several places in the kernel to copy strings between memory addresses. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/boot/boot.s16
-rw-r--r--arch/i386/kernel/timer.c1
2 files changed, 6 insertions, 11 deletions
diff --git a/arch/i386/boot/boot.s b/arch/i386/boot/boot.s
index 4b9106d..2d17f6a 100644
--- a/arch/i386/boot/boot.s
+++ b/arch/i386/boot/boot.s
@@ -76,25 +76,21 @@ _start:
1: hlt
jmp 1b
-.global load_page_dir
-.type load_page_dir, @function
-load_page_dir:
+.global enable_paging
+.type enable_paging, @function
+enable_paging:
pushl %ebp
movl %esp, %ebp
movl 8(%esp), %eax
movl %eax, %cr3
- movl %ebp, %esp
- popl %ebp
- ret
-
-.global enable_paging
-.type enable_paging, @function
-enable_paging:
movl %cr0, %eax
orl $0x80000001, %eax
movl %eax, %cr0
+
+ movl $0, %eax
+ popl %ebp
ret
.global flush_gdt
diff --git a/arch/i386/kernel/timer.c b/arch/i386/kernel/timer.c
index 4aafed1..e93c291 100644
--- a/arch/i386/kernel/timer.c
+++ b/arch/i386/kernel/timer.c
@@ -1,7 +1,6 @@
#include <kernel/timer.h>
#include <kernel/asm.h>
#include <kernel/pic.h>
-#include <kernel/sched.h>
static uint32_t num_ticks = 0;