]> code.bitgloo.com Git - clyne/osdev.git/commitdiff
some fixes
authorClyne Sullivan <clyne@bitgloo.com>
Sun, 29 Sep 2024 12:51:32 +0000 (08:51 -0400)
committerClyne Sullivan <clyne@bitgloo.com>
Sun, 29 Sep 2024 12:51:32 +0000 (08:51 -0400)
Makefile
idt.cpp
link.ld

index cb089919eb0c7023fc8fce7d525f81b5cc1e5a87..284f931e0fc3b75a6a45c52845ca3fb800397ecb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -39,5 +39,5 @@ clean:
 
 run: myos.iso
        @echo "  QEMU"
-       @qemu-system-i386 -drive file=$<,index=2,media=cdrom -monitor stdio -no-reboot #-s -S #-d int
+       @qemu-system-i386 -drive file=$<,index=2,media=cdrom -monitor stdio -no-reboot -s -S #-d int
 
diff --git a/idt.cpp b/idt.cpp
index de15ec9ca840dea87b121bdd0250a413d878806b..8c4a796bb431b392189d1c42beb6321ca5b92086 100644 (file)
--- a/idt.cpp
+++ b/idt.cpp
@@ -62,8 +62,8 @@ struct StubEntry
 
         asm volatile(R"(
             pusha
-            mov %%ds, %%ax
-            push %%ax
+            mov %%ds, %%eax
+            push %%eax
             mov $0x10, %%ax
             mov %%ax, %%ds
             mov %%ax, %%es
@@ -73,7 +73,7 @@ struct StubEntry
             cld
             call interruptGeneralHandler
             pop %%eax
-            pop %%ax
+            pop %%eax
             mov %%ax, %%ds
             mov %%ax, %%es
             mov %%ax, %%fs
diff --git a/link.ld b/link.ld
index 7e61bf342c4319d030b3b2d5a6b10daabc89392f..074caf7040066e5e0cf68472c6773084faeb72d1 100644 (file)
--- a/link.ld
+++ b/link.ld
@@ -34,12 +34,12 @@ SECTIONS
                *(.rodata)
        }
 
-        .init_array :
-        {
-            __init_array_start = .;
-            *(.init_array)
-            __init_array_end = .;
-        }
+    .init_array :
+    {
+        __init_array_start = .;
+        *(.init_array)
+        __init_array_end = .;
+    }
 
        /* Read-write data (initialized) */
        .data BLOCK(4K) : ALIGN(4K)
@@ -58,9 +58,9 @@ SECTIONS
           a segment with the same name. Simply add stuff here as needed. */
 
        .note :
-        {
-            *(.note)
-            *(.note*)
-        }
+    {
+        *(.note)
+        *(.note*)
+    }
 }