/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2001 David E. O'Brien4* Copyright (c) 1996-1997 John D. Polstra.5* All rights reserved.6*7* Redistribution and use in source and binary forms, with or without8* modification, are permitted provided that the following conditions9* are met:10* 1. Redistributions of source code must retain the above copyright11* notice, this list of conditions and the following disclaimer.12* 2. Redistributions in binary form must reproduce the above copyright13* notice, this list of conditions and the following disclaimer in the14* documentation and/or other materials provided with the distribution.15*16* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND17* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE18* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE19* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE20* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL21* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS22* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)23* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT24* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY25* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF26* SUCH DAMAGE.27*/2829#ifndef _MACHINE_ELF_H_30#define _MACHINE_ELF_H_ 13132/*33* EABI ELF definitions for the StrongARM architecture.34* See "ARM ELF", document no. `SWS ESPC 0003 A-08' for details.35*/3637#include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */3839#define __ELF_WORD_SIZE 32 /* Used by <sys/elf_generic.h> */40#include <sys/elf_generic.h>4142typedef struct { /* Auxiliary vector entry on initial stack */43int a_type; /* Entry type. */44union {45long a_val; /* Integer value. */46void *a_ptr; /* Address. */47void (*a_fcn)(void); /* Function pointer (not used). */48} a_un;49} Elf32_Auxinfo;5051__ElfType(Auxinfo);5253#define ELF_ARCH EM_ARM5455#define ELF_MACHINE_OK(x) ((x) == EM_ARM)5657/*58* Relocation types.59*/6061#define R_ARM_COUNT 33 /* Count of defined relocation types. */6263/* Define "machine" characteristics */64#define ELF_TARG_CLASS ELFCLASS3265#ifdef __ARMEB__66#define ELF_TARG_DATA ELFDATA2MSB67#else68#define ELF_TARG_DATA ELFDATA2LSB69#endif70#define ELF_TARG_MACH EM_ARM71#define ELF_TARG_VER 17273/* Defines specific for arm headers */74#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER47576#define ET_DYN_LOAD_ADDR 0x010010007778/* Flags passed in AT_HWCAP. */79#define HWCAP_SWP 0x00000001 /* Unsupported, never set. */80#define HWCAP_HALF 0x00000002 /* Always set. */81#define HWCAP_THUMB 0x0000000482#define HWCAP_26BIT 0x00000008 /* Unsupported, never set. */83#define HWCAP_FAST_MULT 0x00000010 /* Always set. */84#define HWCAP_FPA 0x00000020 /* Unsupported, never set. */85#define HWCAP_VFP 0x0000004086#define HWCAP_EDSP 0x00000080 /* Always set for ARMv6+. */87#define HWCAP_JAVA 0x00000100 /* Unsupported, never set. */88#define HWCAP_IWMMXT 0x00000200 /* Unsupported, never set. */89#define HWCAP_CRUNCH 0x00000400 /* Unsupported, never set. */90#define HWCAP_THUMBEE 0x0000080091#define HWCAP_NEON 0x0000100092#define HWCAP_VFPv3 0x0000200093#define HWCAP_VFPv3D16 0x0000400094#define HWCAP_TLS 0x00008000 /* Always set for ARMv6+. */95#define HWCAP_VFPv4 0x0001000096#define HWCAP_IDIVA 0x0002000097#define HWCAP_IDIVT 0x0004000098#define HWCAP_VFPD32 0x0008000099#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)100#define HWCAP_LPAE 0x00100000101#define HWCAP_EVTSTRM 0x00200000 /* Not implemented yet. */102103/* Flags passed in AT_HWCAP2. */104#define HWCAP2_AES 0x00000001105#define HWCAP2_PMULL 0x00000002106#define HWCAP2_SHA1 0x00000004107#define HWCAP2_SHA2 0x00000008108#define HWCAP2_CRC32 0x00000010109110#endif /* !_MACHINE_ELF_H_ */111112113