1 /* 2 ** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 ** Distributed under the terms of the Haiku License. 4 */ 5 #ifndef _KERNEL_ARCH_ARM_CPU_H 6 #define _KERNEL_ARCH_ARM_CPU_H 7 8 #ifndef _ASSEMBLER 9 10 #include <arch/arm/arch_thread_types.h> 11 #include <kernel.h> 12 13 /* raw exception frames */ 14 struct iframe { 15 uint32 spsr; 16 uint32 r0; 17 uint32 r1; 18 uint32 r2; 19 uint32 r3; 20 uint32 r4; 21 uint32 r5; 22 uint32 r6; 23 uint32 r7; 24 uint32 r8; 25 uint32 r9; 26 uint32 r10; 27 uint32 r11; 28 uint32 r12; 29 uint32 usr_sp; 30 uint32 usr_lr; 31 uint32 svc_sp; 32 uint32 svc_lr; 33 uint32 pc; 34 } _PACKED; 35 36 /**! Values for arch_cpu_info.arch */ 37 enum { 38 ARCH_ARM_PRE_ARM7, 39 ARCH_ARM_v3, 40 ARCH_ARM_v4, 41 ARCH_ARM_v4T, 42 ARCH_ARM_v5, 43 ARCH_ARM_v5T, 44 ARCH_ARM_v5TE, 45 ARCH_ARM_v5TEJ, 46 ARCH_ARM_v6 47 }; 48 49 typedef struct arch_cpu_info { 50 /* For a detailed interpretation of these values, 51 see "The System Control coprocessor", 52 "Main ID register" in your ARM ARM */ 53 int implementor; 54 int part_number; 55 int revision; 56 int variant; 57 int arch; 58 } arch_cpu_info; 59 60 #ifdef __cplusplus 61 extern "C" { 62 #endif 63 64 extern addr_t arm_get_far(void); 65 extern int32 arm_get_fsr(void); 66 extern addr_t arm_get_fp(void); 67 68 extern int mmu_read_c1(void); 69 extern int mmu_write_c1(int val); 70 71 #ifdef __cplusplus 72 }; 73 #endif 74 75 #endif // !_ASSEMBLER 76 77 #endif /* _KERNEL_ARCH_ARM_CPU_H */ 78