| 1 | /* $Id: OS2KVM.h,v 1.2 2000-02-15 23:39:19 bird Exp $
|
|---|
| 2 | *
|
|---|
| 3 | * OS/2 kernel VM functions.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
|
|---|
| 6 | *
|
|---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 | #ifndef _OS2KVM_h_
|
|---|
| 13 | #define _OS2KVM_h_
|
|---|
| 14 |
|
|---|
| 15 | /*******************************************************************************
|
|---|
| 16 | * Defined Constants And Macros *
|
|---|
| 17 | *******************************************************************************/
|
|---|
| 18 | /*
|
|---|
| 19 | * VMAlloc flFlag1 guessings
|
|---|
| 20 | */
|
|---|
| 21 | #define VMA_CONTIG 0x00000001 /* VMDHA_CONTIG */
|
|---|
| 22 | #define VMA_WRITE 0x00000002 /* PAG_WRITE and OB_WRITE */
|
|---|
| 23 | #define VMA_USER 0x00000004 /* OB_USER */
|
|---|
| 24 | #define VMA_EXECUTE 0x00000008 /* PAG_EXECUTE and OB_READ !! */
|
|---|
| 25 | #define VMA_READ 0x00000010 /* PAG_READ and OB_EXEC !! */
|
|---|
| 26 | #define VMA_LOWMEM 0x00000020 /* OB_LOWMEM */
|
|---|
| 27 | #define VMA_GUARD 0x00000040 /* PAG_GUARD and VMDHA_16M and OB_GUARD */
|
|---|
| 28 | #define VMA_RESIDENT 0x00000080 /* OB_RESIDENT */
|
|---|
| 29 | #define VMA_ZEROINIT 0x00000100 /* OB_ZEROINIT */
|
|---|
| 30 | #define VMA_PHYS 0x00000200 /* VMDHA_PHYS */
|
|---|
| 31 | #define VMA_FIXED 0x00000400 /* VMDHA_FIXED and OB_SHARED */
|
|---|
| 32 | #define VMA_SHARE 0x00001000 /* OBJSHARE and OBJEXEC (which implies shared) */
|
|---|
| 33 | #define VMA_PROTECTED 0x00004000 /* PAG_PROTECTED */
|
|---|
| 34 | #define VMA_LOWMEM2 0x00010000 /* OB_LOWMEM */
|
|---|
| 35 | #define VMA_DECOMMIT 0x00080000 /* PAG_DECOMMIT */
|
|---|
| 36 | #define VMA_TILE 0x00400000 /* OBJ_TILE */
|
|---|
| 37 | #define VMA_SHRINKABLE 0x00800000 /* OB_SHRINKABLE */
|
|---|
| 38 | #define VMA_HUGH 0x01000000 /* OB_HUGH */
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 | /*
|
|---|
| 42 | * VMAlloc flFlags2 guessings
|
|---|
| 43 | */
|
|---|
| 44 | #define VMAF2_WRITE 0x00000002 /* PAG_WRITE */
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 | /*******************************************************************************
|
|---|
| 48 | * Structures and Typedefs *
|
|---|
| 49 | *******************************************************************************/
|
|---|
| 50 | typedef struct _vmac
|
|---|
| 51 | {
|
|---|
| 52 | ULONG ac_va; /* off=0 cb=4 Virtual Address. */
|
|---|
| 53 | USHORT ac_sel; /* off=4 cb=2 Selector. */
|
|---|
| 54 | USHORT ac_hob; /* off=6 cb=2 Object handle. */
|
|---|
| 55 | } VMAC, *PVMAC;
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 | /*******************************************************************************
|
|---|
| 60 | * Exported Functions *
|
|---|
| 61 | *******************************************************************************/
|
|---|
| 62 | APIRET KRNLCALL VMAllocMem(
|
|---|
| 63 | ULONG cbSize,
|
|---|
| 64 | ULONG SomeArg1,
|
|---|
| 65 | ULONG flFlags1,
|
|---|
| 66 | USHORT hPTDA,
|
|---|
| 67 | USHORT usVMOwnerId,
|
|---|
| 68 | USHORT hMTE,
|
|---|
| 69 | ULONG flFlags2,
|
|---|
| 70 | ULONG SomeArg2,
|
|---|
| 71 | PVMAC pvmac);
|
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 | #endif
|
|---|