interrupts.cc (8711:c7e14f52c682) interrupts.cc (8742:9df38d259935)
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();
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
305#if FULL_SYSTEM
306 Pc * pc = dynamic_cast<Pc *>(platform);
307 assert(pc);
308 pc->southBridge->ioApic->registerLocalApic(initialApicId, this);
306 Pc * pc = dynamic_cast<Pc *>(platform);
307 assert(pc);
308 pc->southBridge->ioApic->registerLocalApic(initialApicId, this);
309#endif
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
310}
311
312
313Tick
314X86ISA::Interrupts::recvMessage(PacketPtr pkt)
315{
316 Addr offset = pkt->getAddr() - x86InterruptAddress(initialApicId, 0);
317 assert(pkt->cmd == MemCmd::MessageReq);

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

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

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

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

--- 157 unchanged lines hidden ---