source: rtems/bsps/powerpc/virtex/start/bspstart.c @ ff081aee

Last change on this file since ff081aee was ff081aee, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 6, 2018 at 3:58:02 PM

score: Rename interrupt stack symbols

Rename

  • _Configuration_Interrupt_stack_area_begin in _ISR_Stack_area_begin,
  • _Configuration_Interrupt_stack_area_end in _ISR_Stack_area_end, and
  • _Configuration_Interrupt_stack_size in _ISR_Stack_size.

Move definitions to <rtems/score/isr.h>. The new names are considerable
shorter and in the right namespace.

Update #3459.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*  bsp_start()
2 *
3 *  This routine starts the application.  It includes application,
4 *  board, and monitor specific initialization and configuration.
5 *  The generic CPU dependent initialization has been performed
6 *  before this routine is invoked.
7 *
8 *  INPUT:  NONE
9 *
10 *  OUTPUT: NONE
11 *
12 *  Author:     Thomas Doerfler <td@imd.m.isar.de>
13 *              IMD Ingenieurbuero fuer Microcomputertechnik
14 *
15 *  COPYRIGHT (c) 1998 by IMD
16 *
17 *  Changes from IMD are covered by the original distributions terms.
18 *  This file has been derived from the papyrus BSP:
19 *
20 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
21 *
22 *  COPYRIGHT (c) 1995 by i-cubed ltd.
23 *
24 *  To anyone who acknowledges that this file is provided "AS IS"
25 *  without any express or implied warranty:
26 *      permission to use, copy, modify, and distribute this file
27 *      for any purpose is hereby granted without fee, provided that
28 *      the above copyright notice and this notice appears in all
29 *      copies, and that the name of i-cubed limited not be used in
30 *      advertising or publicity pertaining to distribution of the
31 *      software without specific, written prior permission.
32 *      i-cubed limited makes no representations about the suitability
33 *      of this software for any purpose.
34 *
35 *  Modifications for spooling console driver and control of memory layout
36 *  with linker command file by
37 *              Thomas Doerfler <td@imd.m.isar.de>
38 *  for these modifications:
39 *  COPYRIGHT (c) 1997 by IMD, Puchheim, Germany.
40 *
41 *  To anyone who acknowledges that this file is provided "AS IS"
42 *  without any express or implied warranty:
43 *      permission to use, copy, modify, and distribute this file
44 *      for any purpose is hereby granted without fee, provided that
45 *      the above copyright notice and this notice appears in all
46 *      copies. IMD makes no representations about the suitability
47 *      of this software for any purpose.
48 *
49 *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c:
50 *
51 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
52 *  On-Line Applications Research Corporation (OAR).
53 *
54 *  Modifications for PPC405GP by Dennis Ehlin
55 */
56
57#include <rtems/counter.h>
58
59#include <bsp.h>
60#include <bsp/irq.h>
61#include <bsp/irq-generic.h>
62#include <bsp/bootcard.h>
63#include <bsp/linker-symbols.h>
64
65#include <libcpu/powerpc-utility.h>
66
67#include RTEMS_XPARAMETERS_H
68
69/* Symbols defined in linker command file */
70LINKER_SYMBOL(virtex_exc_vector_base);
71
72/*
73 *  Driver configuration parameters
74 */
75uint32_t bsp_time_base_frequency = XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ;
76
77uint32_t _CPU_Counter_frequency(void)
78{
79  return bsp_time_base_frequency;
80}
81
82/*
83 *  bsp_start
84 *
85 *  This routine does the bulk of the system initialization.
86 */
87void bsp_start( void )
88{
89  /*
90   * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
91   * function store the result in global variables
92   * so that it can be used latter...
93   */
94  get_ppc_cpu_type();
95  get_ppc_cpu_revision();
96
97  ppc_exc_initialize_with_vector_base(
98    (uintptr_t) _ISR_Stack_area_begin,
99    virtex_exc_vector_base
100  );
101  __asm__ volatile ("mtevpr %0" : : "r" (virtex_exc_vector_base));
102
103  bsp_interrupt_initialize();
104}
Note: See TracBrowser for help on using the repository browser.