RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
arm-a8core-start.h
Go to the documentation of this file.
1
9/*
10 * Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
11 *
12 * The license and distribution terms for this file may be
13 * found in the file LICENSE in this distribution or at
14 * http://www.rtems.org/license/LICENSE.
15 */
16
17#ifndef LIBBSP_ARM_SHARED_ARM_A8CORE_START_H
18#define LIBBSP_ARM_SHARED_ARM_A8CORE_START_H
19
20#include <libcpu/arm-cp15.h>
21
22#include <bsp.h>
23#include <bsp/start.h>
24#include <bsp/arm-errata.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif /* __cplusplus */
29
30BSP_START_TEXT_SECTION static inline void arm_a8core_start_set_vector_base(void)
31{
32 /*
33 * Do not use bsp_vector_table_begin == 0, since this will get optimized away.
34 */
35 if (bsp_vector_table_end != bsp_vector_table_size) {
36 uint32_t ctrl;
37
38 arm_cp15_set_vector_base_address(bsp_vector_table_begin);
39
40 ctrl = arm_cp15_get_control();
41 ctrl &= ~ARM_CP15_CTRL_V;
42 arm_cp15_set_control(ctrl);
43 }
44}
45
46BSP_START_TEXT_SECTION static inline void arm_a8core_start_hook_1(void)
47{
48 arm_a8core_start_set_vector_base();
49}
50
51#ifdef __cplusplus
52}
53#endif /* __cplusplus */
54
55#endif /* LIBBSP_ARM_SHARED_ARM_A8CORE_START_H */
ARM co-processor 15 (CP15) API.
Create #defines which state which erratas shall get applied.