aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-08-14 22:22:12 +0200
committerXander <xander@biltopia.org>2023-08-14 22:22:12 +0200
commit6abd5eb3a9eb3fa30599b6564e6db53b2cc8da8c (patch)
treec653b53d3ec16728489ba396f2d2c3fee9eeaadb
parentae3ad4d8b7004f17376ee0a8bfae931788194b8b (diff)
downloadats-os-6abd5eb3a9eb3fa30599b6564e6db53b2cc8da8c.tar.xz
ats-os-6abd5eb3a9eb3fa30599b6564e6db53b2cc8da8c.zip
No dynamic load in main
-rw-r--r--arch/x86_64/boot/long_mode_init.asm3
-rw-r--r--kernel/main.dats9
2 files changed, 4 insertions, 8 deletions
diff --git a/arch/x86_64/boot/long_mode_init.asm b/arch/x86_64/boot/long_mode_init.asm
index 4b0e023..22e7fd4 100644
--- a/arch/x86_64/boot/long_mode_init.asm
+++ b/arch/x86_64/boot/long_mode_init.asm
@@ -14,7 +14,4 @@ long_mode_start:
extern main
call main
- extern entry
- call entry
-
hlt
diff --git a/kernel/main.dats b/kernel/main.dats
index bbac122..65cb8df 100644
--- a/kernel/main.dats
+++ b/kernel/main.dats
@@ -5,6 +5,8 @@ staload BOOT = "kernel/bootinfo/multiboot.sats"
staload FRAME = "kernel/memory/frame.sats"
staload "lib/SATS/writer.sats"
+#define ATS_DYNLOADFLAG 0
+
%{^
void breakpoint(){
__asm__("int3");
@@ -35,8 +37,8 @@ end
extern fun breakpoint() :void = "mac#"
-extern fun entry(p : Ptr1) : void = "ext#"
-implement entry(p) = let
+extern fun main(p : Ptr1) : void = "ext#"
+implement main(p) = let
val () = $BOOT.init(p);
val (kernel_start,kernel_end) = $BOOT.get_kernel_ranges()
val (multiboot_start,multiboot_end) = $BOOT.get_multiboot_ranges()
@@ -64,6 +66,3 @@ in
println!("End");
end
-// Satisfy ats compiler. Should be called once to dynload files
-implement main(argv,argc) = 0
-