source: trunk/src/win32k/include/dev32.h

Last change on this file was 6225, checked in by bird, 24 years ago

Open/Close prototypes and structure stubs.

File size: 4.2 KB
RevLine 
[6225]1/* $Id: dev32.h,v 1.12 2001-07-08 03:03:14 bird Exp $
[1269]2 *
[847]3 * dev32 - header file for 32-bit part of the driver.
4 *
5 * Copyright (c) 1999 knut st. osmundsen
6 *
[1678]7 * Project Odin Software License can be found in LICENSE.TXT
8 *
[847]9 */
10#ifndef _dev32_h_
11#define _dev32_h_
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/*
18 * Wrapper for declaration from dev1632.h used in this file.
19 */
20#ifndef _dev1632_h_
[2799]21 #define RP32INIT void
22 #define PRP32INIT void *
23 #define RP32GENIOCTL void
24 #define PRP32GENIOCTL void *
[6225]25 #define RP32GENIOCTL void
26 #define PRP32GENIOCTL void *
27 #define RP32OPENCLOSE void
28 #define PRP32OPENCLOSE void *
[2898]29 #define PKRNLINFO void *
[847]30#endif
31
[2799]32
[847]33/*
34 * Defines from reqpkt.h.
35 */
36#define MAX_DISKDD_CMD 29
37
38#define STERR 0x8000 /* Bit 15 - Error */
39#define STINTER 0x0400 /* Bit 10 - Interim character */
40#define STBUI 0x0200 /* Bit 9 - Busy */
41#define STDON 0x0100 /* Bit 8 - Done */
42#define STECODE 0x00FF /* Error code */
43#define WRECODE 0x0000
44
45#define STATUS_DONE 0x0100
46#define STATUS_ERR_UNKCMD 0x8003
47
48
49#define RPF_Int13RP 0x01 /* Int 13 Request Packet */
50#define RPF_CallOutDone 0x02 /* Int 13 Callout completed */
51#define RPF_PktDiskIOTchd 0x04 /* Disk_IO has touched this packet */
52#define RPF_CHS_ADDRESSING 0x08 /* CHS Addressing used in RBA field */
53#define RPF_Internal 0x10 /* Internal request packet command */
54#define RPF_TraceComplete 0x20 /* Trace completion flag */
55
56
57/*
58 * Function prototypes.
59 */
[1467]60#if !defined(__cplusplus) && defined(RING0)
[847]61USHORT _loadds _Far32 _Pascal R0Init32(RP32INIT *pRpInit);
[2898]62USHORT _loadds _Far32 _Pascal GetKernelInfo32(PKRNLINFO pKrnlInfo);
[2832]63USHORT _loadds _Far32 _Pascal VerifyImportTab32(void);
[2799]64USHORT _loadds _Far32 _Pascal ElfIOCtl(PRP32GENIOCTL pRpIOCtl);
65USHORT _loadds _Far32 _Pascal Win32kIOCtl(PRP32GENIOCTL pRpIOCtl);
[6225]66USHORT _loadds _Far32 _Pascal Win32kOpen(PRP32OPENCLOSE pRpOpen);
67USHORT _loadds _Far32 _Pascal Win32kClose(PRP32OPENCLOSE pRpClose);
[847]68#endif
[5086]69#ifdef _OS2KLDR_H_
[1467]70PMTE _System GetOS2KrnlMTE(void); /* (devfirst.asm) */
71#endif
[5224]72ULONG _Optlink InitCallGate(void);
73ULONG _Optlink x86DisableWriteProtect(void);
74ULONG _Optlink x86RestoreWriteProtect(ULONG flWP);
[847]75
[1467]76
[5224]77
[847]78/*
79 * Global variables
80 */
[1467]81extern PULONG pulTKSSBase32;
[5224]82extern USHORT CallGateGDT;
[847]83
84/*
[1467]85 * SSToDS( stack pointer )
86 *
87 * In RING-0 this translates pointers to stack memory in the
88 * Stack Segment (SS) to pointers to stack memory in the
89 * Data Segment (DS). SS is 16-bit compatible, DS is 32-bit flat.
90 * It is vitally important to use this macro whenever creating
91 * a pointer to stack memory which don't implies that is a pointer
92 * relative to SS. For example when passing the pointer to an stack
93 * variable into an function call; like the addToModule calls.
94 *
[2836]95 * Warning - At init-time you have ot make sure that the pulTKSSBase32 pointer is set!
96 *
97 * @returns 32-bit FLAT pointer.
[847]98 */
[1467]99#ifdef RING0
100 #define SSToDS(a) ((PVOID)((ULONG)(a) + *pulTKSSBase32))
101#else
102 #define SSToDS(a) ((PVOID)(a))
103#endif
[847]104
105#ifdef __cplusplus
106}
107#endif
108
[2898]109
110/*
111 * START and END labels. NOTE: these are not bytes only assembly labels.
112 */
113extern char DATA16START ;
114extern char DATA16_BSSSTART ;
115extern char DATA16_CONSTSTART;
[4164]116extern char DATA16_INITSTART ;
117extern char DATA16_INIT_BSSSTART ;
118extern char DATA16_INIT_CONSTSTART;
[2898]119extern char CODE16START ;
[4164]120extern char CODE16_INITSTART ;
[2898]121extern char CODE32START ;
122extern char DATA32START ;
123extern char BSS32START ;
124extern char CONST32_ROSTART ;
125extern char _VFTSTART ;
126extern char EH_DATASTART ;
127
128extern char CODE16END ;
129extern char DATA16END ;
130extern char DATA16_BSSEND ;
131extern char DATA16_CONSTEND;
[4164]132extern char DATA16_INITEND ;
133extern char DATA16_INIT_BSSEND ;
134extern char DATA16_INIT_CONSTEND;
[2898]135extern char CODE16END ;
[4164]136extern char CODE16_INITEND ;
[2898]137extern char CODE32END ;
138extern char DATA32END ;
139extern char BSS32END ;
140extern char CONST32_ROEND ;
141extern char _VFTEND ;
142extern char EH_DATAEND ;
143
[847]144#endif
Note: See TracBrowser for help on using the repository browser.