1/* ********************************************************************* 2 * Broadcom Common Firmware Environment (CFE) 3 * 4 * Device function prototypes File: cfe_devfuncs.h 5 * 6 * This module contains prototypes for cfe_devfuncs.c, a set 7 * of wrapper routines to the IOCB interface. This file, 8 * along with cfe_devfuncs.c, can be incorporated into programs 9 * that need to call CFE. 10 * 11 * Author: Mitch Lichtenberg 12 * 13 ********************************************************************* 14 * 15 * Copyright 2000,2001,2002,2003 16 * Broadcom Corporation. All rights reserved. 17 * 18 * This software is furnished under license and may be used and 19 * copied only in accordance with the following terms and 20 * conditions. Subject to these conditions, you may download, 21 * copy, install, use, modify and distribute modified or unmodified 22 * copies of this software in source and/or binary form. No title 23 * or ownership is transferred hereby. 24 * 25 * 1) Any source code used, modified or distributed must reproduce 26 * and retain this copyright notice and list of conditions 27 * as they appear in the source file. 28 * 29 * 2) No right is granted to use any trade name, trademark, or 30 * logo of Broadcom Corporation. The "Broadcom Corporation" 31 * name may not be used to endorse or promote products derived 32 * from this software without the prior written permission of 33 * Broadcom Corporation. 34 * 35 * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR 36 * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED 37 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 38 * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT 39 * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN 40 * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT, 41 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 42 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 43 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 44 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 45 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 46 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF 47 * THE POSSIBILITY OF SUCH DAMAGE. 48 ********************************************************************* */ 49 50#define CFE_EPTSEAL 0x43464531 51#if (CFG_BIENDIAN) && defined(__MIPSEB) 52#define CFE_EPTSEAL_REV 0x31454643 53#endif 54 55#define CFE_APISEAL 0xBFC004E0 56#define CFE_APIENTRY 0xBFC00500 57 58 59 60#ifndef __ASSEMBLER__ 61int cfe_open(char *name); 62int cfe_close(int handle); 63int cfe_readblk(int handle,cfe_offset_t offset,hsaddr_t buffer,int length); 64int cfe_read(int handle,hsaddr_t buffer,int length); 65int cfe_writeblk(int handle,cfe_offset_t offset,hsaddr_t buffer,int length); 66int cfe_write(int handle,hsaddr_t buffer,int length); 67int cfe_ioctl(int handle,unsigned int ioctlnum,unsigned char *buffer,int length,int *retlen, 68 cfe_offset_t offset); 69int cfe_inpstat(int handle); 70int cfe_getenv(char *name,char *dest,int destlen); 71long long cfe_getticks(void); 72int cfe_exit(int warm,int code); 73int cfe_flushcache(int flg); 74int cfe_getdevinfo(char *name); 75int cfe_enumdev(int idx,char *name,int namelen); 76#endif 77