• Home
  • Raw
  • Download

Lines Matching refs:irq

43 fn encode_selector_from_irq(irq: usize, is_high_bits: bool) -> u8 {  in encode_selector_from_irq()
44 (irq as u8) * IOWIN_SCALE + IOWIN_OFF + (is_high_bits as u8) in encode_selector_from_irq()
250 pub fn service_irq(&mut self, irq: usize, level: bool) -> bool { in service_irq()
251 let entry = &mut self.redirect_table[irq]; in service_irq()
255 self.interrupt_level[irq] = false; in service_irq()
260 if entry.get_trigger_mode() == TriggerMode::Edge && self.interrupt_level[irq] { in service_irq()
264 self.interrupt_level[irq] = true; in service_irq()
278 if irq == RTC_IRQ && self.rtc_remote_irr { in service_irq()
282 let injected = match self.out_events.get(irq) { in service_irq()
289 } else if irq == RTC_IRQ && injected { in service_irq()
500 let irq = NUM_IOAPIC_PINS - 1; in set_up() localVariable
501 let ioapic = set_up_with_irq(irq, trigger); in set_up()
502 (ioapic, irq) in set_up()
505 fn set_up_with_irq(irq: usize, trigger: TriggerMode) -> Ioapic { in set_up_with_irq()
507 set_up_redirection_table_entry(&mut ioapic, irq, trigger); in set_up_with_irq()
508 ioapic.out_events[irq] = Some(IrqEvent { in set_up_with_irq()
528 fn read_entry(ioapic: &mut Ioapic, irq: usize) -> IoapicRedirectionTableEntry { in read_entry()
533 read_reg(ioapic, encode_selector_from_irq(irq, false)).into(), in read_entry()
538 read_reg(ioapic, encode_selector_from_irq(irq, true)).into(), in read_entry()
543 fn write_entry(ioapic: &mut Ioapic, irq: usize, entry: IoapicRedirectionTableEntry) { in write_entry()
546 encode_selector_from_irq(irq, false), in write_entry()
551 encode_selector_from_irq(irq, true), in write_entry()
556 fn set_up_redirection_table_entry(ioapic: &mut Ioapic, irq: usize, trigger_mode: TriggerMode) { in set_up_redirection_table_entry()
563 write_entry(ioapic, irq, entry); in set_up_redirection_table_entry()
566 fn set_mask(ioapic: &mut Ioapic, irq: usize, mask: bool) { in set_mask()
567 let mut entry = read_entry(ioapic, irq); in set_mask()
569 write_entry(ioapic, irq, entry); in set_mask()
640 let (mut ioapic, irq) = set_up(TriggerMode::Level); in service_level_irq()
643 ioapic.service_irq(irq, true); in service_level_irq()
644 ioapic.service_irq(irq, false); in service_level_irq()
649 let (mut ioapic, irq) = set_up(TriggerMode::Level); in service_multiple_level_irqs()
651 ioapic.service_irq(irq, true); in service_multiple_level_irqs()
652 ioapic.service_irq(irq, false); in service_multiple_level_irqs()
654 ioapic.service_irq(irq, true); in service_multiple_level_irqs()
661 let (mut ioapic, irq) = set_up(TriggerMode::Level); in coalesce_multiple_level_irqs()
664 ioapic.service_irq(irq, true); in coalesce_multiple_level_irqs()
665 ioapic.service_irq(irq, false); in coalesce_multiple_level_irqs()
666 ioapic.service_irq(irq, true); in coalesce_multiple_level_irqs()
672 let irq = RTC_IRQ; in coalesce_multiple_rtc_irqs() localVariable
673 let mut ioapic = set_up_with_irq(irq, TriggerMode::Edge); in coalesce_multiple_rtc_irqs()
676 ioapic.service_irq(irq, true); in coalesce_multiple_rtc_irqs()
677 ioapic.service_irq(irq, false); in coalesce_multiple_rtc_irqs()
678 ioapic.service_irq(irq, true); in coalesce_multiple_rtc_irqs()
685 let (mut ioapic, irq) = set_up(TriggerMode::Level); in reinject_level_interrupt()
688 ioapic.service_irq(irq, true); in reinject_level_interrupt()
689 ioapic.service_irq(irq, false); in reinject_level_interrupt()
690 ioapic.service_irq(irq, true); in reinject_level_interrupt()
699 let (mut ioapic, irq) = set_up(TriggerMode::Edge); in service_edge_triggered_irq()
702 ioapic.service_irq(irq, true); in service_edge_triggered_irq()
703 ioapic.service_irq(irq, true); // Repeated asserts before a deassert should be ignored. in service_edge_triggered_irq()
704 ioapic.service_irq(irq, false); in service_edge_triggered_irq()
711 let (mut ioapic, irq) = set_up(TriggerMode::Edge); in edge_trigger_unmask_test()
715 ioapic.service_irq(irq, true); in edge_trigger_unmask_test()
717 set_mask(&mut ioapic, irq, true); in edge_trigger_unmask_test()
718 ioapic.service_irq(irq, false); in edge_trigger_unmask_test()
721 ioapic.service_irq(irq, true); in edge_trigger_unmask_test()
722 ioapic.service_irq(irq, false); in edge_trigger_unmask_test()
724 set_mask(&mut ioapic, irq, false); in edge_trigger_unmask_test()
728 ioapic.service_irq(irq, true); in edge_trigger_unmask_test()
729 ioapic.service_irq(irq, false); in edge_trigger_unmask_test()
736 let (mut ioapic, irq) = set_up(TriggerMode::Level); in level_trigger_unmask_test()
738 set_mask(&mut ioapic, irq, true); in level_trigger_unmask_test()
739 ioapic.service_irq(irq, true); in level_trigger_unmask_test()
742 set_mask(&mut ioapic, irq, false); in level_trigger_unmask_test()
749 let (mut ioapic, irq) = set_up(TriggerMode::Edge); in end_of_interrupt_edge_triggered_irq()
752 ioapic.service_irq(irq, true); in end_of_interrupt_edge_triggered_irq()
755 ioapic.service_irq(irq, true); in end_of_interrupt_edge_triggered_irq()
756 ioapic.service_irq(irq, false); in end_of_interrupt_edge_triggered_irq()
762 let (mut ioapic, irq) = set_up(TriggerMode::Edge); in service_multiple_edge_irqs()
764 ioapic.service_irq(irq, true); in service_multiple_edge_irqs()
766 ioapic.service_irq(irq, false); in service_multiple_edge_irqs()
768 ioapic.service_irq(irq, true); in service_multiple_edge_irqs()
770 ioapic.service_irq(irq, false); in service_multiple_edge_irqs()
776 let (mut ioapic, irq) = set_up(TriggerMode::Level); in service_negative_polarity_irq()
778 let mut entry = read_entry(&mut ioapic, irq); in service_negative_polarity_irq()
780 write_entry(&mut ioapic, irq, entry); in service_negative_polarity_irq()
783 ioapic.service_irq(irq, false); in service_negative_polarity_irq()
789 let (mut ioapic, irq) = set_up(TriggerMode::Level); in remote_irr_read_only()
791 ioapic.redirect_table[irq].set_remote_irr(true); in remote_irr_read_only()
793 let mut entry = read_entry(&mut ioapic, irq); in remote_irr_read_only()
795 write_entry(&mut ioapic, irq, entry); in remote_irr_read_only()
797 assert_eq!(read_entry(&mut ioapic, irq).get_remote_irr(), true); in remote_irr_read_only()
802 let (mut ioapic, irq) = set_up(TriggerMode::Level); in delivery_status_read_only()
804 ioapic.redirect_table[irq].set_delivery_status(DeliveryStatus::Pending); in delivery_status_read_only()
806 let mut entry = read_entry(&mut ioapic, irq); in delivery_status_read_only()
808 write_entry(&mut ioapic, irq, entry); in delivery_status_read_only()
811 read_entry(&mut ioapic, irq).get_delivery_status(), in delivery_status_read_only()
818 let (mut ioapic, irq) = set_up(TriggerMode::Level); in level_to_edge_transition_clears_remote_irr()
820 ioapic.redirect_table[irq].set_remote_irr(true); in level_to_edge_transition_clears_remote_irr()
822 let mut entry = read_entry(&mut ioapic, irq); in level_to_edge_transition_clears_remote_irr()
824 write_entry(&mut ioapic, irq, entry); in level_to_edge_transition_clears_remote_irr()
826 assert_eq!(read_entry(&mut ioapic, irq).get_remote_irr(), false); in level_to_edge_transition_clears_remote_irr()
831 let (mut ioapic, irq) = set_up(TriggerMode::Level); in masking_preserves_remote_irr()
833 ioapic.redirect_table[irq].set_remote_irr(true); in masking_preserves_remote_irr()
835 set_mask(&mut ioapic, irq, true); in masking_preserves_remote_irr()
836 set_mask(&mut ioapic, irq, false); in masking_preserves_remote_irr()
838 assert_eq!(read_entry(&mut ioapic, irq).get_remote_irr(), true); in masking_preserves_remote_irr()
844 let (mut ioapic, irq) = set_up(TriggerMode::Level); in reconfiguration_race()
848 ioapic.service_irq(irq, true); in reconfiguration_race()
851 let mut entry = read_entry(&mut ioapic, irq); in reconfiguration_race()
854 ioapic.service_irq(irq, false); in reconfiguration_race()
858 write_entry(&mut ioapic, irq, entry); in reconfiguration_race()
862 ioapic.service_irq(irq, true); in reconfiguration_race()
863 ioapic.service_irq(irq, false); in reconfiguration_race()
869 let (mut ioapic, irq) = set_up(TriggerMode::Level); in implicit_eoi()
872 ioapic.service_irq(irq, true); in implicit_eoi()
874 ioapic.service_irq(irq, false); in implicit_eoi()
877 let mut entry = read_entry(&mut ioapic, irq); in implicit_eoi()
879 write_entry(&mut ioapic, irq, entry); in implicit_eoi()
881 write_entry(&mut ioapic, irq, entry); in implicit_eoi()
884 ioapic.service_irq(irq, true); in implicit_eoi()
886 ioapic.service_irq(irq, false); in implicit_eoi()
915 let (mut ioapic, irq) = set_up(TriggerMode::Edge); in set_redirection_entry_by_bits()
916 write_entry(&mut ioapic, irq, entry); in set_redirection_entry_by_bits()
918 read_entry(&mut ioapic, irq).get_trigger_mode(), in set_redirection_entry_by_bits()
923 ioapic.service_irq(irq, true); in set_redirection_entry_by_bits()