/*1* Copyright (C) 2000, 2001, 2002 Broadcom Corporation2*3* This program is free software; you can redistribute it and/or4* modify it under the terms of the GNU General Public License5* as published by the Free Software Foundation; either version 26* of the License, or (at your option) any later version.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this program; if not, write to the Free Software15* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.16*/17#ifndef CFE_API_INT_H18#define CFE_API_INT_H1920/*21* Constants.22*/23#define CFE_CMD_FW_GETINFO 024#define CFE_CMD_FW_RESTART 125#define CFE_CMD_FW_BOOT 226#define CFE_CMD_FW_CPUCTL 327#define CFE_CMD_FW_GETTIME 428#define CFE_CMD_FW_MEMENUM 529#define CFE_CMD_FW_FLUSHCACHE 63031#define CFE_CMD_DEV_GETHANDLE 932#define CFE_CMD_DEV_ENUM 1033#define CFE_CMD_DEV_OPEN 1134#define CFE_CMD_DEV_INPSTAT 1235#define CFE_CMD_DEV_READ 1336#define CFE_CMD_DEV_WRITE 1437#define CFE_CMD_DEV_IOCTL 1538#define CFE_CMD_DEV_CLOSE 1639#define CFE_CMD_DEV_GETINFO 174041#define CFE_CMD_ENV_ENUM 2042#define CFE_CMD_ENV_GET 2243#define CFE_CMD_ENV_SET 2344#define CFE_CMD_ENV_DEL 244546#define CFE_CMD_MAX 324748#define CFE_CMD_VENDOR_USE 0x8000 /* codes above this are for customer use */4950/*51* Structures.52*/5354/* eeek, signed "pointers" */55typedef s64 cfe_xptr_t;5657struct xiocb_buffer {58u64 buf_offset; /* offset on device (bytes) */59cfe_xptr_t buf_ptr; /* pointer to a buffer */60u64 buf_length; /* length of this buffer */61u64 buf_retlen; /* returned length (for read ops) */62u64 buf_ioctlcmd; /* IOCTL command (used only for IOCTLs) */63};6465struct xiocb_inpstat {66u64 inp_status; /* 1 means input available */67};6869struct xiocb_envbuf {70s64 enum_idx; /* 0-based enumeration index */71cfe_xptr_t name_ptr; /* name string buffer */72s64 name_length; /* size of name buffer */73cfe_xptr_t val_ptr; /* value string buffer */74s64 val_length; /* size of value string buffer */75};7677struct xiocb_cpuctl {78u64 cpu_number; /* cpu number to control */79u64 cpu_command; /* command to issue to CPU */80u64 start_addr; /* CPU start address */81u64 gp_val; /* starting GP value */82u64 sp_val; /* starting SP value */83u64 a1_val; /* starting A1 value */84};8586struct xiocb_time {87s64 ticks; /* current time in ticks */88};8990struct xiocb_exitstat{91s64 status;92};9394struct xiocb_meminfo {95s64 mi_idx; /* 0-based enumeration index */96s64 mi_type; /* type of memory block */97u64 mi_addr; /* physical start address */98u64 mi_size; /* block size */99};100101struct xiocb_fwinfo {102s64 fwi_version; /* major, minor, eco version */103s64 fwi_totalmem; /* total installed mem */104s64 fwi_flags; /* various flags */105s64 fwi_boardid; /* board ID */106s64 fwi_bootarea_va; /* VA of boot area */107s64 fwi_bootarea_pa; /* PA of boot area */108s64 fwi_bootarea_size; /* size of boot area */109s64 fwi_reserved1;110s64 fwi_reserved2;111s64 fwi_reserved3;112};113114struct cfe_xiocb {115u64 xiocb_fcode; /* IOCB function code */116s64 xiocb_status; /* return status */117s64 xiocb_handle; /* file/device handle */118u64 xiocb_flags; /* flags for this IOCB */119u64 xiocb_psize; /* size of parameter list */120union {121/* buffer parameters */122struct xiocb_buffer xiocb_buffer;123124/* input status parameters */125struct xiocb_inpstat xiocb_inpstat;126127/* environment function parameters */128struct xiocb_envbuf xiocb_envbuf;129130/* CPU control parameters */131struct xiocb_cpuctl xiocb_cpuctl;132133/* timer parameters */134struct xiocb_time xiocb_time;135136/* memory arena info parameters */137struct xiocb_meminfo xiocb_meminfo;138139/* firmware information */140struct xiocb_fwinfo xiocb_fwinfo;141142/* Exit Status */143struct xiocb_exitstat xiocb_exitstat;144} plist;145};146147#endif /* CFE_API_INT_H */148149150