[ros-diffs] [tkreuzer] 45466: [HAL] Add the x86 emulator to x86BiosCall. It can call into int 10 and executes a few instructions.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sat Feb 6 20:16:23 CET 2010


Author: tkreuzer
Date: Sat Feb  6 20:16:23 2010
New Revision: 45466

URL: http://svn.reactos.org/svn/reactos?rev=45466&view=rev
Log:
[HAL]
Add the x86 emulator to x86BiosCall. It can call into int 10 and executes a few instructions.

Removed:
    branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h
Modified:
    branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86bios.c
    branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild
    branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild

Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86bios.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86bios.c?rev=45466&r1=45465&r2=45466&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86bios.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86bios.c [iso-8859-1] Sat Feb  6 20:16:23 2010
@@ -254,7 +254,7 @@
     VmState.Flags.ReturnOnIret = 1;
 
     /* Call the x86 emulator */
-//    x86Emulator(&VmState);
+    x86Emulator(&VmState);
 
     /* Copy registers back to caller */
     *Registers = VmState.BiosRegisters;

Removed: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h?rev=45465&view=auto
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h (removed)
@@ -1,221 +1,0 @@
-
-typedef union
-{
-    USHORT Short;
-    ULONG Long;
-    struct
-    {
-        ULONG Cf:1;
-        ULONG Pf:1;
-        ULONG Af:1;
-        ULONG Zf:1;
-        ULONG Sf:1;
-        ULONG Tf:1;
-        ULONG If:1;
-        ULONG Df:1;
-        ULONG Of:1;
-        ULONG Iopl:3;
-        ULONG Nt:1;
-        ULONG Rf:1;
-        ULONG Vm:1;
-        ULONG Ac:1;
-        ULONG Vif:1;
-        ULONG Vip:1;
-        ULONG Id:1;
-    };
-} EFLAGS;
-
-typedef union
-{
-    ULONG Dword;
-    USHORT Word;
-    UCHAR Byte;
-    struct
-    {
-        UCHAR Low;
-        UCHAR High;
-    };
-} REGU;
-
-typedef union
-{
-    struct 
-    {
-        UCHAR mod:2;
-        UCHAR reg:3;
-        UCHAR rm:3;
-    };
-    UCHAR Byte;
-} MODRM;
-
-typedef struct
-{
-    union
-    {
-        ULONG Eax;
-        USHORT Ax;
-        struct
-        {
-            UCHAR Al;
-            UCHAR Ah;
-        };
-    };
-    union
-    {
-        ULONG Ecx;
-        USHORT Cx;
-        struct
-        {
-            UCHAR Cl;
-            UCHAR Ch;
-        };
-    };
-    union
-    {
-        ULONG Edx;
-        USHORT Dx;
-        struct
-        {
-            UCHAR Dl;
-            UCHAR Dh;
-        };
-    };
-    union
-    {
-        ULONG Ebx;
-        USHORT Bx;
-        struct
-        {
-            UCHAR Bl;
-            UCHAR Bh;
-        };
-    };
-    union
-    {
-        ULONG Ebp;
-        USHORT Bp;
-    };
-    union
-    {
-        ULONG Esi;
-        USHORT Si;
-    };
-    union
-    {
-        ULONG Edi;
-        USHORT Di;
-    };
-    union
-    {
-        struct
-        {
-            ULONG ReservedDsMBZ:4;
-            ULONG SegDs:16;
-        };
-        ULONG ShiftedDs;
-    };
-    union
-    {
-        struct
-        {
-            ULONG ReservedEsMBZ:4;
-            ULONG SegEs:16;
-        };
-        ULONG ShiftedEs;
-    };
-
-    /* Extended */
-    union
-    {
-        struct
-        {
-            ULONG ReservedCsMBZ:4;
-            ULONG SegCs:16;
-        };
-        ULONG ShiftedCs;
-    };
-    union
-    {
-        struct
-        {
-            ULONG ReservedSsMBZ:4;
-            ULONG SegSs:16;
-        };
-        ULONG ShiftedSs;
-    };
-    
-    union
-    {
-        struct
-        {
-            ULONG ReservedMsMBZ:4;
-            ULONG SegMs:16;
-        };
-        ULONG ShiftedMs;
-    };
-
-    union
-    {
-        ULONG Eip;
-        USHORT Ip;
-    };
-
-    union
-    {
-        ULONG Esp;
-        USHORT Sp;
-    };
-    
-    EFLAGS Eflags;
-
-} X86_REGISTERS, *PX86_REGISTERS;
-
-enum
-{
-    X86_VMFLAGS_RETURN_ON_IRET = 1,
-};
-
-typedef struct
-{
-    union
-    {
-        X86_BIOS_REGISTERS BiosRegisters;
-        X86_REGISTERS Registers;
-        REGU IndexedRegisters[8];
-    };
-    
-    struct
-    {
-        ULONG ReturnOnIret:1;
-    } Flags;
-    
-    PVOID MemBuffer;
-
-#if 1
-    PCHAR Mnemonic;
-    PCHAR DstReg;
-    PCHAR SrcReg;
-    ULONG SrcEncodung;
-    ULONG DstEncoding;
-    ULONG Length;
-#endif
-} X86_VM_STATE, *PX86_VM_STATE;
-
-enum
-{
-    PREFIX_SIZE_OVERRIDE    = 0x010001,
-    PREFIX_ADDRESS_OVERRIDE = 0x020002,
-    PREFIX_SEGMENT_CS       = 0x040004,
-    PREFIX_SEGMENT_DS       = 0x040008,
-    PREFIX_SEGMENT_ES       = 0x040010,
-    PREFIX_SEGMNET_FS       = 0x040020,
-    PREFIX_SEGMENT_GS       = 0x040040,
-    PREFIX_SEGMENT_SS       = 0x040080,
-    PREFIX_LOCK             = 0x080100,
-    PREFIX_REP              = 0x100200,
-} PREFIX_STATE;
-
-
-VOID
-NTAPI
-x86Emulator(PX86_VM_STATE VmState);

