OpenPOWER Library

 4.1.2.3. Auxiliary Vector

The argument and environment vectors transmit information from one application program to another. However, the auxiliary vector conveys information from the operating system to the program. This vector is an array of structures, defined as follows:

typedef struct
{
   long a_type;
   union
      {
         long a_val;
         void *a_ptr;
         void (*a_fcn)( );
      } a_un;
} auxv_t;
 
Name                  Value   a_un field    Comment
AT_NULL               0       ignored       /* End of vector */
AT_PHDR               3       a_ptr         /* Program headers for program */
AT_PHENT              4       a_val         /* Size of program header entry */
AT_PHNUM              5       a_val         /* Number of program headers */
AT_PAGESZ             6       a_val         /* System page size */
AT_BASE               7       a_ptr         /* Base address of interpreter */
AT_FLAGS              8       a_val         /* Flags */
AT_ENTRY              9       a_ptr         /* Entry point of program */
AT_UID                11                    /* Real user ID (uid) */
AT_EUID               12                    /* Effective user ID (euid) */
AT_GID                13                    /* Real group ID (gid) */
AT_EGID               14                    /* Effective group ID (egid) */
AT_PLATFORM           15      a_ptr         /* String identifying platform. */
AT_HWCAP              16      a_val         /* Machine-dependent hints about 
                                         processor capabilities. */
AT_CLKTCK             17                    /* Frequency of times( ), always 100 */
AT_DCACHEBSIZE        19      a_val         /* Data cache block size */
AT_ICACHEBSIZE        20      a_val         /* Instruction cache block size */
AT_UCACHEBSIZE        21      a_val         /* Unified cache block size */
AT_IGNOREPPC          22                    /* Ignore this entry! */
AT_SECURE             23                    /* Boolean, was exec authorized to use 
                                         setuid or setgid */
AT_BASE_PLATFORM      24      a_ptr         /* String identifying real platforms */
AT_RANDOM             25                    /* Address of 16 random bytes */
AT_HWCAP2             26      a_val         /* More machine-dependent hints about 
                                         processor capabilities. */
AT_EXECFN             31                    /* File name of executable */
AT_SYSINFO_EHDR       33                    /* In many architectures, the kernel 
                                            provides a virtual dynamic shared 
                                            object (VDSO) that contains a function 
                                            callable from the user state.   
                                            AT_SYSINFO_EHDR is the address of the
                                            VDSO header that is used by the
                                            dynamic linker to resolve function 
                                            symbols with the VDSO. */
AT_L1I_CACHESIZE      40                    /* Cache sizes and geometries. */
AT_L1I_CACHEGEOMETRY  41
AT_L1D_CACHESIZE      42
AT_L1D_CACHEGEOMETRY  43
AT_L2_CACHESIZE       44
AT_L2_CACHEGEOMETRY   45
AT_L3_CACHESIZE       46
AT_L3_CACHEGEOMETRY   47
	

AT_NULL

The auxiliary vector has no fixed length; instead an entry of this type denotes the end of the vector. The corresponding value of a_un is undefined.

AT_PHDR

Under some conditions, the system creates the memory image of the application program before passing control to an interpreter program. When this happens, the a_ptr member of the AT_PHDR entry tells the interpreter where to find the program header table in the memory image. If the AT_PHDR entry is present, entries of types AT_PHENT, AT_PHNUM, and AT_ENTRY must also be present. See the Program Header section in Chapter 5 of the System V ABI for more information about the program header table.

AT_PHENT

The a_val member of this entry holds the size, in bytes, of one entry in the program header table to which the AT_PHDR entry points.

AT_PHNUM

The a_val member of this entry holds the number of entries in the program header table to which the AT_PHDR entry points.

AT_PAGESZ

If present, this entry's a_val member gives the system page size in bytes. The same information is also available through the sysconf system call.

AT_BASE

The a_ptr member of this entry holds the base address at which the interpreter program was loaded into memory. See the Program Header section in Chapter 5 of the System V ABI for more information about the base address.

AT_FLAGS

If present, the a_val member of this entry holds 1-bit flags. Bits with undefined semantics are set to zero. Other auxiliary vector types are reserved. No flags are currently defined for AT_FLAGS on the 64-bit OpenPOWER ABI Architecture.

AT_ENTRY

The a_ptr member of this entry holds the entry point of the application program to which the interpreter program should transfer control.

AT_DCACHEBSIZE

The a_val member of this entry gives the data cache block size for processors on the system on which this program is running. If the processors have unified caches, AT_DCACHEBSIZE is the same as AT_UCACHEBSIZE.

AT_ICACHEBSIZE

The a_val member of this entry gives the instruction cache block size for processors on the system on which this program is running. If the processors have unified caches, AT_ICACHEBSIZE is the same as AT_UCACHEBSIZE.

AT_UCACHEBSIZE

The a_val member of this entry is zero if the processors on the system on which this program is running do not have a unified instruction and data cache. Otherwise, it gives the cache block size.

