3 #include "per_cpu_data.h"
14 Request = APIC_IRQ_BASE - 1,
15 Global_request = APIC_IRQ_BASE + 2,
16 Debug = APIC_IRQ_BASE - 2
21 //---------------------------------------------------------------------------
29 Ipi::Ipi() : _apic_id(~0)
34 * \param cpu the logical CPU number of the current CPU.
35 * \pre cpu == current CPU.
37 IMPLEMENT static inline NEEDS["apic.h"]
39 Ipi::init(unsigned cpu)
41 _ipi.cpu(cpu)._apic_id = Apic::get_id();
47 Ipi::ipi_call_debug_arch()
49 //ipi_call_spin(); // debug
52 PUBLIC static inline NEEDS["apic.h"]
54 Ipi::eoi(Message, unsigned cpu)
60 PUBLIC static inline NEEDS["apic.h"]
62 Ipi::send(Message m, unsigned from_cpu, unsigned to_cpu)
64 Apic::mp_send_ipi(_ipi.cpu(to_cpu)._apic_id, (Unsigned8)m);
68 PUBLIC static inline NEEDS["apic.h"]
70 Ipi::bcast(Message m, unsigned from_cpu)
73 Apic::mp_send_ipi(Apic::APIC_IPI_OTHERS, (Unsigned8)m);
76 #if defined(CONFIG_IRQ_SPINNER)
80 void Ipi::ipi_call_spin()
84 for (cpu = 0; cpu < Config::Max_num_cpus; ++cpu)
86 if (!Per_cpu_data::valid(cpu))
89 if (_ipi.cpu(cpu)._apic_id == Apic::get_id())
99 *(unsigned char*)(Mem_layout::Adap_vram_cga_beg + 22*160 + cpu*+2)
100 = '0' + (ipi->_count++ % 10);