xref: /openbsd-src/sys/arch/arm/include/elf.h (revision ef873df06dac50249b2dd380dc6100eee3b0d23d)
1*ef873df0Sjca /*	$OpenBSD: elf.h,v 1.1 2024/07/14 09:48:48 jca Exp $	*/
2*ef873df0Sjca 
3*ef873df0Sjca /*-
4*ef873df0Sjca  * SPDX-License-Identifier: BSD-2-Clause
5*ef873df0Sjca  *
6*ef873df0Sjca  * Copyright (c) 2001 David E. O'Brien
7*ef873df0Sjca  * Copyright (c) 1996-1997 John D. Polstra.
8*ef873df0Sjca  * All rights reserved.
9*ef873df0Sjca  *
10*ef873df0Sjca  * Redistribution and use in source and binary forms, with or without
11*ef873df0Sjca  * modification, are permitted provided that the following conditions
12*ef873df0Sjca  * are met:
13*ef873df0Sjca  * 1. Redistributions of source code must retain the above copyright
14*ef873df0Sjca  *    notice, this list of conditions and the following disclaimer.
15*ef873df0Sjca  * 2. Redistributions in binary form must reproduce the above copyright
16*ef873df0Sjca  *    notice, this list of conditions and the following disclaimer in the
17*ef873df0Sjca  *    documentation and/or other materials provided with the distribution.
18*ef873df0Sjca  *
19*ef873df0Sjca  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20*ef873df0Sjca  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21*ef873df0Sjca  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22*ef873df0Sjca  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23*ef873df0Sjca  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24*ef873df0Sjca  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25*ef873df0Sjca  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26*ef873df0Sjca  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27*ef873df0Sjca  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28*ef873df0Sjca  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29*ef873df0Sjca  * SUCH DAMAGE.
30*ef873df0Sjca  */
31*ef873df0Sjca 
32*ef873df0Sjca #ifndef	_MACHINE_ELF_H_
33*ef873df0Sjca #define	_MACHINE_ELF_H_
34*ef873df0Sjca 
35*ef873df0Sjca /*
36*ef873df0Sjca  * ELF definitions for the ARM architecture.
37*ef873df0Sjca  */
38*ef873df0Sjca 
39*ef873df0Sjca #ifdef _KERNEL
40*ef873df0Sjca # define __HAVE_CPU_HWCAP
41*ef873df0Sjca # define __HAVE_CPU_HWCAP2
42*ef873df0Sjca extern unsigned long	hwcap, hwcap2;
43*ef873df0Sjca #endif /* _KERNEL */
44*ef873df0Sjca 
45*ef873df0Sjca /* Flags passed in AT_HWCAP. */
46*ef873df0Sjca #define	HWCAP_SWP		0x00000001	/* Unsupported, never set.    */
47*ef873df0Sjca #define	HWCAP_HALF		0x00000002	/* Always set.                */
48*ef873df0Sjca #define	HWCAP_THUMB		0x00000004
49*ef873df0Sjca #define	HWCAP_26BIT		0x00000008	/* Unsupported, never set.    */
50*ef873df0Sjca #define	HWCAP_FAST_MULT		0x00000010	/* Always set.                */
51*ef873df0Sjca #define	HWCAP_FPA		0x00000020	/* Unsupported, never set.    */
52*ef873df0Sjca #define	HWCAP_VFP		0x00000040
53*ef873df0Sjca #define	HWCAP_EDSP		0x00000080	/* Always set for ARMv6+.     */
54*ef873df0Sjca #define	HWCAP_JAVA		0x00000100	/* Unsupported, never set.    */
55*ef873df0Sjca #define	HWCAP_IWMMXT		0x00000200	/* Unsupported, never set.    */
56*ef873df0Sjca #define	HWCAP_CRUNCH		0x00000400	/* Unsupported, never set.    */
57*ef873df0Sjca #define	HWCAP_THUMBEE		0x00000800
58*ef873df0Sjca #define	HWCAP_NEON		0x00001000
59*ef873df0Sjca #define	HWCAP_VFPv3		0x00002000
60*ef873df0Sjca #define	HWCAP_VFPv3D16		0x00004000
61*ef873df0Sjca #define	HWCAP_TLS		0x00008000	/* Always set for ARMv6+.     */
62*ef873df0Sjca #define	HWCAP_VFPv4		0x00010000
63*ef873df0Sjca #define	HWCAP_IDIVA		0x00020000
64*ef873df0Sjca #define	HWCAP_IDIVT		0x00040000
65*ef873df0Sjca #define	HWCAP_VFPD32		0x00080000
66*ef873df0Sjca #define	HWCAP_IDIV		(HWCAP_IDIVA | HWCAP_IDIVT)
67*ef873df0Sjca #define	HWCAP_LPAE		0x00100000
68*ef873df0Sjca #define	HWCAP_EVTSTRM		0x00200000	/* Not implemented yet.       */
69*ef873df0Sjca 
70*ef873df0Sjca /* Flags passed in AT_HWCAP2. */
71*ef873df0Sjca #define	HWCAP2_AES		0x00000001
72*ef873df0Sjca #define	HWCAP2_PMULL		0x00000002
73*ef873df0Sjca #define	HWCAP2_SHA1		0x00000004
74*ef873df0Sjca #define	HWCAP2_SHA2		0x00000008
75*ef873df0Sjca #define	HWCAP2_CRC32		0x00000010
76*ef873df0Sjca 
77*ef873df0Sjca #endif /* !_MACHINE_ELF_H_ */
78