INIT IPI help

From: Jonathan M. McCune
Date: Tue Mar 06 2007 - 11:29:45 EST


Hello,

I have Linux kernel 2.6.20-rc5 running on an AMD64 CPU, although I'm
running an i386 (not amd64) kernel. I need to send an INIT
inter-processor-interrupt from the BSP to all APs (there is one AP in my
case since my system has a dual-core CPU). After using CPU-hotplug to
disable CPU1, I am using this code to [hopefully] send an IPI:

apic_write(APIC_ICR, APIC_DEST_ALLBUT | APIC_INT_ASSERT | APIC_DM_INIT);

while(apic_read(APIC_ICR) & APIC_ICR_BUSY) {
mdelay(1);
}

My motivation for doing this is in preparation for executing an SKINIT
instruction, which requires all APs to be in the INIT state so that a
copy of the up-to-64KB Secure Loader Block (SLB) provided as an argument
to SKINIT can be successfully transmitted to the system's TPM where it
is hashed. No hash value is being computed, which is my problem.

Now, SKINIT is a complex instruction with multiple opportunities to
fail, and my motivation for writing this email is only to get a sense of
whether my code above is the right way to send an INIT IPI to the AP.
After executing the code above, can I be confident that the AP is in the
INIT state?

Thanks,
-Jon


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/