From 6fb47e311b3b4369709939646940f3c5e5eaa1ac Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Mon, 11 May 2015 03:36:02 +0000 Subject: [PATCH] [NTVDM] 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 | 9 ++++----- reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.h | 1 - reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h | 7 ++----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c index a4ad7d2df6b..1f73d421d8e 100644 --- a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c +++ b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c @@ -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); - PDOS_REQUEST_HEADER RemoteRequest = FAR_POINTER(REQUEST_LOCATION); 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 */ - 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 */ - RtlMoveMemory(Request, RemoteRequest, Request->RequestLength); + RtlMoveMemory(Request, &Sda->Request, Request->RequestLength); /* Restore ES:BX */ setES(ES); diff --git a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.h b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.h index bc3ab6e24dc..9f163b924b7 100644 --- a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.h +++ b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.h @@ -12,7 +12,6 @@ /* 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) diff --git a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h index 1a3d5fc905e..616f4cbd75e 100644 --- a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h +++ b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h @@ -178,12 +178,9 @@ typedef struct _DOS_SDA BYTE ConsoleSwappedFlag; BYTE Int28CallOk; BYTE Int24AbortFlag; - DOS_RW_REQUEST ReadWriteRequest; + DOS_RW_REQUEST Request; 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]; -- 2.17.1