interrupts.hh (13784:1941dc118243) | interrupts.hh (14293:e8bb3f77458a) |
---|---|
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 | 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 BasicPioDevice, IntDevice | 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 | 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 |
|
177 public: 178 179 int getInitialApicId() { return initialApicId; } 180 181 /* 182 * Params stuff. 183 */ 184 typedef X86LocalApicParams Params; --- 23 unchanged lines hidden (view full) --- 208 triggerTimerInterrupt() 209 { 210 LVTEntry entry = regs[APIC_LVT_TIMER]; 211 if (!entry.masked) 212 requestInterrupt(entry.vector, entry.deliveryMode, entry.trigger); 213 return entry.periodic; 214 } 215 | 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; |
|
216 AddrRangeList getIntAddrRange() const override; 217 218 Port &getPort(const std::string &if_name, 219 PortID idx=InvalidPortID) override 220 { 221 if (if_name == "int_master") { 222 return intMasterPort; 223 } else if (if_name == "int_slave") { 224 return intSlavePort; 225 } | 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 } |
226 return BasicPioDevice::getPort(if_name, idx); | 230 return PioDevice::getPort(if_name, idx); |
227 } 228 229 /* 230 * Functions to access and manipulate the APIC's registers. 231 */ 232 233 uint32_t readReg(ApicRegIndex miscReg); 234 void setReg(ApicRegIndex reg, uint32_t val); --- 65 unchanged lines hidden --- | 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 --- |