}
}
+uint8_t
+Gicv3Redistributor::readEntryLPI(uint32_t lpi_id)
+{
+ Addr lpi_pending_entry_ptr = lpiPendingTablePtr + (lpi_id / 8);
+
+ uint8_t lpi_pending_entry;
+ ThreadContext * tc = gic->getSystem()->getThreadContext(cpuId);
+ tc->getPhysProxy().readBlob(lpi_pending_entry_ptr,
+ (uint8_t*) &lpi_pending_entry,
+ sizeof(lpi_pending_entry));
+
+ return lpi_pending_entry;
+}
+
+void
+Gicv3Redistributor::writeEntryLPI(uint32_t lpi_id, uint8_t lpi_pending_entry)
+{
+ Addr lpi_pending_entry_ptr = lpiPendingTablePtr + (lpi_id / 8);
+
+ ThreadContext * tc = gic->getSystem()->getThreadContext(cpuId);
+ tc->getPhysProxy().writeBlob(lpi_pending_entry_ptr,
+ (uint8_t*) &lpi_pending_entry,
+ sizeof(lpi_pending_entry));
+}
+
+bool
+Gicv3Redistributor::isPendingLPI(uint32_t lpi_id)
+{
+ // Fetch the LPI pending entry from memory
+ uint8_t lpi_pending_entry = readEntryLPI(lpi_id);
+
+ uint8_t lpi_pending_entry_bit_position = lpi_id % 8;
+ bool is_set = lpi_pending_entry & (1 << lpi_pending_entry_bit_position);
+
+ return is_set;
+}
+
void
Gicv3Redistributor::setClrLPI(uint64_t data, bool set)
{
return;
}
- Addr lpi_pending_entry_ptr = lpiPendingTablePtr + (lpi_id / 8);
- uint8_t lpi_pending_entry;
- ThreadContext * tc = gic->getSystem()->getThreadContext(cpuId);
- tc->getPhysProxy().readBlob(lpi_pending_entry_ptr,
- (uint8_t*) &lpi_pending_entry,
- sizeof(lpi_pending_entry));
+ // Fetch the LPI pending entry from memory
+ uint8_t lpi_pending_entry = readEntryLPI(lpi_id);
+
uint8_t lpi_pending_entry_bit_position = lpi_id % 8;
bool is_set = lpi_pending_entry & (1 << lpi_pending_entry_bit_position);
lpi_pending_entry &= ~(1 << (lpi_pending_entry_bit_position));
}
- tc->getPhysProxy().writeBlob(lpi_pending_entry_ptr,
- (uint8_t*) &lpi_pending_entry,
- sizeof(lpi_pending_entry));
+ writeEntryLPI(lpi_id, lpi_pending_entry);
+
updateAndInformCPUInterface();
}
return cpuInterface;
}
+ uint32_t
+ processorNumber() const
+ {
+ return cpuId;
+ }
+
Gicv3::GroupId getIntGroup(int int_id) const;
Gicv3::IntStatus intStatus(uint32_t int_id) const;
+ uint8_t readEntryLPI(uint32_t intid);
+ void writeEntryLPI(uint32_t intid, uint8_t lpi_entry);
+ bool isPendingLPI(uint32_t intid);
void setClrLPI(uint64_t data, bool set);
void reset();
void sendSGI(uint32_t int_id, Gicv3::GroupId group, bool ns);