/*
 * include/arc/arc.h
 * ARC interface routines
 *
 * Copyright (C) 1994 by Waldorf Electronics,
 * written by Andreas Busse
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License. See the file COPYING in the main directory of this archive for more
 * details.
 */

#ifndef __ARC_H
#define __ARC_H

/*
 * exit codes
 */
#define EXIT_FAILURE    1       /* Failing exit status.  */
#define EXIT_SUCCESS    0       /* Successful exit status.  */

#if 0
/*
 * Standard filedescriptors
 */
extern int stdin;
extern int stdout;
extern int stderr;

#ifndef EOF
#define EOF (-1)
#endif
#endif

typedef struct DisplayInfo	/* video adapter information */
{
  unsigned short cursor_x;
  unsigned short cursor_y;
  unsigned short columns;
  unsigned short lines;
} DisplayInfo;

char *getVendorId(void);	/* get vendor id */
char *getProductId(void);	/* get product id */
char *getSystemId(void);	/* get system id (might be different from above) */

/*
 * CPU Info
 */
char *getCpuType(void);		/* get cpu type */
unsigned int getCpuId(void);	/* get cpu id (might be different from above) */
char *getFpuType(void);		/* get fpu id */

/*
 * Cache Size Info
 */
#define SIZE_UNKNOWN   0xffffffff

unsigned int getPrimaryICacheSize(void); /* get primary ICache size */
unsigned int getPrimaryDCacheSize(void); /* get primary DCache size */
unsigned int getSecondaryICacheSize(void); /* get secondary ICache size */
unsigned int getSecondaryDCacheSize(void); /* get secondary DCache size */
unsigned int getSecondaryCacheSize(void); /* get secondary DCache size */

/*
 * Diplay Info
 */
DisplayInfo *getDisplayInfo(void); /* get display info */

/*
 * Hardware type info
 */
extern int __hw_type;

#endif /* __ARC_H */
