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 {
166
166
}
167
167
}
168
168
169
+ #[ cfg( all( any( test, feature = "test_utils" ) , 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( all( any( test, feature = "test_utils" ) , 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
+
169
210
impl BusDevice for DummyIrqChip { }
170
211
171
212
impl IrqChipT for DummyIrqChip {
You can’t perform that action at this time.
0 commit comments