File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,47 @@ pub mod test_utils {
166166 }
167167 }
168168
169+ #[ cfg( target_arch = "aarch64" ) ]
170+ impl GICDevice for DummyIrqChip {
171+ fn device_properties ( & self ) -> Vec < u64 > {
172+ vec ! [ ]
173+ }
174+ fn vcpu_count ( & self ) -> u64 {
175+ 0
176+ }
177+ fn fdt_compatibility ( & self ) -> String {
178+ "vendor,dummy-gic" . into ( )
179+ }
180+ fn fdt_maint_irq ( & self ) -> u32 {
181+ 0
182+ }
183+ fn version ( & self ) -> u32 {
184+ 0
185+ }
186+ }
187+
188+ #[ cfg( target_arch = "riscv64" ) ]
189+ impl AIADevice for DummyIrqChip {
190+ fn aplic_compatibility ( & self ) -> & str {
191+ "riscv,aplic"
192+ }
193+ fn aplic_properties ( & self ) -> [ u32 ; 4 ] {
194+ [ 0 , 0 , 0 , 0 ]
195+ }
196+ fn imsic_compatibility ( & self ) -> & str {
197+ "riscv,imsics"
198+ }
199+ fn imsic_properties ( & self ) -> [ u32 ; 4 ] {
200+ [ 0 , 0 , 0 , 0 ]
201+ }
202+ fn vcpu_count ( & self ) -> u32 {
203+ 0
204+ }
205+ fn msi_compatible ( & self ) -> bool {
206+ false
207+ }
208+ }
209+
169210 impl BusDevice for DummyIrqChip { }
170211
171212 impl IrqChipT for DummyIrqChip {
You can’t perform that action at this time.
0 commit comments