RTEMS 6.1-rc7
Loading...
Searching...
No Matches
asm.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
22/*
23 * Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
24 * Written by Kinsey Moore <kinsey.moore@oarcorp.com>
25 *
26 * Redistribution and use in source and binary forms, with or without
27 * modification, are permitted provided that the following conditions
28 * are met:
29 * 1. Redistributions of source code must retain the above copyright
30 * notice, this list of conditions and the following disclaimer.
31 * 2. Redistributions in binary form must reproduce the above copyright
32 * notice, this list of conditions and the following disclaimer in the
33 * documentation and/or other materials provided with the distribution.
34 *
35 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
36 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
38 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
39 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
40 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
41 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
42 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
43 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45 * POSSIBILITY OF SUCH DAMAGE.
46 */
47
48#ifndef _RTEMS_ASM_H
49#define _RTEMS_ASM_H
50
51/*
52 * Indicate we are in an assembly file and get the basic CPU definitions.
53 */
54
55#ifndef ASM
56#define ASM
57#endif
58#include <rtems/score/percpu.h>
59
69/*
70 * Following must be tailor for a particular flavor of the C compiler.
71 * They may need to put underscores in front of the symbols.
72 */
73
74#define FUNCTION_ENTRY(name) \
75 .align 8; \
76 .globl name; \
77 .type name, %function; \
78 name:
79
80#define FUNCTION_END(name) \
81 .size name, . - name
82
83#define DEFINE_FUNCTION_AARCH64(name) \
84 .align 8 ; .globl name ; name: ; .globl name ## _aarch64 ; name ## _aarch64:
85
86.macro GET_SELF_CPU_CONTROL REG
87#ifdef RTEMS_SMP
88 /* Use Thread ID Register (TPIDR_EL1) */
89 mrs \REG, TPIDR_EL1
90#else
91 ldr \REG, =_Per_CPU_Information
92#endif
93.endm
94
97#endif /* _RTEMS_ASM_H */
CPU_STRUCTURE_ALIGNMENT Per_CPU_Control_envelope _Per_CPU_Information[]
Set of Per CPU Core Information.
Definition: asm.h:171
This header file provides the interfaces of the Per-CPU Information.