[NTVDM]
authorAleksandar Andrejevic <aandrejevic@reactos.org>
Mon, 11 May 2015 03:36:02 +0000 (03:36 +0000)
committerAleksandar Andrejevic <aandrejevic@reactos.org>
Mon, 11 May 2015 03:36:02 +0000 (03:36 +0000)
Use the SDA for storing the request in DosCallDriver.
Rename some more fields we aren't going to use to "Unused..." in the SDA.

svn path=/trunk/; revision=67651

reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c
reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.h
reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h

index a4ad7d2..1f73d42 100644 (file)
@@ -47,23 +47,22 @@ static PDOS_REQUEST_HEADER DeviceRequest;
 static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
 {
     PDOS_DRIVER DriverBlock = (PDOS_DRIVER)FAR_POINTER(Driver);
 static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
 {
     PDOS_DRIVER DriverBlock = (PDOS_DRIVER)FAR_POINTER(Driver);
-    PDOS_REQUEST_HEADER RemoteRequest = FAR_POINTER(REQUEST_LOCATION);
     WORD ES = getES();
     WORD BX = getBX();
 
     /* Set ES:BX to the location of the request */
     WORD ES = getES();
     WORD BX = getBX();
 
     /* Set ES:BX to the location of the request */
-    setES(HIWORD(REQUEST_LOCATION));
-    setBX(LOWORD(REQUEST_LOCATION));
+    setES(DOS_DATA_SEGMENT);
+    setBX(DOS_DATA_OFFSET(Sda.Request));
 
     /* Copy the request structure to ES:BX */
 
     /* Copy the request structure to ES:BX */
-    RtlMoveMemory(RemoteRequest, Request, Request->RequestLength);
+    RtlMoveMemory(&Sda->Request, Request, Request->RequestLength);
 
     /* Call the strategy routine, and then the interrupt routine */
     Call16(HIWORD(Driver), DriverBlock->StrategyRoutine);
     Call16(HIWORD(Driver), DriverBlock->InterruptRoutine);
 
     /* Get the request structure from ES:BX */
 
     /* Call the strategy routine, and then the interrupt routine */
     Call16(HIWORD(Driver), DriverBlock->StrategyRoutine);
     Call16(HIWORD(Driver), DriverBlock->InterruptRoutine);
 
     /* Get the request structure from ES:BX */
-    RtlMoveMemory(Request, RemoteRequest, Request->RequestLength);
+    RtlMoveMemory(Request, &Sda->Request, Request->RequestLength);
 
     /* Restore ES:BX */
     setES(ES);
 
     /* Restore ES:BX */
     setES(ES);
index bc3ab6e..9f163b9 100644 (file)
@@ -12,7 +12,6 @@
 /* DEFINITIONS ****************************************************************/
 
 #define MAX_DEVICE_NAME 8
 /* DEFINITIONS ****************************************************************/
 
 #define MAX_DEVICE_NAME 8
-#define REQUEST_LOCATION 0x00700100 // 0070:0100
 #define DEVICE_CODE_SIZE 10
 #define DEVICE_PRIVATE_AREA(Driver) (Driver + sizeof(DOS_DRIVER) + DEVICE_CODE_SIZE)
 
 #define DEVICE_CODE_SIZE 10
 #define DEVICE_PRIVATE_AREA(Driver) (Driver + sizeof(DOS_DRIVER) + DEVICE_CODE_SIZE)
 
index 1a3d5fc..616f4cb 100644 (file)
@@ -178,12 +178,9 @@ typedef struct _DOS_SDA
     BYTE ConsoleSwappedFlag;
     BYTE Int28CallOk;
     BYTE Int24AbortFlag;
     BYTE ConsoleSwappedFlag;
     BYTE Int28CallOk;
     BYTE Int24AbortFlag;
-    DOS_RW_REQUEST ReadWriteRequest;
+    DOS_RW_REQUEST Request;
     DWORD DriverEntryPoint;
     DWORD DriverEntryPoint;
-    DOS_IOCTL_RW_REQUEST IoctlRequest;
-    DOS_PEEK_REQUEST StatusRequest;
-    DWORD DeviceIoBuffer;
-    DWORD Unused2;
+    BYTE Unused2[44];
     BYTE PspCopyType;
     BYTE Unused3;
     BYTE UserNumber[3];
     BYTE PspCopyType;
     BYTE Unused3;
     BYTE UserNumber[3];