@@ -6,7 +6,7 @@ use core::sync::atomic::{AtomicU64, Ordering};
66
77use aarch64:: regs:: * ;
88use ahash:: RandomState ;
9- use arm_gic:: gicv3:: { GicV3 , SgiTarget } ;
9+ use arm_gic:: gicv3:: { GicV3 , InterruptGroup , SgiTarget , SgiTargetGroup } ;
1010use arm_gic:: { IntId , Trigger } ;
1111use hashbrown:: HashMap ;
1212use hermit_dtb:: Dtb ;
@@ -115,7 +115,7 @@ pub(crate) fn install_handlers() {
115115
116116#[ unsafe( no_mangle) ]
117117pub ( crate ) extern "C" fn do_fiq ( _state : & State ) -> * mut usize {
118- if let Some ( irqid) = GicV3 :: get_and_acknowledge_interrupt ( ) {
118+ if let Some ( irqid) = GicV3 :: get_and_acknowledge_interrupt ( InterruptGroup :: Group1 ) {
119119 let vector: u8 = u32:: from ( irqid) . try_into ( ) . unwrap ( ) ;
120120
121121 debug ! ( "Receive fiq {vector}" ) ;
@@ -131,7 +131,7 @@ pub(crate) extern "C" fn do_fiq(_state: &State) -> *mut usize {
131131 crate :: executor:: run ( ) ;
132132 core_scheduler ( ) . handle_waiting_tasks ( ) ;
133133
134- GicV3 :: end_interrupt ( irqid) ;
134+ GicV3 :: end_interrupt ( irqid, InterruptGroup :: Group1 ) ;
135135
136136 return core_scheduler ( ) . scheduler ( ) . unwrap_or_default ( ) ;
137137 }
@@ -141,7 +141,7 @@ pub(crate) extern "C" fn do_fiq(_state: &State) -> *mut usize {
141141
142142#[ unsafe( no_mangle) ]
143143pub ( crate ) extern "C" fn do_irq ( _state : & State ) -> * mut usize {
144- if let Some ( irqid) = GicV3 :: get_and_acknowledge_interrupt ( ) {
144+ if let Some ( irqid) = GicV3 :: get_and_acknowledge_interrupt ( InterruptGroup :: Group1 ) {
145145 let vector: u8 = u32:: from ( irqid) . try_into ( ) . unwrap ( ) ;
146146
147147 debug ! ( "Receive interrupt {vector}" ) ;
@@ -157,7 +157,7 @@ pub(crate) extern "C" fn do_irq(_state: &State) -> *mut usize {
157157 crate :: executor:: run ( ) ;
158158 core_scheduler ( ) . handle_waiting_tasks ( ) ;
159159
160- GicV3 :: end_interrupt ( irqid) ;
160+ GicV3 :: end_interrupt ( irqid, InterruptGroup :: Group1 ) ;
161161
162162 return core_scheduler ( ) . scheduler ( ) . unwrap_or_default ( ) ;
163163 }
@@ -188,8 +188,8 @@ pub(crate) extern "C" fn do_sync(state: &State) {
188188 error ! ( "Table Base Register {:#x}" , TTBR0_EL1 . get( ) ) ;
189189 error ! ( "Exception Syndrome Register {esr:#x}" ) ;
190190
191- if let Some ( irqid) = GicV3 :: get_and_acknowledge_interrupt ( ) {
192- GicV3 :: end_interrupt ( irqid) ;
191+ if let Some ( irqid) = GicV3 :: get_and_acknowledge_interrupt ( InterruptGroup :: Group1 ) {
192+ GicV3 :: end_interrupt ( irqid, InterruptGroup :: Group1 ) ;
193193 } else {
194194 error ! ( "Unable to acknowledge interrupt!" ) ;
195195 }
@@ -237,6 +237,7 @@ pub fn wakeup_core(core_id: CoreId) {
237237 affinity1 : 0 ,
238238 target_list : 1 << core_id,
239239 } ,
240+ SgiTargetGroup :: CurrentGroup1 ,
240241 ) ;
241242}
242243
0 commit comments