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