mirror of
https://github.com/reactos/reactos.git
synced 2024-07-28 15:19:09 +00:00
[NTVDM]
- Do not hardcode the number of XMS memory blocks that can map the HMA. It should be function of the MAX_ADDRESS value of our emulator. - Require that MAX_ADDRESS should be greater or equal than 1 MB. svn path=/trunk/; revision=69323
This commit is contained in:
parent
9e06c66b38
commit
81b8c2bb92
|
@ -13,8 +13,8 @@
|
|||
/* DEFINITIONS ****************************************************************/
|
||||
|
||||
#define XMS_ADDRESS 0x110000 // Just above HMA
|
||||
#define XMS_BLOCKS 0x3BC0 // XMS_ADDRESS + (XMS_BLOCKS * XMS_BLOCK_SIZE) == 16 MB
|
||||
#define XMS_BLOCK_SIZE 1024
|
||||
#define XMS_BLOCKS ((MAX_ADDRESS - XMS_ADDRESS) / XMS_BLOCK_SIZE)
|
||||
#define XMS_MAX_HANDLES 16 // Specification: min 1, max 128, default 32
|
||||
|
||||
#define XMS_STATUS_SUCCESS 0x00
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define MAX_SEGMENT 0xFFFF
|
||||
#define MAX_OFFSET 0xFFFF
|
||||
#define MAX_ADDRESS 0x1000000 // 16 MB of RAM; see also: kernel32/client/vdm.c!BaseGetVdmConfigInfo
|
||||
C_ASSERT(0x100000 <= MAX_ADDRESS); // A minimum of 1 MB is required for PC emulation.
|
||||
|
||||
#define SEG_OFF_TO_PTR(seg, off) \
|
||||
(PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR((seg), (off)))
|
||||
|
|
Loading…
Reference in a new issue