{
case 0:
{
- TriggerIntMessage message = pkt->get<TriggerIntMessage>();
+ TriggerIntMessage message = pkt->getRaw<TriggerIntMessage>();
DPRINTF(LocalApic,
"Got Trigger Interrupt message with vector %#x.\n",
message.vector);
buildIntRequest(const uint8_t id, T payload, Addr offset, Addr size)
{
PacketPtr pkt = prepIntRequest(id, offset, size);
- pkt->set<T>(payload);
+ pkt->setRaw<T>(payload);
return pkt;
}
{
switch (dataSize) {
case 1:
- mem = pkt->get<uint8_t>();
+ mem = pkt->getLE<uint8_t>();
break;
case 2:
- mem = pkt->get<uint16_t>();
+ mem = pkt->getLE<uint16_t>();
break;
case 4:
- mem = pkt->get<uint32_t>();
+ mem = pkt->getLE<uint32_t>();
break;
case 8:
- mem = pkt->get<uint64_t>();
+ mem = pkt->getLE<uint64_t>();
break;
default:
panic("Unhandled size in getMem.\n");
static void
getPackedMem(PacketPtr pkt, std::array<uint64_t, N> &mem, unsigned dataSize)
{
- std::array<T, N> real_mem = pkt->get<std::array<T, N> >();
+ std::array<T, N> real_mem = pkt->getLE<std::array<T, N> >();
for (int i = 0; i < N; i++)
mem[i] = real_mem[i];
}
write = NULL;
PageTableEntry pte;
if (dataSize == 8)
- pte = read->get<uint64_t>();
+ pte = read->getLE<uint64_t>();
else
- pte = read->get<uint32_t>();
+ pte = read->getLE<uint32_t>();
VAddr vaddr = entry.vaddr;
bool uncacheable = pte.pcd;
Addr nextRead = 0;
// value back to memory.
if (doWrite) {
write = oldRead;
- write->set<uint64_t>(pte);
+ write->setLE<uint64_t>(pte);
write->cmd = MemCmd::WriteReq;
} else {
write = NULL;
switch(pkt->getAddr() - pioAddr)
{
case 0x0:
- pkt->set(address);
+ pkt->setLE(address);
break;
case 0x1:
- pkt->set(readRegister(address));
+ pkt->setLE(readRegister(address));
break;
default:
panic("Read from undefined CMOS port.\n");
switch(pkt->getAddr() - pioAddr)
{
case 0x0:
- address = pkt->get<uint8_t>();
+ address = pkt->getLE<uint8_t>();
break;
case 0x1:
- writeRegister(address, pkt->get<uint8_t>());
+ writeRegister(address, pkt->getLE<uint8_t>());
break;
default:
panic("Write to undefined CMOS port.\n");
if (addr == dataPort) {
uint8_t data = readDataOut();
//DPRINTF(I8042, "Read from data port got %#02x.\n", data);
- pkt->set<uint8_t>(data);
+ pkt->setLE<uint8_t>(data);
} else if (addr == commandPort) {
//DPRINTF(I8042, "Read status as %#02x.\n", (uint8_t)statusReg);
- pkt->set<uint8_t>((uint8_t)statusReg);
+ pkt->setLE<uint8_t>((uint8_t)statusReg);
} else {
panic("Read from unrecognized port %#x.\n", addr);
}
{
assert(pkt->getSize() == 1);
Addr addr = pkt->getAddr();
- uint8_t data = pkt->get<uint8_t>();
+ uint8_t data = pkt->getLE<uint8_t>();
if (addr == dataPort) {
statusReg.commandLast = 0;
switch (lastCommand) {
Addr offset = pkt->getAddr() - pioAddr;
switch(offset) {
case 0:
- pkt->set<uint32_t>(regSel);
+ pkt->setLE<uint32_t>(regSel);
break;
case 16:
- pkt->set<uint32_t>(readReg(regSel));
+ pkt->setLE<uint32_t>(readReg(regSel));
break;
default:
panic("Illegal read from I/O APIC.\n");
Addr offset = pkt->getAddr() - pioAddr;
switch(offset) {
case 0:
- regSel = pkt->get<uint32_t>();
+ regSel = pkt->getLE<uint32_t>();
break;
case 16:
- writeReg(regSel, pkt->get<uint32_t>());
+ writeReg(regSel, pkt->getLE<uint32_t>());
break;
default:
panic("Illegal write to I/O APIC.\n");
panic("Write to i8237 request register unimplemented.\n");
case 0xa:
{
- uint8_t command = pkt->get<uint8_t>();
+ uint8_t command = pkt->getLE<uint8_t>();
uint8_t select = bits(command, 1, 0);
uint8_t bitVal = bits(command, 2);
if (!bitVal)
assert(pkt->getSize() == 1);
Addr offset = pkt->getAddr() - pioAddr;
if (offset < 3) {
- pkt->set(pit.readCounter(offset));
+ pkt->setLE(pit.readCounter(offset));
} else if (offset == 3) {
- pkt->set(uint8_t(-1));
+ pkt->setLE(uint8_t(-1));
} else {
panic("Read from undefined i8254 register.\n");
}
assert(pkt->getSize() == 1);
Addr offset = pkt->getAddr() - pioAddr;
if (offset < 3) {
- pit.writeCounter(offset, pkt->get<uint8_t>());
+ pit.writeCounter(offset, pkt->getLE<uint8_t>());
} else if (offset == 3) {
- pit.writeControl(pkt->get<uint8_t>());
+ pit.writeControl(pkt->getLE<uint8_t>());
} else {
panic("Write to undefined i8254 register.\n");
}
case 0x0:
if (readIRR) {
DPRINTF(I8259, "Reading IRR as %#x.\n", IRR);
- pkt->set(IRR);
+ pkt->setLE(IRR);
} else {
DPRINTF(I8259, "Reading ISR as %#x.\n", ISR);
- pkt->set(ISR);
+ pkt->setLE(ISR);
}
break;
case 0x1:
DPRINTF(I8259, "Reading IMR as %#x.\n", IMR);
- pkt->set(IMR);
+ pkt->setLE(IMR);
break;
}
pkt->makeAtomicResponse();
X86ISA::I8259::write(PacketPtr pkt)
{
assert(pkt->getSize() == 1);
- uint8_t val = pkt->get<uint8_t>();
+ uint8_t val = pkt->getLE<uint8_t>();
switch (pkt->getAddr() - pioAddr) {
case 0x0:
if (bits(val, 4)) {
controlVal.gate ? "on" : "off",
controlVal.speaker ? "on" : "off",
controlVal.timer ? "on" : "off");
- pkt->set((uint8_t)controlVal);
+ pkt->setLE((uint8_t)controlVal);
pkt->makeAtomicResponse();
return latency;
}
{
assert(pkt->getAddr() == pioAddr);
assert(pkt->getSize() == 1);
- SpeakerControl val = pkt->get<uint8_t>();
+ SpeakerControl val = pkt->getLE<uint8_t>();
controlVal.gate = val.gate;
//Change the gate value in the timer.
if (!val.gate)