AT_PLATFORM

The a_ptr member is the address of the platform name string. For virtualized systems, this may be different (that is, an older platform) than the physical machine running this environment.

AT_BASE_PLATFORM

The a_ptr member is the address of the platform name string for the physical machine. For virtualized systems, this will be the platform name of the real hardware.

AT_HWCAP

The a_val member of this entry is a bit map of hardware capabilities. Some bit mask values include:

PPC_FEATURE_32            0x80000000 /* Always set for powerpc64 */
PPC_FEATURE_64            0x40000000 /* Always set for powerpc64 */
PPC_FEATURE_HAS_ALTIVEC   0x10000000
PPC_FEATURE_HAS_FPU       0x08000000
PPC_FEATURE_HAS_MMU       0x04000000
PPC_FEATURE_UNIFIED_CACHE 0x01000000
PPC_FEATURE_NO_TB         0x00100000 /* 601/403gx have no timebase */
PPC_FEATURE_POWER4        0x00080000 /* POWER4 ISA 2.00 */
PPC_FEATURE_POWER5        0x00040000 /* POWER5 ISA 2.02 */
PPC_FEATURE_POWER5_PLUS   0x00020000 /* POWER5+ ISA 2.03 */
PPC_FEATURE_CELL_BE       0x00010000 /* CELL Broadband Engine */
PPC_FEATURE_BOOKE         0x00008000 /* ISA Category Embedded */
PPC_FEATURE_SMT           0x00004000 /* Simultaneous Multi-Threading */
PPC_FEATURE_ICACHE_SNOOP  0x00002000
PPC_FEATURE_ARCH_2_05     0x00001000 /* ISA 2.05 */
PPC_FEATURE_PA6T          0x00000800 /* PA Semi 6T Core */
PPC_FEATURE_HAS_DFP       0x00000400 /* Decimal FP Unit */
PPC_FEATURE_POWER6_EXT    0x00000200 /* P6 + mffgpr/mftgpr */
PPC_FEATURE_ARCH_2_06     0x00000100 /* ISA 2.06 */
PPC_FEATURE_HAS_VSX       0x00000080 /* P7 Vector Extension. */
PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040
PPC_FEATURE_TRUE_LE       0x00000002
PPC_FEATURE_PPC_LE        0x00000001

AT_HWCAP2

The a_val member of this entry is a bit map of hardware capabilities. Some bit mask values include:

PPC_FEATURE2_ARCH_2_07    0x80000000 /* ISA 2.07 */
PPC_FEATURE2_HAS_HTM      0x40000000 /* Hardware Transactional Memory */
PPC_FEATURE2_HAS_DSCR     0x20000000 /* Data Stream Control Register */
PPC_FEATURE2_HAS_EBB      0x10000000 /* Event Base Branching */
PPC_FEATURE2_HAS_ISEL     0x08000000 /* Integer Select */
PPC_FEATURE2_HAS_TAR      0x04000000 /* Target Address Register */
PPC_FEATURE2_HAS_VCRYPTO  0x02000000 /* The processor implements the
                                        Vector.AES category */
PPC_FEATURE2_HTM_NOSC     0x01000000
PPC_FEATURE2_ARCH_3_00    0x00800000 /* ISA 3.0 */
PPC_FEATURE2_HAS_IEEE128  0x00400000 /* VSX IEEE Binary Float 128-bit */

When a process starts to execute, its stack holds the arguments, environment, and auxiliary vector received from the exec call. The system makes no guarantees about the relative arrangement of argument strings, environment strings, and the auxiliary information, which appear in no defined or predictable order. Further, the system may allocate memory after the null auxiliary vector entry and before the beginning of the information block.

AT_L1I_CACHESIZE

The size of the level-1 instruction cache, in bytes.

AT_L1I_CACHEGEOMETRY

The geometry of the level-1 instruction cache. The low-order sixteen bits contain the cache associativity as a value N, where N = 1 represents a direct-mapped cache, N = 0xffff represents a fully associative cache, and any other N represents an N-way set-associative cache. The next higher-order sixteen bits contain the size of the cache line in bytes. Note that the cache line size is not necessarily the same as the cache block size.

AT_L1D_CACHESIZE

The size of the level-1 data cache, in bytes.

AT_L1D_CACHEGEOMETRY

The geometry of the level-1 data cache, defined in the same manner as for AT_L1I_CACHEGEOMETRY.

AT_L2_CACHESIZE

The size of the level-2 cache, in bytes.

AT_L2_CACHEGEOMETRY

The geometry of the level-2 cache, defined in the same manner as for AT_L1I_CACHEGEOMETRY.

AT_L3_CACHESIZE

The size of the level-3 cache, in bytes.

AT_L3_CACHEGEOMETRY

The geometry of the level-3 cache, defined in the same manner as for AT_L1I_CACHEGEOMETRY.


loading table of contents...