X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Farch%2Fx86%2Finterrupts.cc;h=b418a7489bd4e8d5c9a9ad2a074d69a3cbd9de68;hb=52540b1b785aac9b307dfcc976527d94899deb94;hp=612244f49a796e5bde646fe6efee94e219d53774;hpb=ea8b347dc5d375572d8d19770024ec8be5fd5017;p=gem5.git diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc index 612244f49..b418a7489 100644 --- a/src/arch/x86/interrupts.cc +++ b/src/arch/x86/interrupts.cc @@ -1,4 +1,16 @@ /* + * Copyright (c) 2012 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * * Copyright (c) 2008 The Hewlett-Packard Development Company * All rights reserved. * @@ -291,6 +303,7 @@ X86ISA::Interrupts::setCPU(BaseCPU * newCPU) cpu = newCPU; initialApicId = cpu->cpuId(); regs[APIC_ID] = (initialApicId << 24); + pioAddr = x86LocalAPICAddress(initialApicId, 0); } @@ -304,6 +317,9 @@ X86ISA::Interrupts::init() // BasicPioDevice::init(); IntDev::init(); + + // the slave port has a range so inform the connected master + intSlavePort.sendRangeChange(); } @@ -352,20 +368,19 @@ X86ISA::Interrupts::recvResponse(PacketPtr pkt) AddrRangeList -X86ISA::Interrupts::getAddrRanges() +X86ISA::Interrupts::getAddrRanges() const { AddrRangeList ranges; Range range = RangeEx(x86LocalAPICAddress(initialApicId, 0), x86LocalAPICAddress(initialApicId, 0) + PageBytes); ranges.push_back(range); - pioAddr = range.start; return ranges; } AddrRangeList -X86ISA::Interrupts::getIntAddrRange() +X86ISA::Interrupts::getIntAddrRange() const { AddrRangeList ranges; ranges.push_back(RangeEx(x86InterruptAddress(initialApicId, 0), @@ -554,7 +569,7 @@ X86ISA::Interrupts::setReg(ApicRegIndex reg, uint32_t val) break; } pendingIPIs += apics.size(); - intPort->sendMessage(apics, message, timing); + intMasterPort.sendMessage(apics, message, timing); newVal = regs[APIC_INTERRUPT_COMMAND_LOW]; } break; @@ -612,7 +627,8 @@ X86ISA::Interrupts::Interrupts(Params * p) : pendingInit(false), initVector(0), pendingStartup(false), startupVector(0), startedUp(false), pendingUnmaskableInt(false), - pendingIPIs(0), cpu(NULL) + pendingIPIs(0), cpu(NULL), + intSlavePort(name() + ".int_slave", this, this, latency) { pioSize = PageBytes; memset(regs, 0, sizeof(regs));