diff --git a/src/x86/apic.c b/src/x86/apic.c index 1d677e7..9d6d113 100644 --- a/src/x86/apic.c +++ b/src/x86/apic.c @@ -7,7 +7,7 @@ void apic_enable() void apic_eoi() { - + apic_registers->eoi.value = 0; } void apic_send_ipi( @@ -19,5 +19,17 @@ void apic_send_ipi( enum apic_destination_shorthand_t shorthand, uint32_t destination) { - + struct apic_icr_t value = { + .vector = vector, + .delivery_mode = delivery_mode, + .destination_mode = destination_mode, + .level = level, + .trigger_mode = trigger_mode, + .destination_shorthand = shorthand, + .destination = destination + }; + uint32_t *value_addr = (uint32_t*) &value; + uint32_t *icr_addr = (uint32_t*)&apic_registers->interrput_command; + icr_addr[4] = value_addr[4]; + icr_addr[0] = value_addr[0]; } \ No newline at end of file