mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[NTVDM]
Implement EMS function AH = 59h (Get Expanded Memory Hardware Information). svn path=/trunk/; revision=67585
This commit is contained in:
parent
f619a2d270
commit
93e6fa1b01
2 changed files with 39 additions and 0 deletions
|
@ -361,6 +361,36 @@ static VOID WINAPI EmsIntHandler(LPWORD Stack)
|
|||
break;
|
||||
}
|
||||
|
||||
/* Get Expanded Memory Hardware Information */
|
||||
case 0x59:
|
||||
{
|
||||
if (getAL() == 0x00)
|
||||
{
|
||||
PEMS_HARDWARE_INFO HardwareInfo = (PEMS_HARDWARE_INFO)SEG_OFF_TO_PTR(getES(), getDI());
|
||||
|
||||
/* Return the hardware information */
|
||||
HardwareInfo->RawPageSize = EMS_PAGE_SIZE >> 4;
|
||||
HardwareInfo->AlternateRegSets = 0;
|
||||
HardwareInfo->ContextAreaSize = sizeof(Mapping);
|
||||
HardwareInfo->DmaRegisterSets = 0;
|
||||
HardwareInfo->DmaChannelOperation = 0;
|
||||
}
|
||||
else if (getAL() == 0x01)
|
||||
{
|
||||
/* Same as function AH = 42h */
|
||||
setAH(EMS_STATUS_OK);
|
||||
setBX(RtlNumberOfClearBits(&AllocBitmap));
|
||||
setDX(EmsTotalPages);
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("Invalid subfunction %02X for EMS function AH = 59h\n", getAL());
|
||||
setAH(EMS_STATUS_UNKNOWN_FUNCTION);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
DPRINT1("EMS function AH = %02X NOT IMPLEMENTED\n", getAH());
|
||||
|
|
|
@ -58,6 +58,15 @@ typedef struct _EMS_COPY_DATA
|
|||
USHORT DestSegment;
|
||||
} EMS_COPY_DATA, *PEMS_COPY_DATA;
|
||||
|
||||
typedef struct _EMS_HARDWARE_INFO
|
||||
{
|
||||
WORD RawPageSize;
|
||||
WORD AlternateRegSets;
|
||||
WORD ContextAreaSize;
|
||||
WORD DmaRegisterSets;
|
||||
WORD DmaChannelOperation;
|
||||
} EMS_HARDWARE_INFO, *PEMS_HARDWARE_INFO;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue