Author: aandrejevic
Date: Wed May 6 23:06:28 2015
New Revision: 67585
URL:
http://svn.reactos.org/svn/reactos?rev=67585&view=rev
Log:
[NTVDM]
Implement EMS function AH = 59h (Get Expanded Memory Hardware Information).
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c
trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.h
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c [iso-8859-1] Wed May 6
23:06:28 2015
@@ -361,6 +361,36 @@
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());
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.h [iso-8859-1] Wed May 6
23:06:28 2015
@@ -58,6 +58,15 @@
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