1/* 2 * Copyright (c) 2010, 2013, 2015-2018 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 --- 50 unchanged lines hidden (view full) --- 59const AddrRange GicV2::GICD_ISACTIVER (0x300, 0x37f); 60const AddrRange GicV2::GICD_ICACTIVER (0x380, 0x3ff); 61const AddrRange GicV2::GICD_IPRIORITYR(0x400, 0x7ff); 62const AddrRange GicV2::GICD_ITARGETSR (0x800, 0xbff); 63const AddrRange GicV2::GICD_ICFGR (0xc00, 0xcff); 64 65GicV2::GicV2(const Params *p) 66 : BaseGic(p), |
67 gicdPIDR(p->gicd_pidr), 68 gicdIIDR(p->gicd_iidr), 69 giccIIDR(p->gicc_iidr), |
70 distRange(RangeSize(p->dist_addr, DIST_SIZE)), 71 cpuRange(RangeSize(p->cpu_addr, p->cpu_size)), 72 addrRanges{distRange, cpuRange}, 73 distPioDelay(p->dist_pio_delay), 74 cpuPioDelay(p->cpu_pio_delay), intLatency(p->int_latency), 75 enabled(false), haveGem5Extensions(p->gem5_extensions), 76 itLines(p->it_lines), 77 intEnabled {}, pendingInt {}, activeInt {}, --- 188 unchanged lines hidden (view full) --- 266 /* The 0x100 is a made-up flag to show that gem5 extensions 267 * are available, 268 * write 0x200 to this register to enable it. */ 269 return (((sys->numRunningContexts() - 1) << 5) | 270 (itLines/INT_BITS_MAX -1) | 271 (haveGem5Extensions ? 0x100 : 0x0)); 272 case GICD_PIDR0: 273 //ARM defined DevID |
274 return (gicdPIDR & 0xFF); |
275 case GICD_PIDR1: |
276 return ((gicdPIDR >> 8) & 0xFF); |
277 case GICD_PIDR2: |
278 return ((gicdPIDR >> 16) & 0xFF); |
279 case GICD_PIDR3: |
280 return ((gicdPIDR >> 24) & 0xFF); |
281 case GICD_IIDR: 282 /* revision id is resorted to 1 and variant to 0*/ |
283 return gicdIIDR; |
284 default: 285 panic("Tried to read Gic distributor at offset %#x\n", daddr); 286 break; 287 } 288} 289 290Tick 291GicV2::readCpu(PacketPtr pkt) --- 13 unchanged lines hidden (view full) --- 305 return cpuPioDelay; 306} 307 308uint32_t 309GicV2::readCpu(ContextID ctx, Addr daddr) 310{ 311 switch(daddr) { 312 case GICC_IIDR: |
313 return giccIIDR; |
314 case GICC_CTLR: 315 return cpuControl[ctx]; 316 case GICC_PMR: 317 return cpuPriority[ctx]; 318 case GICC_BPR: 319 return cpuBpr[ctx]; 320 case GICC_IAR: 321 if (enabled && cpuEnabled(ctx)) { --- 767 unchanged lines hidden --- |