1/* 2 * Copyright (c) 2012 ARM Limited 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 --- 58 unchanged lines hidden (view full) --- 67class BaseCPU; 68 69int divideFromConf(uint32_t conf); 70 71namespace X86ISA { 72 73ApicRegIndex decodeAddr(Addr paddr); 74 |
75class Interrupts : public PioDevice, IntDevice |
76{ 77 protected: 78 // Storage for the APIC registers 79 uint32_t regs[NUM_APIC_REGS]; 80 81 BitUnion32(LVTEntry) 82 Bitfield<7, 0> vector; 83 Bitfield<10, 8> deliveryMode; --- 85 unchanged lines hidden (view full) --- 169 170 BaseCPU *cpu; 171 172 int initialApicId; 173 174 // Port for receiving interrupts 175 IntSlavePort intSlavePort; 176 |
177 Tick pioDelay; 178 Addr pioAddr = MaxAddr; 179 |
180 public: 181 182 int getInitialApicId() { return initialApicId; } 183 184 /* 185 * Params stuff. 186 */ 187 typedef X86LocalApicParams Params; --- 23 unchanged lines hidden (view full) --- 211 triggerTimerInterrupt() 212 { 213 LVTEntry entry = regs[APIC_LVT_TIMER]; 214 if (!entry.masked) 215 requestInterrupt(entry.vector, entry.deliveryMode, entry.trigger); 216 return entry.periodic; 217 } 218 |
219 AddrRangeList getAddrRanges() const override; |
220 AddrRangeList getIntAddrRange() const override; 221 222 Port &getPort(const std::string &if_name, 223 PortID idx=InvalidPortID) override 224 { 225 if (if_name == "int_master") { 226 return intMasterPort; 227 } else if (if_name == "int_slave") { 228 return intSlavePort; 229 } |
230 return PioDevice::getPort(if_name, idx); |
231 } 232 233 /* 234 * Functions to access and manipulate the APIC's registers. 235 */ 236 237 uint32_t readReg(ApicRegIndex miscReg); 238 void setReg(ApicRegIndex reg, uint32_t val); --- 65 unchanged lines hidden --- |