Deleted Added
sdiff udiff text old ( 8711:c7e14f52c682 ) new ( 8742:9df38d259935 )
full compact
1/*
2 * Copyright (c) 2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 288 unchanged lines hidden (view full) ---

297{
298 //
299 // The local apic must register its address ranges on both its pio port
300 // via the basicpiodevice(piodevice) init() function and its int port
301 // that it inherited from IntDev. Note IntDev is not a SimObject itself.
302 //
303 BasicPioDevice::init();
304 IntDev::init();
305
306 Pc * pc = dynamic_cast<Pc *>(platform);
307 assert(pc);
308 pc->southBridge->ioApic->registerLocalApic(initialApicId, this);
309}
310
311
312Tick
313X86ISA::Interrupts::recvMessage(PacketPtr pkt)
314{
315 Addr offset = pkt->getAddr() - x86InterruptAddress(initialApicId, 0);
316 assert(pkt->cmd == MemCmd::MessageReq);

--- 31 unchanged lines hidden (view full) ---

348 low.deliveryStatus = 0;
349 regs[APIC_INTERRUPT_COMMAND_LOW] = low;
350 }
351 DPRINTF(LocalApic, "ICR is now idle.\n");
352 return 0;
353}
354
355
356AddrRangeList
357X86ISA::Interrupts::getAddrRanges()
358{
359 AddrRangeList ranges;
360 Range<Addr> range = RangeEx(x86LocalAPICAddress(initialApicId, 0),
361 x86LocalAPICAddress(initialApicId, 0) +
362 PageBytes);
363 ranges.push_back(range);
364 pioAddr = range.start;
365 return ranges;
366}
367
368
369AddrRangeList
370X86ISA::Interrupts::getIntAddrRange()
371{
372 AddrRangeList ranges;
373 ranges.push_back(RangeEx(x86InterruptAddress(initialApicId, 0),
374 x86InterruptAddress(initialApicId, 0) +
375 PhysAddrAPICRangeSize));
376 return ranges;
377}
378
379
380uint32_t
381X86ISA::Interrupts::readReg(ApicRegIndex reg)
382{
383 if (reg >= APIC_TRIGGER_MODE(0) &&
384 reg <= APIC_TRIGGER_MODE(15)) {

--- 225 unchanged lines hidden (view full) ---

610 apicTimerEvent(this),
611 pendingSmi(false), smiVector(0),
612 pendingNmi(false), nmiVector(0),
613 pendingExtInt(false), extIntVector(0),
614 pendingInit(false), initVector(0),
615 pendingStartup(false), startupVector(0),
616 startedUp(false), pendingUnmaskableInt(false),
617 pendingIPIs(0), cpu(NULL)
618{
619 pioSize = PageBytes;
620 memset(regs, 0, sizeof(regs));
621 //Set the local apic DFR to the flat model.
622 regs[APIC_DESTINATION_FORMAT] = (uint32_t)(-1);
623 ISRV = 0;
624 IRRV = 0;
625}

--- 157 unchanged lines hidden ---