@@ -15,11 +15,13 @@ use aarch64_cpu::registers::Readable;
15
15
use aarch64_cpu:: registers:: TTBR0_EL1 ;
16
16
use log:: debug;
17
17
use sel4_common:: arch:: ArchReg :: * ;
18
- use sel4_common:: fault:: seL4_Fault_t;
19
18
use sel4_common:: print;
20
19
use sel4_common:: sel4_config:: seL4_MsgMaxLength;
21
20
use sel4_common:: structures:: exception_t;
22
21
use sel4_common:: structures_gen:: cap_tag;
22
+ use sel4_common:: structures_gen:: seL4_Fault_UnknownSyscall;
23
+ use sel4_common:: structures_gen:: seL4_Fault_UserException;
24
+ use sel4_common:: structures_gen:: seL4_Fault_VMFault;
23
25
use sel4_common:: utils:: global_read;
24
26
use sel4_task:: { activateThread, get_currenct_thread, get_current_domain, schedule} ;
25
27
@@ -85,7 +87,7 @@ pub fn handleUnknownSyscall(w: isize) -> exception_t {
85
87
return exception_t:: EXCEPTION_NONE ;
86
88
}
87
89
unsafe {
88
- current_fault = seL4_Fault_t :: new_unknown_syscall_fault ( w as usize ) ;
90
+ current_fault = seL4_Fault_UnknownSyscall :: new ( w as u64 ) . unsplay ( ) ;
89
91
handle_fault ( get_currenct_thread ( ) ) ;
90
92
}
91
93
schedule ( ) ;
@@ -96,7 +98,7 @@ pub fn handleUnknownSyscall(w: isize) -> exception_t {
96
98
#[ no_mangle]
97
99
pub fn handleUserLevelFault ( w_a : usize , w_b : usize ) -> exception_t {
98
100
unsafe {
99
- current_fault = seL4_Fault_t :: new_user_exeception ( w_a, w_b) ;
101
+ current_fault = seL4_Fault_UserException :: new ( w_a as u64 , w_b as u64 ) . unsplay ( ) ;
100
102
handle_fault ( get_currenct_thread ( ) ) ;
101
103
}
102
104
schedule ( ) ;
@@ -159,16 +161,19 @@ pub fn handle_vm_fault(type_: usize) -> exception_t {
159
161
let fault = get_esr ( ) ;
160
162
log:: debug!( "fault addr: {:#x} esr: {:#x}" , addr, fault) ;
161
163
unsafe {
162
- current_fault = seL4_Fault_t:: new_vm_fault ( addr, fault, 0 ) ;
164
+ current_fault = seL4_Fault_VMFault:: new ( addr as u64 , fault as u64 , 0 )
165
+ . unsplay ( )
166
+ . clone ( ) ;
163
167
}
164
- log:: debug!( "current_fault: {:#x?}" , global_read!( current_fault) ) ;
168
+ let current_fault_cpy = unsafe { current_fault. clone ( ) } ;
169
+ log:: debug!( "current_fault: {:#x?}" , global_read!( current_fault_cpy) ) ;
165
170
exception_t:: EXCEPTION_FAULT
166
171
}
167
172
ARMPrefetchAbort => {
168
173
let pc = get_currenct_thread ( ) . tcbArch . get_register ( FaultIP ) ;
169
174
let fault = get_esr ( ) ;
170
175
unsafe {
171
- current_fault = seL4_Fault_t :: new_vm_fault ( pc, fault, 1 ) ;
176
+ current_fault = seL4_Fault_VMFault :: new ( pc as u64 , fault as u64 , 1 ) . unsplay ( ) ;
172
177
}
173
178
174
179
log:: debug!( "ttbr0_el1: {:#x?}" , TTBR0_EL1 . get( ) ) ;
0 commit comments