1 | /* $Id: dev32.h,v 1.3 1999-10-27 02:02:56 bird Exp $
|
---|
2 | *
|
---|
3 | * dev32 - header file for 32-bit part of the driver.
|
---|
4 | *
|
---|
5 | * Copyright (c) 1999 knut st. osmundsen
|
---|
6 | *
|
---|
7 | */
|
---|
8 | #ifndef _dev32_h_
|
---|
9 | #define _dev32_h_
|
---|
10 |
|
---|
11 | #ifdef __cplusplus
|
---|
12 | extern "C" {
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | /*
|
---|
16 | * Wrapper for declaration from dev1632.h used in this file.
|
---|
17 | */
|
---|
18 | #ifndef _dev1632_h_
|
---|
19 | #define RP32INIT void
|
---|
20 | #define PKRNLOBJTABLE void *
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | /*
|
---|
24 | * Defines from reqpkt.h.
|
---|
25 | */
|
---|
26 | #define MAX_DISKDD_CMD 29
|
---|
27 |
|
---|
28 | #define STERR 0x8000 /* Bit 15 - Error */
|
---|
29 | #define STINTER 0x0400 /* Bit 10 - Interim character */
|
---|
30 | #define STBUI 0x0200 /* Bit 9 - Busy */
|
---|
31 | #define STDON 0x0100 /* Bit 8 - Done */
|
---|
32 | #define STECODE 0x00FF /* Error code */
|
---|
33 | #define WRECODE 0x0000
|
---|
34 |
|
---|
35 | #define STATUS_DONE 0x0100
|
---|
36 | #define STATUS_ERR_UNKCMD 0x8003
|
---|
37 |
|
---|
38 |
|
---|
39 | #define RPF_Int13RP 0x01 /* Int 13 Request Packet */
|
---|
40 | #define RPF_CallOutDone 0x02 /* Int 13 Callout completed */
|
---|
41 | #define RPF_PktDiskIOTchd 0x04 /* Disk_IO has touched this packet */
|
---|
42 | #define RPF_CHS_ADDRESSING 0x08 /* CHS Addressing used in RBA field */
|
---|
43 | #define RPF_Internal 0x10 /* Internal request packet command */
|
---|
44 | #define RPF_TraceComplete 0x20 /* Trace completion flag */
|
---|
45 |
|
---|
46 |
|
---|
47 | /*
|
---|
48 | * Function prototypes.
|
---|
49 | */
|
---|
50 | #if !defined(__cplusplus) && defined(RING0)
|
---|
51 | USHORT _loadds _Far32 _Pascal R0Init32(RP32INIT *pRpInit);
|
---|
52 | USHORT _loadds _Far32 _Pascal GetOTEs32(PKRNLOBJTABLE pOTEBuf);
|
---|
53 | USHORT _loadds _Far32 _Pascal VerifyProcTab32(void);
|
---|
54 | #endif
|
---|
55 | #ifdef _OS2Krnl_h_
|
---|
56 | PMTE _System GetOS2KrnlMTE(void); /* (devfirst.asm) */
|
---|
57 | #endif
|
---|
58 |
|
---|
59 |
|
---|
60 | /*
|
---|
61 | * Global variables
|
---|
62 | */
|
---|
63 | extern PULONG pulTKSSBase32;
|
---|
64 |
|
---|
65 | /*
|
---|
66 | * SSToDS( stack pointer )
|
---|
67 | *
|
---|
68 | * In RING-0 this translates pointers to stack memory in the
|
---|
69 | * Stack Segment (SS) to pointers to stack memory in the
|
---|
70 | * Data Segment (DS). SS is 16-bit compatible, DS is 32-bit flat.
|
---|
71 | * It is vitally important to use this macro whenever creating
|
---|
72 | * a pointer to stack memory which don't implies that is a pointer
|
---|
73 | * relative to SS. For example when passing the pointer to an stack
|
---|
74 | * variable into an function call; like the addToModule calls.
|
---|
75 | *
|
---|
76 | * @returns 32-bit FLAT stack pointer.
|
---|
77 | */
|
---|
78 | #ifdef RING0
|
---|
79 | #define SSToDS(a) ((PVOID)((ULONG)(a) + *pulTKSSBase32))
|
---|
80 | #else
|
---|
81 | #define SSToDS(a) ((PVOID)(a))
|
---|
82 | #endif
|
---|
83 |
|
---|
84 | #ifdef __cplusplus
|
---|
85 | }
|
---|
86 | #endif
|
---|
87 |
|
---|
88 | #endif
|
---|