ReactOS 0.4.15-dev-8093-g3285f69
himem.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: GPLv2+ - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: subsystems/mvdm/ntvdm/dos/dos32krnl/himem.h
5 * PURPOSE: DOS XMS Driver and UMB Provider
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8 */
9
10#ifndef _HIMEM_H_
11#define _HIMEM_H_
12
13/* DEFINITIONS ****************************************************************/
14
15#define XMS_ADDRESS 0x110000 // Just above HMA
16#define XMS_BLOCK_SIZE 1024
17#define XMS_BLOCKS ((MAX_ADDRESS - XMS_ADDRESS) / XMS_BLOCK_SIZE)
18#define XMS_MAX_HANDLES 16 // Specification: min 1, max 128, default 32
19
20#define XMS_STATUS_SUCCESS 0x00
21#define XMS_STATUS_NOT_IMPLEMENTED 0x80
22#define XMS_STATUS_A20_ERROR 0x82
23#define XMS_STATUS_HMA_DOES_NOT_EXIST 0x90
24#define XMS_STATUS_HMA_IN_USE 0x91
25#define XMS_STATUS_HMA_MIN_SIZE 0x92
26#define XMS_STATUS_HMA_NOT_ALLOCATED 0x93
27#define XMS_STATUS_A20_STILL_ENABLED 0x94
28#define XMS_STATUS_OUT_OF_MEMORY 0xA0
29#define XMS_STATUS_OUT_OF_HANDLES 0xA1
30#define XMS_STATUS_INVALID_HANDLE 0xA2
31#define XMS_STATUS_BAD_SRC_HANDLE 0xA3
32#define XMS_STATUS_BAD_DEST_HANDLE 0xA4
33#define XMS_STATUS_BAD_SRC_OFFSET 0xA5
34#define XMS_STATUS_BAD_DEST_OFFSET 0xA6
35#define XMS_STATUS_NOT_LOCKED 0xAA
36#define XMS_STATUS_LOCKED 0xAB
37#define XMS_STATUS_LOCK_OVERFLOW 0xAC
38#define XMS_STATUS_CANNOT_LOCK 0xAD
39#define XMS_STATUS_SMALLER_UMB 0xB0
40#define XMS_STATUS_OUT_OF_UMBS 0xB1
41#define XMS_STATUS_INVALID_UMB 0xB2
42
43typedef struct _XMS_HANDLE
44{
50
51#pragma pack(push, 1)
52typedef struct _XMS_COPY_DATA
53{
60#pragma pack(pop)
61
62/* FUNCTIONS ******************************************************************/
63
67
68#endif /* _HIMEM_H_ */
unsigned char BOOLEAN
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
struct _XMS_HANDLE * PXMS_HANDLE
struct _XMS_COPY_DATA * PXMS_COPY_DATA
VOID XmsCleanup(VOID)
Definition: himem.c:814
BOOLEAN XmsGetDriverEntry(PDWORD Pointer)
Definition: himem.c:789
struct _XMS_COPY_DATA XMS_COPY_DATA
struct _XMS_HANDLE XMS_HANDLE
VOID XmsInitialize(VOID)
Definition: himem.c:796
DWORD * PDWORD
Definition: pedump.c:68
DWORD SourceOffset
Definition: himem.h:56
DWORD DestOffset
Definition: himem.h:58
WORD SourceHandle
Definition: himem.h:55
WORD DestHandle
Definition: himem.h:57
DWORD Count
Definition: himem.h:54
BYTE Handle
Definition: himem.h:45
WORD Size
Definition: himem.h:47
DWORD Address
Definition: himem.h:48
BYTE LockCount
Definition: himem.h:46
unsigned char BYTE
Definition: xxhash.c:193