1/* 2 * Copyright (c) 2010 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 --- 43 unchanged lines hidden (view full) --- 52RealViewCtrl::read(PacketPtr pkt) 53{ 54 assert(pkt->getAddr() >= pioAddr && pkt->getAddr() < pioAddr + pioSize); 55 assert(pkt->getSize() == 4); 56 Addr daddr = pkt->getAddr() - pioAddr; 57 pkt->allocate(); 58 59 switch(daddr) { |
60 case ProcId0: 61 pkt->set(params()->proc_id0); |
62 break; |
63 case ProcId1: 64 pkt->set(params()->proc_id1); 65 break; |
66 case Clock24: 67 Tick clk; 68 clk = (Tick)(curTick() / (24 * SimClock::Int::us)); 69 pkt->set((uint32_t)(clk)); 70 break; 71 case Clock100: 72 Tick clk100; 73 clk100 = (Tick)(curTick() / (100 * SimClock::Int::us)); --- 55 unchanged lines hidden (view full) --- 129 case Osc4: 130 break; 131 case Lock: 132 sysLock.lockVal = pkt->get<uint16_t>(); 133 break; 134 case Flags: 135 flags = pkt->get<uint32_t>(); 136 break; |
137 case FlagsClr: 138 flags = 0; 139 break; |
140 default: 141 warn("Tried to write RVIO at offset %#x that doesn't exist\n", 142 daddr); 143 break; 144 } 145 pkt->makeAtomicResponse(); 146 return pioDelay; 147} --- 18 unchanged lines hidden --- |