X86: Add a LocalApic trace flag.
This commit is contained in:
parent
42ebebf99a
commit
e0f137a87c
2 changed files with 8 additions and 0 deletions
|
@ -109,6 +109,8 @@ if env['TARGET_ISA'] == 'x86':
|
|||
TraceFlag('X86')
|
||||
|
||||
if env['FULL_SYSTEM']:
|
||||
TraceFlag('LocalApic')
|
||||
|
||||
SimObject('X86LocalApic.py')
|
||||
SimObject('X86System.py')
|
||||
|
||||
|
|
|
@ -215,6 +215,9 @@ X86ISA::Interrupts::read(PacketPtr pkt)
|
|||
panic("Accessed more than one register at a time in the APIC!\n");
|
||||
ApicRegIndex reg = decodeAddr(offset);
|
||||
uint32_t val = htog(readReg(reg));
|
||||
DPRINTF(LocalApic,
|
||||
"Reading Local APIC register %d at offset %#x as %#x.\n",
|
||||
reg, offset, val);
|
||||
pkt->setData(((uint8_t *)&val) + (offset & mask(3)));
|
||||
return latency;
|
||||
}
|
||||
|
@ -229,6 +232,9 @@ X86ISA::Interrupts::write(PacketPtr pkt)
|
|||
ApicRegIndex reg = decodeAddr(offset);
|
||||
uint32_t val = regs[reg];
|
||||
pkt->writeData(((uint8_t *)&val) + (offset & mask(3)));
|
||||
DPRINTF(LocalApic,
|
||||
"Writing Local APIC register %d at offset %#x as %#x.\n",
|
||||
reg, offset, gtoh(val));
|
||||
setReg(reg, gtoh(val));
|
||||
return latency;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue