APIC: Difference between revisions

930 bytes removed ,  3 years ago
Remove crappy plug to self promotion of kernel
[unchecked revision][unchecked revision]
m (correct masks in example code)
(Remove crappy plug to self promotion of kernel)
Line 433:
 
More info can be found in [https://books.google.nl/books?id=TVzjEZg1--YC&printsec=frontcover "Pentium Processor System Architecture. Chapter 15: The APIC"]
 
== SIPI Sequence ==
 
The INIT-SIPI sequence is done by the operating system after the firmware already gives the first INIT signal. This example code from the [ Silcos Kernel http://wiki.osdev.org/Silcos_Kernel]
 
<source lang="C">
void APIC::wakeupSequence(U32 apicId, U8 pvect)
{
ICRHigh hreg = {
.destField = apicId
};
 
ICRLow lreg(DeliveryMode::INIT, Level::Deassert, TriggerMode::Edge);
 
xAPICDriver::write(APIC_REGISTER_ICR_HIGH, hreg.value);
xAPICDriver::write(APIC_REGISTER_ICR_LOW, lreg.value);
 
lreg.vectorNo = pvect;
lreg.delvMode = DeliveryMode::StartUp;
 
Dbg("APBoot: Wakeup sequence following...");
 
xAPICDriver::write(APIC_REGISTER_ICR_HIGH, hreg.value);
xAPICDriver::write(APIC_REGISTER_ICR_LOW, lreg.value);
}
 
// NOTE: ICRLow and ICRHigh are types in the Silcos kernel. If your code uses direct bit
// manipulations you must replace some code with bit operations.
</source>
 
== See Also ==
Anonymous user