I am reading the source code of xv6(http://pdos.csail.mit.edu/6.828/2011/xv6.html) recently, which can handle multiple processors. Something confuses me.
In its mpinit function there is a snippet:
Code: Select all
if(mp->imcrp){
// Bochs doesn't support IMCR, so this doesn't run on Bochs.
// But it would on real hardware.
outb(0x22, 0x70); // Select IMCR
outb(0x23, inb(0x23) | 1); // Mask external interrupts.
}
Hope someone could help me. Thanks in advance.
Addition:
When boot, the local APIC is software disabled, so some IRQs cannot be handled. Maybe the comment refer to this???