OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [OpenRISC_SIM_GCC/] [arch/] [support.h] - Diff between revs 623 and 799

Only display areas with differences | Details | Blame | View Log

Rev 623 Rev 799
/* Support file for or32 tests.  This file should is included
/* Support file for or32 tests.  This file should is included
   in each test. It calls main() function and add support for
   in each test. It calls main() function and add support for
   basic functions */
   basic functions */
 
 
#ifndef SUPPORT_H
#ifndef SUPPORT_H
#define SUPPORT_H
#define SUPPORT_H
 
 
#include <stdarg.h>
#include <stdarg.h>
#include <stddef.h>
#include <stddef.h>
#include <limits.h>
#include <limits.h>
 
 
/* Register access macros */
/* Register access macros */
#define REG8(add)       *((volatile unsigned char *)(add))
#define REG8(add)       *((volatile unsigned char *)(add))
#define REG16(add)      *((volatile unsigned short *)(add))
#define REG16(add)      *((volatile unsigned short *)(add))
#define REG32(add)      *((volatile unsigned long *)(add))
#define REG32(add)      *((volatile unsigned long *)(add))
 
 
/* For writing into SPR. */
/* For writing into SPR. */
void mtspr(unsigned long spr, unsigned long value);
void mtspr(unsigned long spr, unsigned long value);
 
 
/* For reading SPR. */
/* For reading SPR. */
unsigned long mfspr(unsigned long spr);
unsigned long mfspr(unsigned long spr);
 
 
/* Function to be called at entry point - not defined here.  */
/* Function to be called at entry point - not defined here.  */
int main(int argc, char **argv);
int main(int argc, char **argv);
 
 
/* Prints out a value */
/* Prints out a value */
void report(unsigned long value);
void report(unsigned long value);
 
 
/* return value by making a syscall */
/* return value by making a syscall */
extern void or32_exit (int i) __attribute__ ((__noreturn__));
extern void or32_exit (int i) __attribute__ ((__noreturn__));
 
 
 
/* cache related functions */
 
int cache_init(void);
 
void icache_disable(void);
 
void icache_enable(void);
 
void dcache_disable(void);
 
void dcache_enable(void);
 
int checkdcache(void);
 
int dcache_status(void);
 
int checkicache(void);
 
int icache_status(void);
 
void flush_cache(unsigned long addr, unsigned long size);
 
void invalidate_dcache_range(unsigned long addr, unsigned long stop);
 
void flush_dcache_range(unsigned long addr, unsigned long stop);
 
 
#endif /* SUPPORT_H */
#endif /* SUPPORT_H */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.