xref: /freebsd/sys/dev/mps/mpi/mpi2_type.h (revision aa0a1e58)
1 /* $FreeBSD$ */
2 /*
3  *  Copyright (c) 2000-2007 LSI Corporation.
4  *
5  *
6  *           Name:  mpi2_type.h
7  *          Title:  MPI basic type definitions
8  *  Creation Date:  August 16, 2006
9  *
10  *    mpi2_type.h Version:  02.00.00
11  *
12  *  Version History
13  *  ---------------
14  *
15  *  Date      Version   Description
16  *  --------  --------  ------------------------------------------------------
17  *  04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
18  *  --------------------------------------------------------------------------
19  */
20 
21 #ifndef MPI2_TYPE_H
22 #define MPI2_TYPE_H
23 
24 
25 /*******************************************************************************
26  * Define MPI2_POINTER if it hasn't already been defined. By default
27  * MPI2_POINTER is defined to be a near pointer. MPI2_POINTER can be defined as
28  * a far pointer by defining MPI2_POINTER as "far *" before this header file is
29  * included.
30  */
31 #ifndef MPI2_POINTER
32 #define MPI2_POINTER     *
33 #endif
34 
35 /* the basic types may have already been included by mpi_type.h */
36 #ifndef MPI_TYPE_H
37 /*****************************************************************************
38 *
39 *               Basic Types
40 *
41 *****************************************************************************/
42 
43 typedef signed   char   S8;
44 typedef unsigned char   U8;
45 typedef signed   short  S16;
46 typedef unsigned short  U16;
47 
48 #ifdef	__FreeBSD__
49 
50 typedef int32_t  S32;
51 typedef uint32_t U32;
52 
53 #else
54 
55 #if defined(unix) || defined(__arm) || defined(ALPHA) || defined(__PPC__) || defined(__ppc)
56 
57     typedef signed   int   S32;
58     typedef unsigned int   U32;
59 
60 #else
61 
62     typedef signed   long  S32;
63     typedef unsigned long  U32;
64 
65 #endif
66 #endif
67 
68 typedef struct _S64
69 {
70     U32          Low;
71     S32          High;
72 } S64;
73 
74 typedef struct _U64
75 {
76     U32          Low;
77     U32          High;
78 } U64;
79 
80 
81 /*****************************************************************************
82 *
83 *               Pointer Types
84 *
85 *****************************************************************************/
86 
87 typedef S8      *PS8;
88 typedef U8      *PU8;
89 typedef S16     *PS16;
90 typedef U16     *PU16;
91 typedef S32     *PS32;
92 typedef U32     *PU32;
93 typedef S64     *PS64;
94 typedef U64     *PU64;
95 
96 #endif
97 
98 #endif
99 
100