Initial commit
This commit is contained in:
11
code/lapic_sipi_example.cpp
Normal file
11
code/lapic_sipi_example.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
void LocalApic::issueSIPI(uint8_t cpuId, uint32_t page) {
|
||||
ICREntry icrEntry{};
|
||||
icrEntry.vector = page;
|
||||
icrEntry.deliveryMode = ICREntry::DeliveryMode::STARTUP;
|
||||
icrEntry.destinationMode = ICREntry::DestinationMode::PHYSICAL;
|
||||
icrEntry.level = ICREntry::Level::ASSERT;
|
||||
icrEntry.triggerMode = ICREntry::TriggerMode::EDGE;
|
||||
icrEntry.destinationShorthand = ICREntry::DestinationShorthand::NO;
|
||||
icrEntry.destination = cpuId;
|
||||
writeICR(icrEntry); // Writing the ICR issues an IPI
|
||||
}
|
||||
Reference in New Issue
Block a user