Author: ion
Date: Mon Aug 21 07:49:02 2006
New Revision: 23637
URL:
http://svn.reactos.org/svn/reactos?rev=23637&view=rev
Log:
- Delete bios.c and usertrap.c
- Add Ke entries to KernelFun!
Removed:
trunk/reactos/ntoskrnl/ke/i386/bios.c
trunk/reactos/ntoskrnl/ke/i386/usertrap.c
Modified:
trunk/reactos/ntoskrnl/KrnlFun.c
trunk/reactos/ntoskrnl/ke/i386/trap.s
trunk/reactos/ntoskrnl/ke/i386/v86m.c
trunk/reactos/ntoskrnl/ntoskrnl.rbuild
Modified: trunk/reactos/ntoskrnl/KrnlFun.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=236…
==============================================================================
--- trunk/reactos/ntoskrnl/KrnlFun.c (original)
+++ trunk/reactos/ntoskrnl/KrnlFun.c Mon Aug 21 07:49:02 2006
@@ -24,6 +24,20 @@
// - Add Directory Lock.
// - Use Object Type Mutex/Lock.
//
+// Ke:
+// - Make sure IRQ trap code is synchronized with current trap code.
+// - Reimplement the V86 support using a mode that will be compatible with
+// VDM and the future and use ABIOS gates.
+// - Implement Invalid Opcode and GPD handlers for V86-mode.
+// - Implement stack fault and segment fault handlers.
+// - Implement kernel-mode GPF handler, possibly fixing below:
+// - Figure out why ES/DS gets messed up in VMWare, when doing KiServiceExit only,
+// and only when called from user-mode, and returning to user-mode.
+// - Figure out what the DEBUGEIP hack is for and how it can be moved away.
+// - Add DR macro/save and VM macro/save.
+// - Implement KiCallbackReturn, KiGetTickCount, KiRaiseAssertion.
+//
+//
// Ex:
// - Use pushlocks for handle implementation.
//
Removed: trunk/reactos/ntoskrnl/ke/i386/bios.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/bios.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/bios.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/bios.c (removed)
@@ -1,78 +1,0 @@
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: ntoskrnl/ke/i386/bios.c
- * PURPOSE: Support for calling the BIOS in v86 mode
- *
- * PROGRAMMERS: David Welch (welch(a)cwcom.net)
- */
-
-/* INCLUDES *****************************************************************/
-
-#include <ntoskrnl.h>
-#define NDEBUG
-#include <internal/debug.h>
-
-/* GLOBALS *******************************************************************/
-
-#define TRAMPOLINE_BASE (0x10000)
-
-extern VOID Ki386RetToV86Mode(PKV86M_REGISTERS InRegs,
- PKV86M_REGISTERS OutRegs);
-
-/* FUNCTIONS *****************************************************************/
-
-NTSTATUS STDCALL
-Ke386CallBios(ULONG Int, PCONTEXT regs)
-{
- PUCHAR Ip;
- KV86M_REGISTERS ORegs;
- NTSTATUS Status;
- PKV86M_REGISTERS Regs = (PKV86M_REGISTERS)regs;
-
- /*
- * Set up a trampoline for executing the BIOS interrupt
- */
- Ip = (PUCHAR)TRAMPOLINE_BASE;
- Ip[0] = 0xCD; /* int XX */
- Ip[1] = Int;
- Ip[2] = 0x63; /* arpl ax, ax */
- Ip[3] = 0xC0;
- Ip[4] = 0x90; /* nop */
- Ip[5] = 0x90; /* nop */
-
- /*
- * Munge the registers
- */
- Regs->Eip = 0;
- Regs->Cs = TRAMPOLINE_BASE / 16;
- Regs->Esp = 0xFFFF;
- Regs->Ss = TRAMPOLINE_BASE / 16;
- Regs->Eflags = (1 << 1) | (1 << 17) | (1 << 9); /* VM, IF */
- Regs->RecoveryAddress = TRAMPOLINE_BASE + 2;
- Regs->RecoveryInstruction[0] = 0x63; /* arpl ax, ax */
- Regs->RecoveryInstruction[1] = 0xC0;
- Regs->RecoveryInstruction[2] = 0x90; /* nop */
- Regs->RecoveryInstruction[3] = 0x90; /* nop */
- Regs->Flags = KV86M_EMULATE_CLI_STI | KV86M_ALLOW_IO_PORT_ACCESS;
- Regs->Vif = 1;
- Regs->PStatus = &Status;
-
- /*
- * Execute the BIOS interrupt
- */
- Ki386RetToV86Mode(Regs, &ORegs);
-
- /*
- * Copy the return values back to the caller
- */
- memcpy(Regs, &ORegs, sizeof(KV86M_REGISTERS));
-
- return(Status);
-}
-
-
-
-
-
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/trap.s (original)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s Mon Aug 21 07:49:02 2006
@@ -11,17 +11,6 @@
#include <asm.h>
#include <internal/i386/asmmacro.S>
.intel_syntax noprefix
-
-/*
- * FIXMEs:
- * - Implement kernel-mode GPF handler, possibly fixing below:
- * - Figure out why ES/DS gets messed up in VMWare, when doing KiServiceExit
only,
- * and only when called from user-mode, and returning to user-mode.
- * - Implement Invalid Opcode handler.
- * - Figure out what the DEBUGEIP hack is for and how it can be moved away.
- * - Add DR macro/save and VM macro/save.
- * - Implement KiCallbackReturn, KiGetTickCount, KiRaiseAssertion.
- */
/* GLOBALS ******************************************************************/
Removed: trunk/reactos/ntoskrnl/ke/i386/usertrap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/usertrap.…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/usertrap.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/usertrap.c (removed)
@@ -1,1 +1,0 @@
-
Modified: trunk/reactos/ntoskrnl/ke/i386/v86m.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/v86m.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/v86m.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/v86m.c Mon Aug 21 07:49:02 2006
@@ -23,6 +23,10 @@
#define VALID_FLAGS (0xDFF)
+#define TRAMPOLINE_BASE (0x10000)
+
+VOID Ki386RetToV86Mode(KV86M_REGISTERS* InRegs,
+ KV86M_REGISTERS* OutRegs);
/* FUNCTIONS *****************************************************************/
ULONG
@@ -807,5 +811,52 @@
}
}
-
-
+NTSTATUS STDCALL
+Ke386CallBios(ULONG Int, PCONTEXT regs)
+{
+ PUCHAR Ip;
+ KV86M_REGISTERS ORegs;
+ NTSTATUS Status;
+ PKV86M_REGISTERS Regs = (PKV86M_REGISTERS)regs;
+
+ /*
+ * Set up a trampoline for executing the BIOS interrupt
+ */
+ Ip = (PUCHAR)TRAMPOLINE_BASE;
+ Ip[0] = 0xCD; /* int XX */
+ Ip[1] = Int;
+ Ip[2] = 0x63; /* arpl ax, ax */
+ Ip[3] = 0xC0;
+ Ip[4] = 0x90; /* nop */
+ Ip[5] = 0x90; /* nop */
+
+ /*
+ * Munge the registers
+ */
+ Regs->Eip = 0;
+ Regs->Cs = TRAMPOLINE_BASE / 16;
+ Regs->Esp = 0xFFFF;
+ Regs->Ss = TRAMPOLINE_BASE / 16;
+ Regs->Eflags = (1 << 1) | (1 << 17) | (1 << 9); /* VM, IF */
+ Regs->RecoveryAddress = TRAMPOLINE_BASE + 2;
+ Regs->RecoveryInstruction[0] = 0x63; /* arpl ax, ax */
+ Regs->RecoveryInstruction[1] = 0xC0;
+ Regs->RecoveryInstruction[2] = 0x90; /* nop */
+ Regs->RecoveryInstruction[3] = 0x90; /* nop */
+ Regs->Flags = KV86M_EMULATE_CLI_STI | KV86M_ALLOW_IO_PORT_ACCESS;
+ Regs->Vif = 1;
+ Regs->PStatus = &Status;
+
+ /*
+ * Execute the BIOS interrupt
+ */
+ Ki386RetToV86Mode(Regs, &ORegs);
+
+ /*
+ * Copy the return values back to the caller
+ */
+ memcpy(Regs, &ORegs, sizeof(KV86M_REGISTERS));
+
+ return(Status);
+}
+
Modified: trunk/reactos/ntoskrnl/ntoskrnl.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.rbuild?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.rbuild (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.rbuild Mon Aug 21 07:49:02 2006
@@ -27,7 +27,6 @@
<if property="ARCH" value="i386">
<directory name="i386">
<file first="true">main_asm.S</file>
- <file>bios.c</file>
<file>cpu.S</file>
<file>ctxswitch.S</file>
<file>exp.c</file>
@@ -41,7 +40,6 @@
<file>trap.s</file>
<file>tss.c</file>
<file>usercall_asm.S</file>
- <file>usertrap.c</file>
<file>v86m.c</file>
<file>v86m_sup.S</file>
<file>vdm.c</file>