RTEMS 7.0-rc1
Loading...
Searching...
No Matches
bsp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * COPYRIGHT (c) 1995 by i-cubed ltd.
13 *
14 * To anyone who acknowledges that this file is provided "AS IS"
15 * without any express or implied warranty:
16 * permission to use, copy, modify, and distribute this file
17 * for any purpose is hereby granted without fee, provided that
18 * the above copyright notice and this notice appears in all
19 * copies, and that the name of i-cubed limited not be used in
20 * advertising or publicity pertaining to distribution of the
21 * software without specific, written prior permission.
22 * i-cubed limited makes no representations about the suitability
23 * of this software for any purpose.
24*/
25/*
26 * Copyright (C) 1989, 1999 On-Line Applications Research Corporation (OAR)
27 * Copyright (C) 1998 IMD Ingenieurbuero fuer Microcomputertechnik
28 *
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 * 1. Redistributions of source code must retain the above copyright
33 * notice, this list of conditions and the following disclaimer.
34 * 2. Redistributions in binary form must reproduce the above copyright
35 * notice, this list of conditions and the following disclaimer in the
36 * documentation and/or other materials provided with the distribution.
37 *
38 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
39 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
41 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
42 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
43 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
44 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
45 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
46 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
47 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
48 * POSSIBILITY OF SUCH DAMAGE.
49 */
50
51
52/*
53 * derived from helas403/include/bsp.h:
54 * Id: bsp.h,v 1.4 2001/06/18 17:01:48 joel Exp
55 * Author: Thomas Doerfler <td@imd.m.isar.de>
56 * IMD Ingenieurbuero fuer Microcomputertechnik
57 *
58 * Changes from IMD are covered by the original distributions terms.
59 * This file has been derived from the papyrus BSP.
60 *
61 * Author: Andrew Bray <andy@i-cubed.co.uk>
62 *
63 * Derived from bsps/no_cpu/no_bsp/include/bsp.h
64 */
65
66#ifndef LIBBSP_POWERPC_VIRTEX5_BSP_H
67#define LIBBSP_POWERPC_VIRTEX5_BSP_H
68
79#include <bspopts.h>
80
81/*
82 * confdefs.h overrides for this BSP:
83 * - Interrupt stack space is not minimum if defined.
84 */
85#define BSP_INTERRUPT_STACK_SIZE (16 * 1024)
86
87#ifdef ASM
88/* Definition of where to store registers in alignment handler */
89#define ALIGN_REGS 0x0140
90
91#else
92#include <rtems.h>
94
95#ifdef __cplusplus
96extern "C" {
97#endif
98
99/*
100 * Bus Frequency
101 */
102extern unsigned int BSP_bus_frequency;
103/*
104 * Processor Clock Frequency
105 */
106extern unsigned int BSP_processor_frequency;
107/*
108 * Time base divisior (how many tick for 1 second).
109 */
110extern unsigned int BSP_time_base_divisor;
111
112/*
113 * Macro used by shared MPC6xx timer driver
114 */
115#define BSP_Convert_decrementer( _value ) \
116 ((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
117
118/*
119 * Interfaces to required Clock Driver support methods
120 */
121int BSP_disconnect_clock_handler(void);
122int BSP_connect_clock_handler(void);
123
124/*
125 * Prototypes for BSP methods shared across file boundaries
126 */
127void zero_bss(void);
128
129#endif /* ASM */
130
131#ifdef __cplusplus
132}
133#endif
134
137#endif
This header file provides the default definition of BSP_INITIAL_EXTENSION.
This header file defines the RTEMS Classic API.