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

Subversion Repositories altor32

[/] [altor32/] [trunk/] [gcc-x64/] [or1knd-elf/] [or1knd-elf/] [include/] [or1k-support.h] - Blame information for rev 35

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 ultra_embe
/* OR1K support defines
2
 
3
   Copyright (C) 2011, ORSoC AB
4
   Copyright (C) 2008, 2010 Embecosm Limited
5
 
6
   Contributor Julius Baxter  <julius.baxter@orsoc.se>
7
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
8
 
9
   This file is part of Newlib.
10
 
11
   This program is free software; you can redistribute it and/or modify it
12
   under the terms of the GNU General Public License as published by the Free
13
   Software Foundation; either version 3 of the License, or (at your option)
14
   any later version.
15
 
16
   This program is distributed in the hope that it will be useful, but WITHOUT
17
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
19
   more details.
20
 
21
   You should have received a copy of the GNU General Public License along
22
   with this program.  If not, see <http://www.gnu.org/licenses/>.            */
23
/* -------------------------------------------------------------------------- */
24
/* This program is commented throughout in a fashion suitable for processing
25
   with Doxygen.                                                              */
26
/* -------------------------------------------------------------------------- */
27
 
28
/* This machine configuration matches the Or1ksim configuration file in this
29
   directory. */
30
 
31
#ifndef OR1K_NEWLIB_SUPPORT__H
32
#define OR1K_NEWLIB_SUPPORT__H
33
 
34
#include "or1k-support-defs.h"
35
#include <_ansi.h>
36
 
37
/*! External symbols from each board's object file */
38
extern unsigned long _board_clk_freq;
39
 
40
extern unsigned long _board_uart_base;
41
extern unsigned long _board_uart_baud;
42
extern unsigned long _board_uart_irq;
43
 
44
/*! Check if board has UART - test base address */
45
#define BOARD_HAS_UART (_board_uart_base)
46
 
47
 
48
/*! Register access macro */
49
#define REG8(add) *((volatile unsigned char *) (add))
50
#define REG16(add) *((volatile unsigned short *) (add))
51
#define REG32(add) *((volatile unsigned long *) (add))
52
 
53
/*! Interrupt control function prototypes */
54
void or1k_interrupt_handler_add(int, void(*)(void*));
55
void or1k_interrupt_enable(int);
56
void or1k_interrupt_disable(int);
57
 
58
/*! Exception handler insertion prototype */
59
void or1k_exception_handler_add(int, void (*)(void));
60
 
61
/*! SPR access prototypes */
62
void  or1k_mtspr (unsigned long int  spr,
63
                    unsigned long int  value);
64
unsigned long int  or1k_mfspr (unsigned long int  spr);
65
 
66
/*! Simulator prototypes */
67
void or1k_report (unsigned long int  value);
68
 
69
/*! Cache control prototypes */
70
void or1k_icache_enable(void);
71
void or1k_icache_disable(void);
72
void or1k_icache_flush(unsigned long);
73
void or1k_dcache_enable(void);
74
void or1k_dcache_disable(void);
75
void or1k_dcache_flush(unsigned long);
76
 
77
/*! MMU control prototypes */
78
void or1k_immu_enable(void);
79
void or1k_immu_disable(void);
80
void or1k_dmmu_enable(void);
81
void or1k_dmmu_disable(void);
82
 
83
/*! Timer prototypes */
84
void or1k_timer_init(unsigned int hz);
85
void or1k_timer_enable(void);
86
void or1k_timer_disable(void);
87
unsigned long or1k_timer_get_ticks(void);
88
void or1k_timer_reset_ticks(void);
89
 
90
/*! Utility function prototypes */
91
unsigned long int or1k_rand(void);
92
 
93
#endif  /* OR1K_NEWLIB_SUPPORT__H */

powered by: WebSVN 2.1.0

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