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] - Blame information for rev 799

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 584 jeremybenn
/* Support file for or32 tests.  This file should is included
2
   in each test. It calls main() function and add support for
3
   basic functions */
4
 
5
#ifndef SUPPORT_H
6
#define SUPPORT_H
7
 
8
#include <stdarg.h>
9
#include <stddef.h>
10
#include <limits.h>
11
 
12
/* Register access macros */
13 623 filepang
#define REG8(add)       *((volatile unsigned char *)(add))
14
#define REG16(add)      *((volatile unsigned short *)(add))
15
#define REG32(add)      *((volatile unsigned long *)(add))
16 584 jeremybenn
 
17
/* For writing into SPR. */
18
void mtspr(unsigned long spr, unsigned long value);
19
 
20
/* For reading SPR. */
21
unsigned long mfspr(unsigned long spr);
22
 
23
/* Function to be called at entry point - not defined here.  */
24
int main(int argc, char **argv);
25
 
26
/* Prints out a value */
27
void report(unsigned long value);
28
 
29
/* return value by making a syscall */
30
extern void or32_exit (int i) __attribute__ ((__noreturn__));
31
 
32 799 filepang
/* cache related functions */
33
int cache_init(void);
34
void icache_disable(void);
35
void icache_enable(void);
36
void dcache_disable(void);
37
void dcache_enable(void);
38
int checkdcache(void);
39
int dcache_status(void);
40
int checkicache(void);
41
int icache_status(void);
42
void flush_cache(unsigned long addr, unsigned long size);
43
void invalidate_dcache_range(unsigned long addr, unsigned long stop);
44
void flush_dcache_range(unsigned long addr, unsigned long stop);
45
 
46 584 jeremybenn
#endif /* SUPPORT_H */

powered by: WebSVN 2.1.0

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