source: trunk/src/win32k/include/OS2Krnl.h@ 1504

Last change on this file since 1504 was 1467, checked in by bird, 26 years ago

Corrections to make win32k work.
(And now it does work, at least at my test machine...)

File size: 9.6 KB
Line 
1/* $Id: OS2Krnl.h,v 1.2 1999-10-27 02:02:55 bird Exp $
2 *
3 * OS/2 kernel structures, typedefs and macros.
4 *
5 */
6
7#ifndef _OS2Krnl_h_
8#define _OS2Krnl_h_
9
10#pragma pack(1)
11
12#ifdef RING0
13 typedef USHORT SFN, *PSFN; /* system file number */
14#else
15 #define SFN HFILE
16 #define PSFN PHFILE
17#endif
18
19typedef struct OTE
20{
21 ULONG ote_size; /* Object virtual size */
22 ULONG ote_base; /* Object base virtual address */
23 ULONG ote_flags; /* Attribute flags */
24 ULONG ote_pagemap; /* Object page map index */
25 ULONG ote_mapsize; /* Num of entries in obj page map */
26 /*ULONG ote_reserved;*/
27 USHORT ote_hob; /* Object Handle */
28 USHORT ote_sel; /* Object Selector */
29} OTE, *POTE;
30
31
32/* ote_flags */
33#ifndef __EXE386__
34 #define OBJREAD 0x00000001L /* Readable Object */
35 #define OBJWRITE 0x00000002L /* Writeable Object */
36 #define OBJEXEC 0x00000004L /* Executable Object */
37 #define OBJRSRC 0x00000008L /* Resource Object */
38 #define OBJDISCARD 0x00000010L /* Object is Discardable */
39 #define OBJSHARED 0x00000020L /* Object is Shared */
40 #define OBJPRELOAD 0x00000040L /* Object has preload pages */
41 #define OBJINVALID 0x00000080L /* Object has invalid pages */
42#endif
43#define OBJZEROFIL 0x00000100L /* Object has zero-filled pages */
44#ifndef __EXE386__
45 #define OBJRESIDENT 0x00000200L /* Object is resident */
46 #define OBJCONTIG 0x00000300L /* Object is resident and contiguous */
47 #define OBJDYNAMIC 0x00000400L /* Object is permanent and long locable */
48 #define OBJTYPEMASK 0x00000700L /* Object type mask */
49 #define OBJALIAS16 0x00001000L /* 16:16 alias required */
50 #define OBJBIGDEF 0x00002000L /* Big/Default bit setting */
51 #define OBJCONFORM 0x00004000L /* Object is conforming for code */
52 #define OBJIOPL 0x00008000L /* Object I/O privilege level */
53#endif
54#define OBJMADEPRIV 0x40000000L /* Object is made private for debug (now obsolete) */
55#define OBJALLOC 0x80000000L /* Object is allocated used by loader */
56
57
58
59
60
61
62/*************************/
63/* warp 3.0 AS SMTEs */
64/* Swap ModuleTableEntry */
65/*************************/
66typedef struct SMTE
67{
68 /* lxheader fields */
69 /*- magic,border,worder,level,cpu,os,ver,mflags */
70 ULONG smte_mpages; /* 00 Module # pages */
71 ULONG smte_startobj; /* 04 Object # for instruction */
72 ULONG smte_eip; /* 08 Extended instruction pointer */
73 ULONG smte_stackobj; /* 0c Object # for stack pointer */
74 ULONG smte_esp; /* 10 Extended stack pointer */
75 /*- pagesize*/
76 ULONG smte_pageshift; /* 14 Page alignment shift in .EXE */
77 ULONG smte_fixupsize; /* 18 Fixup section size */
78 /*- fixupsum,ldrsize,ldrsum*/
79 POTE smte_objtab; /* 1c Object table offset - POINTER */
80 ULONG smte_objcnt; /* 20 Number of objects in module */
81 ULONG smte_objmap; /* 24 Object page map offset - POINTER */
82 ULONG smte_itermap; /* 28 Object iterated data map offset */
83 ULONG smte_rsrctab; /* 2c Offset of Resource Table */
84 ULONG smte_rsrccnt; /* 30 Number of resource entries */
85 ULONG smte_restab; /* 34 Offset of resident name table - POINTER */
86 ULONG smte_enttab; /* 38 Offset of Entry Table - POINTER */
87 ULONG smte_fpagetab; /* 3c Offset of Fixup Page Table - POINTER */
88 ULONG smte_frectab; /* 40 Offset of Fixup Record Table - POINTER */
89 ULONG smte_impmod; /* 44 Offset of Import Module Name Table - POINTER */
90 /*- impmodcnt*/
91 ULONG smte_impproc; /* 48 Offset of Imp Procedure Name Tab - POINTER */
92 /*- pagesum*/
93 ULONG smte_datapage; /* 4c Offset of Enumerated Data Pages */
94 /*- preload*/
95 ULONG smte_nrestab; /* 50 Offset of Non-resident Names Table */
96 ULONG smte_cbnrestab; /* 54 Size of Non-resident Name Table */
97 /*- nressum*/
98 ULONG smte_autods; /* 58 Object # for automatic data object */
99 ULONG smte_debuginfo; /* 5c Offset of the debugging info */
100 ULONG smte_debuglen; /* 60 The len of the debug info in */
101 /*- instpreload,instdemand*/
102 ULONG smte_heapsize; /* 64 use for converted 16-bit modules */
103 /*- res3*/
104 /* extra */
105 PCHAR smte_path; /* 68 full pathname - POINTER */
106 USHORT smte_semcount; /* 6c Count of threads waiting on MTE semaphore. 0 => semaphore is free */
107 USHORT smte_semowner; /* 6e Slot number of the owner of MTE semahore */
108 ULONG smte_pfilecache; /* 70 Pointer to file cache for Dos32CacheModule */
109 ULONG smte_stacksize; /* 74 Thread 1 Stack size from the exe header */
110 USHORT smte_alignshift; /* 78 use for converted 16-bit modules */
111 USHORT smte_NEexpver; /* 7a expver from NE header */
112 USHORT smte_pathlen; /* 7c length of full pathname */
113 USHORT smte_NEexetype; /* 7e exetype from NE header */
114 USHORT smte_csegpack; /* 80 count of segs to pack */
115} SMTE, *PSMTE;
116
117
118
119
120
121
122
123
124/********************/
125/* warp 3.0 GA MTEs */
126/* ModuleTableEntry */
127/********************/
128typedef struct MTE
129{
130 USHORT mte_flags2;
131 USHORT mte_handle;
132 PSMTE mte_swapmte; /* handle for swapmte */
133 struct MTE * mte_link;
134 ULONG mte_flags1;
135 ULONG mte_impmodcnt; /* number of entries in Import Module Name Table*/
136 SFN mte_sfn; /*"filehandle"*/
137 USHORT mte_usecnt; /* (.EXE only) - use count */
138 CHAR mte_modname[8];
139}MTE,*PMTE,**PPMTE;
140
141
142
143/***********/
144/* flags 1 */
145/***********/
146 #define NOAUTODS 0x00000000 /* No Auto DS exists */
147 #define SOLO 0x00000001 /* Auto DS is shared */
148 #define INSTANCEDS 0x00000002 /* Auto DS is not shared */
149 #define INSTLIBINIT 0x00000004 /* Perinstance Libinit */
150 #define GINISETUP 0x00000008 /* Global Init has been setup */
151 #define NOINTERNFIXUPS 0x00000010 /* internal fixups in .EXE.DLL applied */
152 #define NOEXTERNFIXUPS 0x00000020 /* external fixups in .EXE.DLL applied */
153 #define CLASS_PROGRAM 0x00000040 /* Program class */
154 #define CLASS_GLOBAL 0x00000080 /* Global class */
155 #define CLASS_SPECIFIC 0x000000C0 /* Specific class, as against global */
156 #define CLASS_ALL 0x00000000 /* nonspecific class all modules */
157 #define CLASS_MASK 0x000000C0 /* */
158 #define MTEPROCESSED 0x00000100 /* MTE being loaded */
159 #define USED 0x00000200 /* MTE is referenced see ldrgc.c */
160 #define DOSLIB 0x00000400 /* set if DOSCALL1 */
161 #define DOSMOD 0x00000800 /* set if DOSCALLS */
162 #define MTE_MEDIAFIXED 0x00001000 /* File Media permits discarding */
163 #define LDRINVALID 0x00002000 /* module not loadable */
164 #define PROGRAMMOD 0x00000000 /* program module */
165 #define DEVDRVMOD 0x00004000 /* device driver module */
166 #define LIBRARYMOD 0x00008000 /* DLL module */
167 #define VDDMOD 0x00010000 /* VDD module */
168 #define MVDMMOD 0x00020000 /* Set if VDD Helper MTE (MVDM.DLL) */
169 #define INGRAPH 0x00040000 /* In Module Graph see ldrgc.c */
170 #define GINIDONE 0x00080000 /* Global Init has finished */
171 #define MTEADDRALLOCED 0x00100000 /* Allocate specific or not */
172 #define FSDMOD 0x00200000 /* FSD MTE */
173 #define FSHMOD 0x00400000 /* FS helper MTE */
174 #define MTELONGNAMES 0x00800000 /* Module supports longnames */
175 #define MTE_MEDIACONTIG 0x01000000 /* File Media contiguous memory req */
176 #define MTE_MEDIA16M 0x02000000 /* File Media requires mem below 16M */
177 #define MTESWAPONLOAD 0x04000000 /* make code pages swap on load */
178 #define MTEPORTHOLE 0x08000000 /* porthole module */
179 #define MTEMODPROT 0x10000000 /* Module has shared memory protected */
180 #define MTENEWMOD 0x20000000 /* Newly added module */
181 #define MTEDLLTERM 0x40000000 /* Gets instance termination */
182 #define MTESYMLOADED 0x80000000 /* Set if debugger symbols loaded */
183
184
185/***********/
186/* flags 2 */
187/***********/
188 #define MTEFORMATMASK 0x0003 /* Module format mask */
189 #define MTEFORMATR1 0x0000 /* Module format reserved */
190 #define MTEFORMATNE 0x0001 /* Module format NE */
191 #define MTEFORMATLX 0x0002 /* Module format LX */
192 #define MTEFORMATR2 0x0003 /* Module format reserved */
193 #define MTESYSTEMDLL 0x0004 /* DLL exists in system list */
194 #define MTELOADORATTACH 0x0008 /* Module under load or attach for init */
195 #define MTECIRCLEREF 0x0010 /* Module circular reference detection */
196 #define MTEFREEFIXUPS 0x0020 /* Free system mte's fixup flag d#98488 */
197 #define MTEPRELOADED 0x0040 /* MTE Preload completed */
198 #define MTEGETMTEDONE 0x0080 /* GetMTE already resolved */
199 #define MTEPACKSEGDONE 0x0100 /* Segment packed memory allocated */
200 #define MTE20LIELIST 0x0200 /* Name present in version20 lie list */
201 #define MTESYSPROCESSED 0x0400 /* System DLL already processed */
202 #define MTEDLLONEXTLST 0x1000 /* DLL has term routine on exit list #74177 */
203
204
205
206
207
208#pragma pack()
209#endif
Note: See TracBrowser for help on using the repository browser.