Ignore:
Timestamp:
Feb 10, 2001, 12:11:48 PM (25 years ago)
Author:
bird
Message:

Moved ldrCalls.h into the OS2Krnl.h tree as OS2KLDR.h.
Also moved the Ldr definitions from OS2Krnl.h and into OS2KLDR.h.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/include/OS2Krnl.h

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