/* Set the vector field in the specified RTE. 
This associates an IRQ with the desired vector in the IDT.  */
__boot_func void z_loapic_int_vec_set(unsigned int irq, unsigned int vector)
/* Set the vector field in the specified RTE. 
This associates an IRQ with the desired vector in the IDT.  */
__boot_func void z_loapic_int_vec_set(unsigned int irq, unsigned int vector)
{
	unsigned int oldLevel;
	oldLevel = irq_lock();
	x86_write_loapic(LOAPIC_TIMER + (irq * 0x10),
		     (x86_read_loapic(LOAPIC_TIMER + (irq * 0x10)) &
		      ~LOAPIC_VECTOR) | vector);
	irq_unlock(oldLevel);
}