rv_ctrl.cc (8299:64a938a8b7fc) rv_ctrl.cc (8524:1ddd1aa0e55b)
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) {
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 ProcId:
61 pkt->set(params()->proc_id);
60 case ProcId0:
61 pkt->set(params()->proc_id0);
62 break;
62 break;
63 case ProcId1:
64 pkt->set(params()->proc_id1);
65 break;
63 case Clock24:
64 Tick clk;
65 clk = (Tick)(curTick() / (24 * SimClock::Int::us));
66 pkt->set((uint32_t)(clk));
67 break;
68 case Clock100:
69 Tick clk100;
70 clk100 = (Tick)(curTick() / (100 * SimClock::Int::us));

--- 55 unchanged lines hidden (view full) ---

126 case Osc4:
127 break;
128 case Lock:
129 sysLock.lockVal = pkt->get<uint16_t>();
130 break;
131 case Flags:
132 flags = pkt->get<uint32_t>();
133 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;
134 default:
135 warn("Tried to write RVIO at offset %#x that doesn't exist\n",
136 daddr);
137 break;
138 }
139 pkt->makeAtomicResponse();
140 return pioDelay;
141}

--- 18 unchanged lines hidden ---
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 ---