aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/fw/cfe/cfe_api_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/fw/cfe/cfe_api_int.h')
-rw-r--r--arch/mips/fw/cfe/cfe_api_int.h186
1 files changed, 91 insertions, 95 deletions
diff --git a/arch/mips/fw/cfe/cfe_api_int.h b/arch/mips/fw/cfe/cfe_api_int.h
index f7e5a64b55f..d9759e64695 100644
--- a/arch/mips/fw/cfe/cfe_api_int.h
+++ b/arch/mips/fw/cfe/cfe_api_int.h
@@ -15,28 +15,12 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18
19/* *********************************************************************
20 *
21 * Broadcom Common Firmware Environment (CFE)
22 *
23 * Device function prototypes File: cfe_api_int.h
24 *
25 * This header defines all internal types and macros for the
26 * library. This is stuff that's not exported to an app
27 * using the library.
28 *
29 * Authors: Mitch Lichtenberg, Chris Demetriou
30 *
31 ********************************************************************* */
32
33#ifndef CFE_API_INT_H 18#ifndef CFE_API_INT_H
34#define CFE_API_INT_H 19#define CFE_API_INT_H
35 20
36/* ********************************************************************* 21/*
37 * Constants 22 * Constants.
38 ********************************************************************* */ 23 */
39
40#define CFE_CMD_FW_GETINFO 0 24#define CFE_CMD_FW_GETINFO 0
41#define CFE_CMD_FW_RESTART 1 25#define CFE_CMD_FW_RESTART 1
42#define CFE_CMD_FW_BOOT 2 26#define CFE_CMD_FW_BOOT 2
@@ -64,89 +48,101 @@
64 48
65#define CFE_CMD_VENDOR_USE 0x8000 /* codes above this are for customer use */ 49#define CFE_CMD_VENDOR_USE 0x8000 /* codes above this are for customer use */
66 50
67/* ********************************************************************* 51/*
68 * Structures 52 * Structures.
69 ********************************************************************* */ 53 */
70 54
71typedef uint64_t cfe_xuint_t; 55/* eeek, signed "pointers" */
72typedef int64_t cfe_xint_t; 56typedef s64 cfe_xptr_t;
73typedef int64_t cfe_xptr_t;
74 57
75typedef struct xiocb_buffer_s { 58struct xiocb_buffer {
76 cfe_xuint_t buf_offset; /* offset on device (bytes) */ 59 u64 buf_offset; /* offset on device (bytes) */
77 cfe_xptr_t buf_ptr; /* pointer to a buffer */ 60 cfe_xptr_t buf_ptr; /* pointer to a buffer */
78 cfe_xuint_t buf_length; /* length of this buffer */ 61 u64 buf_length; /* length of this buffer */
79 cfe_xuint_t buf_retlen; /* returned length (for read ops) */ 62 u64 buf_retlen; /* returned length (for read ops) */
80 cfe_xuint_t buf_ioctlcmd; /* IOCTL command (used only for IOCTLs) */ 63 u64 buf_ioctlcmd; /* IOCTL command (used only for IOCTLs) */
81} xiocb_buffer_t; 64};
82
83#define buf_devflags buf_ioctlcmd /* returned device info flags */
84 65
85typedef struct xiocb_inpstat_s { 66struct xiocb_inpstat {
86 cfe_xuint_t inp_status; /* 1 means input available */ 67 u64 inp_status; /* 1 means input available */
87} xiocb_inpstat_t; 68};
88 69
89typedef struct xiocb_envbuf_s { 70struct xiocb_envbuf {
90 cfe_xint_t enum_idx; /* 0-based enumeration index */ 71 s64 enum_idx; /* 0-based enumeration index */
91 cfe_xptr_t name_ptr; /* name string buffer */ 72 cfe_xptr_t name_ptr; /* name string buffer */
92 cfe_xint_t name_length; /* size of name buffer */ 73 s64 name_length; /* size of name buffer */
93 cfe_xptr_t val_ptr; /* value string buffer */ 74 cfe_xptr_t val_ptr; /* value string buffer */
94 cfe_xint_t val_length; /* size of value string buffer */ 75 s64 val_length; /* size of value string buffer */
95} xiocb_envbuf_t; 76};
96 77
97typedef struct xiocb_cpuctl_s { 78struct xiocb_cpuctl {
98 cfe_xuint_t cpu_number; /* cpu number to control */ 79 u64 cpu_number; /* cpu number to control */
99 cfe_xuint_t cpu_command; /* command to issue to CPU */ 80 u64 cpu_command; /* command to issue to CPU */
100 cfe_xuint_t start_addr; /* CPU start address */ 81 u64 start_addr; /* CPU start address */
101 cfe_xuint_t gp_val; /* starting GP value */ 82 u64 gp_val; /* starting GP value */
102 cfe_xuint_t sp_val; /* starting SP value */ 83 u64 sp_val; /* starting SP value */
103 cfe_xuint_t a1_val; /* starting A1 value */ 84 u64 a1_val; /* starting A1 value */
104} xiocb_cpuctl_t; 85};
105 86
106typedef struct xiocb_time_s { 87struct xiocb_time {
107 cfe_xint_t ticks; /* current time in ticks */ 88 s64 ticks; /* current time in ticks */
108} xiocb_time_t; 89};
109 90
110typedef struct xiocb_exitstat_s { 91struct xiocb_exitstat{
111 cfe_xint_t status; 92 s64 status;
112} xiocb_exitstat_t; 93};
113 94
114typedef struct xiocb_meminfo_s { 95struct xiocb_meminfo {
115 cfe_xint_t mi_idx; /* 0-based enumeration index */ 96 s64 mi_idx; /* 0-based enumeration index */
116 cfe_xint_t mi_type; /* type of memory block */ 97 s64 mi_type; /* type of memory block */
117 cfe_xuint_t mi_addr; /* physical start address */ 98 u64 mi_addr; /* physical start address */
118 cfe_xuint_t mi_size; /* block size */ 99 u64 mi_size; /* block size */
119} xiocb_meminfo_t; 100};
120 101
121typedef struct xiocb_fwinfo_s { 102struct xiocb_fwinfo {
122 cfe_xint_t fwi_version; /* major, minor, eco version */ 103 s64 fwi_version; /* major, minor, eco version */
123 cfe_xint_t fwi_totalmem; /* total installed mem */ 104 s64 fwi_totalmem; /* total installed mem */
124 cfe_xint_t fwi_flags; /* various flags */ 105 s64 fwi_flags; /* various flags */
125 cfe_xint_t fwi_boardid; /* board ID */ 106 s64 fwi_boardid; /* board ID */
126 cfe_xint_t fwi_bootarea_va; /* VA of boot area */ 107 s64 fwi_bootarea_va; /* VA of boot area */
127 cfe_xint_t fwi_bootarea_pa; /* PA of boot area */ 108 s64 fwi_bootarea_pa; /* PA of boot area */
128 cfe_xint_t fwi_bootarea_size; /* size of boot area */ 109 s64 fwi_bootarea_size; /* size of boot area */
129 cfe_xint_t fwi_reserved1; 110 s64 fwi_reserved1;
130 cfe_xint_t fwi_reserved2; 111 s64 fwi_reserved2;
131 cfe_xint_t fwi_reserved3; 112 s64 fwi_reserved3;
132} xiocb_fwinfo_t; 113};
133 114
134typedef struct cfe_xiocb_s { 115struct cfe_xiocb {
135 cfe_xuint_t xiocb_fcode; /* IOCB function code */ 116 u64 xiocb_fcode; /* IOCB function code */
136 cfe_xint_t xiocb_status; /* return status */ 117 s64 xiocb_status; /* return status */
137 cfe_xint_t xiocb_handle; /* file/device handle */ 118 s64 xiocb_handle; /* file/device handle */
138 cfe_xuint_t xiocb_flags; /* flags for this IOCB */ 119 u64 xiocb_flags; /* flags for this IOCB */
139 cfe_xuint_t xiocb_psize; /* size of parameter list */ 120 u64 xiocb_psize; /* size of parameter list */
140 union { 121 union {
141 xiocb_buffer_t xiocb_buffer; /* buffer parameters */ 122 /* buffer parameters */
142 xiocb_inpstat_t xiocb_inpstat; /* input status parameters */ 123 struct xiocb_buffer xiocb_buffer;
143 xiocb_envbuf_t xiocb_envbuf; /* environment function parameters */ 124
144 xiocb_cpuctl_t xiocb_cpuctl; /* CPU control parameters */ 125 /* input status parameters */
145 xiocb_time_t xiocb_time; /* timer parameters */ 126 struct xiocb_inpstat xiocb_inpstat;
146 xiocb_meminfo_t xiocb_meminfo; /* memory arena info parameters */ 127
147 xiocb_fwinfo_t xiocb_fwinfo; /* firmware information */ 128 /* environment function parameters */
148 xiocb_exitstat_t xiocb_exitstat; /* Exit Status */ 129 struct xiocb_envbuf xiocb_envbuf;
130
131 /* CPU control parameters */
132 struct xiocb_cpuctl xiocb_cpuctl;
133
134 /* timer parameters */
135 struct xiocb_time xiocb_time;
136
137 /* memory arena info parameters */
138 struct xiocb_meminfo xiocb_meminfo;
139
140 /* firmware information */
141 struct xiocb_fwinfo xiocb_fwinfo;
142
143 /* Exit Status */
144 struct xiocb_exitstat xiocb_exitstat;
149 } plist; 145 } plist;
150} cfe_xiocb_t; 146};
151 147
152#endif /* CFE_API_INT_H */ 148#endif /* CFE_API_INT_H */