Modified: branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild?rev=45466&r1=45465&r2=45466&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] Sat Feb  6 20:16:23 2010
@@ -5,7 +5,6 @@
 		<include>include</include>
 		<include base="ntoskrnl">include</include>
 		<define name="_NTHAL_" />
-		<define name="_X86BIOS_" />
 		<directory name="generic">
 			<directory name="bus">
 				<file>bushndlr.c</file>
@@ -43,7 +42,6 @@
 					<file>misc.c</file>
 					<file>systimer.S</file>
 					<file>usage.c</file>
-					<file>x86bios.c</file>
 				</directory>
 			</if>
 		</directory>

Modified: branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild?rev=45466&r1=45465&r2=45466&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild [iso-8859-1] Sat Feb  6 20:16:23 2010
@@ -5,11 +5,14 @@
 	<bootstrap installbase="$(CDOUTPUT)" nameoncd="hal.dll" />
 	<include base="hal">include</include>
 	<include base="ntoskrnl">include</include>
+	<include base="x86emu">.</include>
 	<define name="_DISABLE_TIDENTS" />
 	<define name="_NTHAL_" />
+	<define name="_X86BIOS_" />
 	<library>hal_generic</library>
 	<library>hal_generic_up</library>
 	<library>ntoskrnl</library>
+	<library>x86emu</library>
 
 	<directory name="up">
 		<file>halinit_up.c</file>
@@ -21,4 +24,10 @@
 			<file>mps.S</file>
 		</directory>
 	</directory>
+	<directory name="generic">
+		<directory name="amd64">
+			<file>x86bios.c</file>
+		</directory>
+	</directory>
+
 </module>




More information about the Ros-diffs mailing list