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