1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright (c) 2014 Joyent, Inc. All rights reserved. 14 */ 15 16 #ifndef _SYS_CPUID_IMPL_H 17 #define _SYS_CPUID_IMPL_H 18 19 #include <sys/stdint.h> 20 #include <sys/arm_archext.h> 21 #include <sys/types.h> 22 23 /* 24 * Routines to read ARM cpuid co-processors 25 */ 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 typedef struct arm_cpuid_cache { 32 boolean_t acc_exists; 33 boolean_t acc_rcolor; 34 uint8_t acc_assoc; 35 uint8_t acc_linesz; 36 uint32_t acc_size; 37 } arm_cpuid_cache_t; 38 39 typedef struct arm_cpuid { 40 uint32_t ac_ident; 41 uint32_t ac_pfr[2]; 42 uint32_t ac_dfr; 43 uint32_t ac_mmfr[4]; 44 uint32_t ac_isar[6]; 45 uint32_t ac_fpident; 46 uint32_t ac_mvfr[2]; 47 boolean_t ac_unifiedl1; 48 arm_cpuid_cache_t ac_icache; 49 arm_cpuid_cache_t ac_dcache; 50 } arm_cpuid_t; 51 52 extern uint32_t arm_cpuid_idreg(); 53 extern uint32_t arm_cpuid_pfr0(); 54 extern uint32_t arm_cpuid_pfr1(); 55 extern uint32_t arm_cpuid_dfr0(); 56 extern uint32_t arm_cpuid_mmfr0(); 57 extern uint32_t arm_cpuid_mmfr1(); 58 extern uint32_t arm_cpuid_mmfr2(); 59 extern uint32_t arm_cpuid_mmfr3(); 60 extern uint32_t arm_cpuid_isar0(); 61 extern uint32_t arm_cpuid_isar1(); 62 extern uint32_t arm_cpuid_isar2(); 63 extern uint32_t arm_cpuid_isar3(); 64 extern uint32_t arm_cpuid_isar4(); 65 extern uint32_t arm_cpuid_isar5(); 66 67 extern uint32_t arm_cpuid_vfpidreg(); 68 extern uint32_t arm_cpuid_mvfr0(); 69 extern uint32_t arm_cpuid_mvfr1(); 70 71 extern uint32_t arm_cpuid_ctr(); 72 73 #ifdef __cplusplus 74 } 75 #endif 76 77 #endif /* _SYS_CPUID_IMPL_H */