Function report |
Source Code:arch\x86\kernel\apic\io_apic.c |
Create Date:2022-07-28 08:30:27 |
| Last Modify:2020-03-16 21:24:45 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This code may look a bit paranoid, but it's supposed to cooperate with* a wide range of boards and BIOS bugs. Fortunately only the timer IRQ* is so screwy. Thanks to Brian Perkins for testing/hacking this beast* fanatically on his truly buggy board.
Proto:static inline void __init check_timer(void)
Type:void
Parameter:Nothing
| 2128 | irq_data = irq_get_irq_data(0) |
| 2131 | node = cpu_to_node(0) |
| 2134 | no_pin1 = 0 |
| 2136 | If Not HPET replaces the PIT, when enabled. So we need to know, which of* the two timers is used Then Return |
| 2139 | local_irq_save(flags) |
| 2144 | mask(0) |
| 2155 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT) |
| 2156 | init(1) |
| 2159 | apic1 = find_isa_irq_apic(0, mp_INT) |
| 2163 | Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(Debugging macros, formational "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", vector, apic1, pin1, apic2, pin2) |
| 2174 | If pin1 == -1 Then |
| 2175 | panic_if_irq_remap("BIOS bug: timer not connected to IO-APIC") |
| 2178 | no_pin1 = 1 |
| 2179 | Else if pin2 == -1 Then |
| 2184 | If pin1 != -1 Then |
| 2186 | If no_pin1 Then |
| 2187 | mp_alloc_timer_irq(apic1, pin1) |
| 2188 | Else |
| 2196 | If idx != -1 && irq_trigger(idx) Then unmask_ioapic_irq(irq_get_irq_data(0)) |
| 2200 | irq_domain_activate_irq(irq_data, false) |
| 2202 | If disable_timer_pin_1 > 0 Then clear_IO_APIC_pin(0, pin1) |
| 2204 | Go to out |
| 2206 | panic_if_irq_remap("timer doesn't work through Interrupt-remapped IO-APIC") |
| 2207 | local_irq_disable() |
| 2208 | clear_IO_APIC_pin(apic1, pin1) |
| 2209 | If Not no_pin1 Then Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(Debugging macros, r conditions "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n") |
| 2213 | Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(Debugging macros, formational "...trying to set up timer (IRQ0) through the 8259A ...\n") |
| 2222 | irq_domain_activate_irq(irq_data, false) |
| 2223 | unmask(0) |
| 2226 | Go to out |
| 2231 | local_irq_disable() |
| 2232 | mask(0) |
| 2233 | clear_IO_APIC_pin(apic2, pin2) |
| 2237 | Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(Debugging macros, formational "...trying to set up timer as Virtual Wire IRQ...\n") |
| 2240 | lapic_register_intr(0) |
| 2241 | apic_write(APIC_LVT0, APIC_DM_FIXED | vector) |
| 2242 | unmask(0) |
| 2246 | Go to out |
| 2248 | local_irq_disable() |
| 2249 | mask(0) |
| 2250 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector) |
| 2256 | init(0) |
| 2257 | make_irq(0) |
| 2258 | apic_write(APIC_LVT0, APIC_DM_EXTINT) |
| 2264 | Go to out |
| 2266 | local_irq_disable() |
| 2268 | If apic_is_x2apic_enabled() Then Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(Debugging macros, formational "Perhaps problem with the pre-enabled x2apic mode\nTry booting with x2apic and interrupt-remapping disabled in the bios.\n") |
| 2274 | out : |
| 2275 | local_irq_restore(flags) |
| Name | Describe |
|---|---|
| setup_IO_APIC |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |