ARM: Cleanup of port support code.

This also implements the fault handler correctly now, and cleans up the
exception handling. Seems a lot more stable now, no unexpected panics or
faults happening anymore.
This commit is contained in:
Ithamar R. Adema
2012-11-07 16:24:22 +01:00
parent 0cf5ecba12
commit f86b582848
9 changed files with 400 additions and 250 deletions
+19 -3
View File
@@ -12,6 +12,7 @@
/* raw exception frames */
struct iframe {
uint32 spsr;
uint32 r0;
uint32 r1;
uint32 r2;
@@ -25,10 +26,11 @@ struct iframe {
uint32 r10;
uint32 r11;
uint32 r12;
uint32 r13;
uint32 lr;
uint32 usr_sp;
uint32 usr_lr;
uint32 svc_sp;
uint32 svc_lr;
uint32 pc;
uint32 cpsr;
} _PACKED;
typedef struct arch_cpu_info {
@@ -40,6 +42,20 @@ extern int arch_mmu_type;
extern int arch_platform;
extern int arch_machine;
#ifdef __cplusplus
extern "C" {
#endif
extern addr_t arm_get_far(void);
extern int32 arm_get_fsr(void);
extern int mmu_read_c1(void);
extern int mmu_write_c1(int val);
#ifdef __cplusplus
};
#endif
#endif // !_ASSEMBLER
#endif /* _KERNEL_ARCH_ARM_CPU_H */