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