[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 07/11] vm86: ist arch/i386 spezifisch



Signed-off-by: Andreas Freimuth <m.nemo@xxxxxxx>

--HG--
extra : rebase_source : 286b5db929305a221f3a7f57f740286238c87f46
---
 src/kernel2/src/init.c          |    4 +++-
 src/kernel2/src/interrupts/im.c |    2 ++
 src/kernel2/src/syscall.c       |    2 ++
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/kernel2/src/init.c b/src/kernel2/src/init.c
index fc9bebd..37c6397 100644
--- a/src/kernel2/src/init.c
+++ b/src/kernel2/src/init.c
@@ -101,9 +101,11 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp)
         }
     #endif
 
+#if CONFIG_ARCH == ARCH_I386
         // IVT fuer den VM86 sichern
         vm86_init();
-        
+#endif
+
         debug_print(DEBUG_FLAG_INIT, "Initialisiere physikalische"
             "Speicherverwaltung");
         pmm_init(&multiboot_info);
diff --git a/src/kernel2/src/interrupts/im.c b/src/kernel2/src/interrupts/im.c
index ce0d2c4..d266959 100644
--- a/src/kernel2/src/interrupts/im.c
+++ b/src/kernel2/src/interrupts/im.c
@@ -72,6 +72,7 @@ static void handle_exception(interrupt_stack_frame_t* isf, uint8_t int_num)
 //    kprintf("user_stack_bottom = %x\n",
 //        current_thread->user_stack_bottom);
 
+#if CONFIG_ARCH == ARCH_I386
     // Pruefen, ob ein VM86-Task die Exception ausgeloest hat
     // Falls ja lassen wir sie vom VM86-Code behandeln, wenn er kann
     if (isf->eflags & 0x20000) {
@@ -79,6 +80,7 @@ static void handle_exception(interrupt_stack_frame_t* isf, uint8_t int_num)
             return;
         }
     }
+#endif
 
     if (int_num == 0x0d) {
         // Pruefen, ob der #GP moeglicherweise durch eine nicht geladene
diff --git a/src/kernel2/src/syscall.c b/src/kernel2/src/syscall.c
index 5a4aad4..2069738 100644
--- a/src/kernel2/src/syscall.c
+++ b/src/kernel2/src/syscall.c
@@ -95,8 +95,10 @@ void syscall_init()
     syscall_register(SYSCALL_SHM_ATTACH, &syscall_shm_attach, 1);
     syscall_register(SYSCALL_SHM_DETACH, &syscall_shm_detach, 1);
 
+#if CONFIG_ARCH == ARCH_I386
     syscall_register(SYSCALL_VM86, &syscall_vm86_old, 2);
     syscall_register(SYSCALL_VM86_BIOS_INT, &syscall_vm86, 3);
+#endif
 }
 
 /**
-- 
1.7.3.4