source: rtems/c/src/lib/libbsp/sparc/erc32/include/bsp.h @ 0729e2a7

4.115
Last change on this file since 0729e2a7 was 0729e2a7, checked in by Daniel Hellstrom <daniel@…>, on 03/28/12 at 08:49:27

SPARC: bsp_early_malloc() routine for startup memory allocation

If bsp_early_malloc() is called early during boot room will be
allocated after BSS END. If the function is called after boot
is will call malloc() instead. The returned memory is not freeable
and always 8-byte aligned.

If the bsp_early_malloc() isn't called the function is not
dragged in and the workspace will be unmodified in size.

Signed-off-by: Daniel Hellstrom <daniel@…>

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all SPARC simulator definitions.
4 *
5 *  COPYRIGHT (c) 1989-2007.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  Ported to ERC32 implementation of the SPARC by On-Line Applications
13 *  Research Corporation (OAR) under contract to the European Space
14 *  Agency (ESA).
15 *
16 *  ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
17 *  European Space Agency.
18 */
19
20#ifndef _BSP_H
21#define _BSP_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <bspopts.h>
28
29#include <rtems.h>
30#include <rtems/iosupp.h>
31#include <erc32.h>
32#include <rtems/clockdrv.h>
33
34#include <rtems/console.h>
35
36/*
37 *  BSP provides its own Idle thread body
38 */
39void *bsp_idle_thread( uintptr_t ignored );
40#define BSP_IDLE_TASK_BODY bsp_idle_thread
41
42/*
43 * Network driver configuration
44 */
45struct rtems_bsdnet_ifconfig;
46extern int rtems_erc32_sonic_driver_attach(
47  struct rtems_bsdnet_ifconfig *config
48);
49#define RTEMS_BSP_NETWORK_DRIVER_NAME   "sonic1"
50#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_erc32_sonic_driver_attach
51
52/* Constants */
53
54/*
55 *  Information placed in the linkcmds file.
56 */
57
58extern int   RAM_START;
59extern int   RAM_END;
60extern int   RAM_SIZE;
61
62extern int   PROM_START;
63extern int   PROM_END;
64extern int   PROM_SIZE;
65
66extern int   CLOCK_SPEED;
67
68extern int   end;        /* last address in the program */
69
70/* functions */
71
72rtems_isr_entry set_vector(                     /* returns old vector */
73    rtems_isr_entry     handler,                /* isr routine        */
74    rtems_vector_number vector,                 /* vector number      */
75    int                 type                    /* RTEMS or RAW intr  */
76);
77
78void BSP_fatal_return( void );
79
80void bsp_spurious_initialize( void );
81
82/* Allocate 8-byte aligned non-freeable pre-malloc() memory. The function
83 * can be called at any time. The work-area will shrink when called before
84 * bsp_get_work_area(). malloc() is called to get memory when this function
85 * is called after bsp_get_work_area().
86 */
87void *bsp_early_malloc(int size);
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif
Note: See TracBrowser for help on using the repository browser.