1
Files
interrupt-handling-using-th…/code/lapic_initipi_example.cpp
2023-02-26 21:12:51 +01:00

11 lines
570 B
C++

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
}