mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 07:55:56 +00:00
[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
This commit is contained in:
parent
c7f19ff4c0
commit
6fb47e311b
3 changed files with 6 additions and 11 deletions
|
@ -47,23 +47,22 @@ static PDOS_REQUEST_HEADER DeviceRequest;
|
||||||
static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
|
static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
|
||||||
{
|
{
|
||||||
PDOS_DRIVER DriverBlock = (PDOS_DRIVER)FAR_POINTER(Driver);
|
PDOS_DRIVER DriverBlock = (PDOS_DRIVER)FAR_POINTER(Driver);
|
||||||
PDOS_REQUEST_HEADER RemoteRequest = FAR_POINTER(REQUEST_LOCATION);
|
|
||||||
WORD ES = getES();
|
WORD ES = getES();
|
||||||
WORD BX = getBX();
|
WORD BX = getBX();
|
||||||
|
|
||||||
/* Set ES:BX to the location of the request */
|
/* Set ES:BX to the location of the request */
|
||||||
setES(HIWORD(REQUEST_LOCATION));
|
setES(DOS_DATA_SEGMENT);
|
||||||
setBX(LOWORD(REQUEST_LOCATION));
|
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 */
|
/* Call the strategy routine, and then the interrupt routine */
|
||||||
Call16(HIWORD(Driver), DriverBlock->StrategyRoutine);
|
Call16(HIWORD(Driver), DriverBlock->StrategyRoutine);
|
||||||
Call16(HIWORD(Driver), DriverBlock->InterruptRoutine);
|
Call16(HIWORD(Driver), DriverBlock->InterruptRoutine);
|
||||||
|
|
||||||
/* Get the request structure from ES:BX */
|
/* Get the request structure from ES:BX */
|
||||||
RtlMoveMemory(Request, RemoteRequest, Request->RequestLength);
|
RtlMoveMemory(Request, &Sda->Request, Request->RequestLength);
|
||||||
|
|
||||||
/* Restore ES:BX */
|
/* Restore ES:BX */
|
||||||
setES(ES);
|
setES(ES);
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
/* DEFINITIONS ****************************************************************/
|
/* DEFINITIONS ****************************************************************/
|
||||||
|
|
||||||
#define MAX_DEVICE_NAME 8
|
#define MAX_DEVICE_NAME 8
|
||||||
#define REQUEST_LOCATION 0x00700100 // 0070:0100
|
|
||||||
#define DEVICE_CODE_SIZE 10
|
#define DEVICE_CODE_SIZE 10
|
||||||
#define DEVICE_PRIVATE_AREA(Driver) (Driver + sizeof(DOS_DRIVER) + DEVICE_CODE_SIZE)
|
#define DEVICE_PRIVATE_AREA(Driver) (Driver + sizeof(DOS_DRIVER) + DEVICE_CODE_SIZE)
|
||||||
|
|
||||||
|
|
|
@ -178,12 +178,9 @@ typedef struct _DOS_SDA
|
||||||
BYTE ConsoleSwappedFlag;
|
BYTE ConsoleSwappedFlag;
|
||||||
BYTE Int28CallOk;
|
BYTE Int28CallOk;
|
||||||
BYTE Int24AbortFlag;
|
BYTE Int24AbortFlag;
|
||||||
DOS_RW_REQUEST ReadWriteRequest;
|
DOS_RW_REQUEST Request;
|
||||||
DWORD DriverEntryPoint;
|
DWORD DriverEntryPoint;
|
||||||
DOS_IOCTL_RW_REQUEST IoctlRequest;
|
BYTE Unused2[44];
|
||||||
DOS_PEEK_REQUEST StatusRequest;
|
|
||||||
DWORD DeviceIoBuffer;
|
|
||||||
DWORD Unused2;
|
|
||||||
BYTE PspCopyType;
|
BYTE PspCopyType;
|
||||||
BYTE Unused3;
|
BYTE Unused3;
|
||||||
BYTE UserNumber[3];
|
BYTE UserNumber[3];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue