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

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

232 /** Mask that should be anded for binary/symbol loading.
233 * This allows one two different OS requirements for the same ISA to be
234 * handled. Some OSes are compiled for a virtual address and need to be
235 * loaded into physical memory that starts at address 0, while other
236 * bare metal tools generate images that start at address 0.
237 */
238 Addr loadAddrMask;
239
240 /** Offset that should be used for binary/symbol loading.
241 * This further allows more flexibily than the loadAddrMask allows alone in
242 * loading kernels and similar. The loadAddrOffset is applied after the
243 * loadAddrMask.
244 */
245 Addr loadAddrOffset;
246
247 protected:
248 uint64_t nextPID;
249
250 public:
251 uint64_t allocatePID()
252 {
253 return nextPID++;
254 }

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

323 {
324 return ++workItemsBegin;
325 }
326
327 /**
328 * Called by pseudo_inst to track the number of work items completed by
329 * this system.
330 */
324 uint64_t
331 uint64_t
332 incWorkItemsEnd()
333 {
334 return ++workItemsEnd;
335 }
336
337 /**
338 * Called by pseudo_inst to mark the cpus actively executing work items.
339 * Returns the total number of cpus that have executed work item begin or
340 * ends.
341 */
335 int
342 int
343 markWorkItem(int index)
344 {
345 int count = 0;
346 assert(index < activeCpus.size());
347 activeCpus[index] = true;
341 for (std::vector<bool>::iterator i = activeCpus.begin();
348 for (std::vector::iterator i = activeCpus.begin();
349 i < activeCpus.end(); i++) {
350 if (*i) count++;
351 }
352 return count;
353 }
354
355 inline void workItemBegin(uint32_t tid, uint32_t workid)
356 {

--- 194 unchanged lines hidden ---