source: trunk/src/win32k/include/probkrnl.h@ 4166

Last change on this file since 4166 was 4164, checked in by bird, 25 years ago

Merged in the Grace branch. New Win32k!

File size: 5.0 KB
Line 
1/* $Id: probkrnl.h,v 1.14 2000-09-02 21:08:04 bird Exp $
2 *
3 * Include file for ProbKrnl.
4 *
5 * Copyright (c) 1998-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 _ProbKrnl_h_
13#define _ProbKrnl_h_
14
15/*******************************************************************************
16* Defined Constants And Macros *
17*******************************************************************************/
18#define NBR_OF_KRNLIMPORTS 42 /* When this is changed make sure to */
19 /* update the arrays in d32init.c and */
20 /* probkrnl.c, make test faker in */
21 /* test.h and the appropriate fake.c */
22 /* fakea.asm. */
23#define MAX_LENGTH_NAME 32 /* Max length for the function. */
24
25/* Entry-Point Type flag */
26#define EPT_PROC 0x00 /* procedure - overload procedure*/
27#define EPT_PROCIMPORT 0x01 /* procedure 32bit - import only */
28#define EPT_VARIMPORT 0x02 /* variable/non-procedure 32bit */
29#define EPT_NOT_REQ 0x04 /* Not required flag. */
30#define EPT_32BIT 0x00 /* 32 bit entry-point */
31#define EPT_16BIT 0x80 /* 16 bit entry-point */
32#define EPT_BIT_MASK 0x80 /* Mask bit entry-point */
33#define EPT16BitEntry(a) (((a).fType & EPT_BIT_MASK) == EPT_16BIT)
34#define EPT32BitEntry(a) (((a).fType & EPT_BIT_MASK) == EPT_32BIT)
35
36/* 32bit types */
37#define EPT_PROC32 (EPT_PROC | EPT_32BIT)
38#define EPT_PROCIMPORT32 (EPT_PROCIMPORT | EPT_32BIT)
39#define EPT_PROCIMPORTNR32 (EPT_PROCIMPORT | EPT_32BIT | EPT_NOT_REQ)
40#define EPT_VARIMPORT32 (EPT_VARIMPORT | EPT_32BIT)
41
42/* 16bit types */
43#define EPT_PROC16 (EPT_PROC | EPT_16BIT) /* no implemented yet! */
44#define EPT_PROCIMPORT16 (EPT_PROCIMPORT | EPT_16BIT) /* far proc in calltab with a far jmp. */
45#define EPT_VARIMPORT16 (EPT_VARIMPORT | EPT_16BIT)
46
47
48/* Kernel type: SMP/UNI/W4 (flags matches KF_* in options.h) */
49#if 0
50#define TYPE_UNI 0x00 /* Any UNI processor kernel except Warp 4 fp13 and above. */
51#define TYPE_SMP 0x01 /* SMP Warp3 Adv. or Warp 4.5 SMP */
52#define TYPE_W4 0x02 /* Warp4 fp13 and above. */
53#endif
54
55
56/*******************************************************************************
57* Structures and Typedefs *
58*******************************************************************************/
59#pragma pack(1)
60typedef struct tagIMPORTKRNLSYM
61{
62 unsigned char fFound; /* This is set when name is found */
63 unsigned char iObject; /* Object number the name was found in*/
64 unsigned short int cchName; /* Length of the name (optmize search) (INPUT) */
65 unsigned char achName[MAX_LENGTH_NAME]; /* Name (INPUT) */
66 unsigned long int offObject; /* Offset into the object */
67 unsigned long int ulAddress; /* 32-bit flat address */
68 unsigned short int usSel; /* Select of the object */
69 unsigned char cbProlog; /* Size of the prolog needing to be exchanged */
70 unsigned char fType; /* Entry-Point Type Flags */
71} IMPORTKRNLSYM;
72#pragma pack()
73
74
75/*
76 * Database of kernel symbols.
77 */
78#pragma pack(1)
79typedef struct
80{
81 unsigned short usBuild; /* Build number */
82 unsigned short fKernel; /* Kernel flag (KF_* defines in options.h). */
83 unsigned char cObjects; /* Count of objects */
84 struct
85 {
86 unsigned char iObject; /* Object number. */
87 unsigned long offObject; /* offset into object of the symbol. */
88 } aSyms[NBR_OF_KRNLIMPORTS];
89
90} KRNLDBENTRY, *PKRNLDBENTRY;
91#pragma pack()
92
93
94
95/*******************************************************************************
96* Global Variables *
97* NOTE! These are only available at init time! *
98*******************************************************************************/
99extern IMPORTKRNLSYM DATA16_GLOBAL aImportTab[NBR_OF_KRNLIMPORTS]; /* Defined in ProbKrnl.c */
100extern char DATA16_GLOBAL szUsrSym[50]; /* Defined in ProbKrnl.c */
101extern KRNLDBENTRY DATA16_INIT aKrnlSymDB[]; /* Defined in symdb.c (for 16-bit usage) */
102
103#if defined(__IBMC__) || defined(__IBMCPP__)
104 #pragma map( aImportTab , "_aImportTab" )
105 #pragma map( szUsrSym , "_szUsrSym" )
106 #pragma map( aKrnlSymDB , "_aKrnlSymDB" )
107#endif
108
109#if defined(INCL_16) && defined(MAX_DISKDD_CMD) /* 16-bit only */
110int ProbeKernel(PRPINITIN pReqPack);
111
112#if 0 /*ndef CODE16_INIT*/
113#pragma alloc_text(CODE16_INIT, ProbeKernel)
114#endif
115
116#endif
117
118#endif
119
Note: See TracBrowser for help on using the repository browser.