RTEMS 6.1-rc7
Loading...
Searching...
No Matches
bsp.h
Go to the documentation of this file.
1
9/*
10 * COPYRIGHT (c) 1989-2007.
11 * On-Line Applications Research Corporation (OAR).
12 *
13 * The license and distribution terms for this file may be
14 * found in the file LICENSE in this distribution or at
15 * http://www.rtems.org/license/LICENSE.
16 *
17 * Ported to ERC32 implementation of the SPARC by On-Line Applications
18 * Research Corporation (OAR) under contract to the European Space
19 * Agency (ESA).
20 *
21 * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
22 * European Space Agency.
23 */
24
25#ifndef LIBBSP_SPARC_ERC32_BSP_H
26#define LIBBSP_SPARC_ERC32_BSP_H
27
38#include <bspopts.h>
40
41#include <rtems.h>
42#include <erc32.h>
43#include <rtems/irq-extension.h>
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49#define BSP_FEATURE_IRQ_EXTENSION
50
51/*
52 * BSP provides its own Idle thread body
53 */
54void *bsp_idle_thread( uintptr_t ignored );
55#define BSP_IDLE_TASK_BODY bsp_idle_thread
56
57/*
58 * Network driver configuration
59 */
60struct rtems_bsdnet_ifconfig;
61extern int rtems_erc32_sonic_driver_attach(
62 struct rtems_bsdnet_ifconfig *config
63);
64#define RTEMS_BSP_NETWORK_DRIVER_NAME "sonic1"
65#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_erc32_sonic_driver_attach
66
67/* Constants */
68
69/*
70 * Information placed in the linkcmds file.
71 */
72
73extern int RAM_START;
74extern int RAM_END;
75extern int RAM_SIZE;
76
77extern int PROM_START;
78extern int PROM_END;
79extern int PROM_SIZE;
80
81extern int CLOCK_SPEED;
82
83extern int end; /* last address in the program */
84
85/* functions */
86
87rtems_isr_entry set_vector( /* returns old vector */
88 rtems_isr_entry handler, /* isr routine */
89 rtems_vector_number vector, /* vector number */
90 int type /* RTEMS or RAW intr */
91);
92
93void BSP_fatal_exit(uint32_t error);
94
95/* Interrupt Service Routine (ISR) pointer */
96typedef void (*bsp_shared_isr)(void *arg);
97
98/* Registers a shared IRQ handler, and enable it at IRQ controller. Multiple
99 * interrupt handlers may use the same IRQ number, all ISRs will be called
100 * when an interrupt on that line is fired.
101 *
102 * Arguments
103 * irq System IRQ number
104 * info Optional Name of IRQ source
105 * isr Function pointer to the ISR
106 * arg Second argument to function isr
107 */
108RTEMS_DEPRECATED static inline int BSP_shared_interrupt_register
109 (
110 int irq,
111 const char *info,
112 bsp_shared_isr isr,
113 void *arg
114 )
115{
116 return rtems_interrupt_handler_install(irq, info,
117 RTEMS_INTERRUPT_SHARED, isr, arg);
118}
119
120/* Unregister previously registered shared IRQ handler.
121 *
122 * Arguments
123 * irq System IRQ number
124 * isr Function pointer to the ISR
125 * arg Second argument to function isr
126 */
127RTEMS_DEPRECATED static inline int BSP_shared_interrupt_unregister
128 (
129 int irq,
130 bsp_shared_isr isr,
131 void *arg
132 )
133{
134 return rtems_interrupt_handler_remove(irq, isr, arg);
135}
136
137/* Clear interrupt pending on IRQ controller, this is typically done on a
138 * level triggered interrupt source such as PCI to avoid taking double IRQs.
139 * In such a case the interrupt source must be cleared first on LEON, before
140 * acknowledging the IRQ with this function.
141 *
142 * Arguments
143 * irq System IRQ number
144 */
145RTEMS_DEPRECATED static inline void BSP_shared_interrupt_clear( int irq )
146{
148}
149
150/* Enable Interrupt. This function will unmask the IRQ at the interrupt
151 * controller. This is normally done by _register(). Note that this will
152 * affect all ISRs on this IRQ.
153 *
154 * Arguments
155 * irq System IRQ number
156 */
157RTEMS_DEPRECATED static inline void BSP_shared_interrupt_unmask( int irq )
158{
160}
161
162/* Disable Interrupt. This function will mask one IRQ at the interrupt
163 * controller. This is normally done by _unregister(). Note that this will
164 * affect all ISRs on this IRQ.
165 *
166 * Arguments
167 * irq System IRQ number
168 */
169RTEMS_DEPRECATED static inline void BSP_shared_interrupt_mask( int irq )
170{
172}
173
174/*
175 * Delay for the specified number of microseconds.
176 */
177void rtems_bsp_delay(int usecs);
178
179/*
180 * Prototypes for methods used across file boundaries
181 */
182void console_outbyte_polled(int port, unsigned char ch);
183int console_inbyte_nonblocking(int port);
184
185#ifdef __cplusplus
186}
187#endif
188
191#endif
void console_outbyte_polled(int port, char ch)
Definition: console-io.c:59
This header file provides the default definition of BSP_INITIAL_EXTENSION.
Contains information pertaining to the ERC32.
#define RTEMS_DEPRECATED
Instructs the compiler in a declaration to issue a warning whenever a variable, function,...
Definition: basedefs.h:334
ISR_Handler_entry rtems_isr_entry
Interrupt service routines installed by rtems_interrupt_catch() shall have this type.
Definition: intr.h:134
rtems_status_code rtems_interrupt_vector_disable(rtems_vector_number vector)
Disables the interrupt vector.
Definition: irq-enable-disable.c:94
rtems_status_code rtems_interrupt_handler_install(rtems_vector_number vector, const char *info, rtems_option options, rtems_interrupt_handler routine, void *arg)
Installs the interrupt handler routine and argument at the interrupt vector.
Definition: irq-handler-install.c:85
ISR_Vector_number rtems_vector_number
This integer type represents interrupt vector numbers.
Definition: intr.h:102
#define RTEMS_INTERRUPT_SHARED
This interrupt handler install option allows that the interrupt handler may share the interrupt vecto...
Definition: intr.h:960
rtems_status_code rtems_interrupt_handler_remove(rtems_vector_number vector, rtems_interrupt_handler routine, void *arg)
Removes the interrupt handler routine and argument from the interrupt vector.
Definition: irq-handler-remove.c:62
rtems_status_code rtems_interrupt_vector_enable(rtems_vector_number vector)
Enables the interrupt vector.
Definition: irq-enable-disable.c:85
rtems_status_code rtems_interrupt_clear(rtems_vector_number vector)
Clears the interrupt vector.
Definition: irq-raise-clear.c:92
void * bsp_idle_thread(uintptr_t ignored)
Optimized idle task.
Definition: bspidle.c:39
int console_inbyte_nonblocking(int port)
Definition: console-io.c:88
This header file is provided for backward compatiblility.
This header file defines the RTEMS Classic API.
Definition: deflate.c:114