system.hh (11801:cd7f3a1dbf55) system.hh (11838:0b311345ac72)
1/*
2 * Copyright (c) 2012, 2014 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

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

219 PortProxy physProxy;
220
221 /** kernel symbol table */
222 SymbolTable *kernelSymtab;
223
224 /** Object pointer for the kernel code */
225 ObjectFile *kernel;
226
1/*
2 * Copyright (c) 2012, 2014 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

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

219 PortProxy physProxy;
220
221 /** kernel symbol table */
222 SymbolTable *kernelSymtab;
223
224 /** Object pointer for the kernel code */
225 ObjectFile *kernel;
226
227 /** Begining of kernel code */
227 /** Beginning of kernel code */
228 Addr kernelStart;
229
230 /** End of kernel code */
231 Addr kernelEnd;
232
233 /** Entry point in the kernel to start at */
234 Addr kernelEntry;
235
236 /** Mask that should be anded for binary/symbol loading.
237 * This allows one two different OS requirements for the same ISA to be
238 * handled. Some OSes are compiled for a virtual address and need to be
239 * loaded into physical memory that starts at address 0, while other
240 * bare metal tools generate images that start at address 0.
241 */
242 Addr loadAddrMask;
243
244 /** Offset that should be used for binary/symbol loading.
228 Addr kernelStart;
229
230 /** End of kernel code */
231 Addr kernelEnd;
232
233 /** Entry point in the kernel to start at */
234 Addr kernelEntry;
235
236 /** Mask that should be anded for binary/symbol loading.
237 * This allows one two different OS requirements for the same ISA to be
238 * handled. Some OSes are compiled for a virtual address and need to be
239 * loaded into physical memory that starts at address 0, while other
240 * bare metal tools generate images that start at address 0.
241 */
242 Addr loadAddrMask;
243
244 /** Offset that should be used for binary/symbol loading.
245 * This further allows more flexibily than the loadAddrMask allows alone in
246 * loading kernels and similar. The loadAddrOffset is applied after the
245 * This further allows more flexibility than the loadAddrMask allows alone
246 * in loading kernels and similar. The loadAddrOffset is applied after the
247 * loadAddrMask.
248 */
249 Addr loadAddrOffset;
250
251 public:
252 /** Get a pointer to access the physical memory of the system */
253 PhysicalMemory& getPhysMem() { return physmem; }
254

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

273 Arch getArch() const { return Arch::TheISA; }
274
275 /**
276 * Get the page bytes for the ISA.
277 */
278 Addr getPageBytes() const { return TheISA::PageBytes; }
279
280 /**
247 * loadAddrMask.
248 */
249 Addr loadAddrOffset;
250
251 public:
252 /** Get a pointer to access the physical memory of the system */
253 PhysicalMemory& getPhysMem() { return physmem; }
254

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

273 Arch getArch() const { return Arch::TheISA; }
274
275 /**
276 * Get the page bytes for the ISA.
277 */
278 Addr getPageBytes() const { return TheISA::PageBytes; }
279
280 /**
281 * Get the number of bits worth of in-page adress for the ISA.
281 * Get the number of bits worth of in-page address for the ISA.
282 */
283 Addr getPageShift() const { return TheISA::PageShift; }
284
285 /**
286 * The thermal model used for this system (if any).
287 */
288 ThermalModel * getThermalModel() const { return thermalModel; }
289

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

295
296 const unsigned int _cacheLineSize;
297
298 uint64_t workItemsBegin;
299 uint64_t workItemsEnd;
300 uint32_t numWorkIds;
301 std::vector<bool> activeCpus;
302
282 */
283 Addr getPageShift() const { return TheISA::PageShift; }
284
285 /**
286 * The thermal model used for this system (if any).
287 */
288 ThermalModel * getThermalModel() const { return thermalModel; }
289

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

295
296 const unsigned int _cacheLineSize;
297
298 uint64_t workItemsBegin;
299 uint64_t workItemsEnd;
300 uint32_t numWorkIds;
301 std::vector<bool> activeCpus;
302
303 /** This array is a per-sytem list of all devices capable of issuing a
303 /** This array is a per-system list of all devices capable of issuing a
304 * memory system request and an associated string for each master id.
305 * It's used to uniquely id any master in the system by name for things
306 * like cache statistics.
307 */
308 std::vector<std::string> masterIds;
309
310 ThermalModel * thermalModel;
311
312 public:
313
314 /** Request an id used to create a request object in the system. All objects
315 * that intend to issues requests into the memory system must request an id
316 * in the init() phase of startup. All master ids must be fixed by the
304 * memory system request and an associated string for each master id.
305 * It's used to uniquely id any master in the system by name for things
306 * like cache statistics.
307 */
308 std::vector<std::string> masterIds;
309
310 ThermalModel * thermalModel;
311
312 public:
313
314 /** Request an id used to create a request object in the system. All objects
315 * that intend to issues requests into the memory system must request an id
316 * in the init() phase of startup. All master ids must be fixed by the
317 * regStats() phase that immediately preceeds it. This allows objects in the
318 * memory system to understand how many masters may exist and
317 * regStats() phase that immediately precedes it. This allows objects in
318 * the memory system to understand how many masters may exist and
319 * appropriately name the bins of their per-master stats before the stats
320 * are finalized
321 */
322 MasterID getMasterId(std::string req_name);
323
324 /** Get the name of an object for a given request id.
325 */
326 std::string getMasterName(MasterID master_id);

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

485
486 void initState() override;
487
488 const Params *params() const { return (const Params *)_params; }
489
490 public:
491
492 /**
319 * appropriately name the bins of their per-master stats before the stats
320 * are finalized
321 */
322 MasterID getMasterId(std::string req_name);
323
324 /** Get the name of an object for a given request id.
325 */
326 std::string getMasterName(MasterID master_id);

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

485
486 void initState() override;
487
488 const Params *params() const { return (const Params *)_params; }
489
490 public:
491
492 /**
493 * Returns the addess the kernel starts at.
493 * Returns the address the kernel starts at.
494 * @return address the kernel starts at
495 */
496 Addr getKernelStart() const { return kernelStart; }
497
498 /**
494 * @return address the kernel starts at
495 */
496 Addr getKernelStart() const { return kernelStart; }
497
498 /**
499 * Returns the addess the kernel ends at.
499 * Returns the address the kernel ends at.
500 * @return address the kernel ends at
501 */
502 Addr getKernelEnd() const { return kernelEnd; }
503
504 /**
500 * @return address the kernel ends at
501 */
502 Addr getKernelEnd() const { return kernelEnd; }
503
504 /**
505 * Returns the addess the entry point to the kernel code.
505 * Returns the address the entry point to the kernel code.
506 * @return entry point of the kernel code
507 */
508 Addr getKernelEntry() const { return kernelEntry; }
509
510 /// Allocate npages contiguous unused physical pages
511 /// @return Starting address of first page
512 Addr allocPhysPages(int npages);
513

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

539
540 // For futex system call
541 std::map<uint64_t, std::list<ThreadContext *> * > futexMap;
542
543 protected:
544
545 /**
546 * If needed, serialize additional symbol table entries for a
506 * @return entry point of the kernel code
507 */
508 Addr getKernelEntry() const { return kernelEntry; }
509
510 /// Allocate npages contiguous unused physical pages
511 /// @return Starting address of first page
512 Addr allocPhysPages(int npages);
513

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

539
540 // For futex system call
541 std::map<uint64_t, std::list<ThreadContext *> * > futexMap;
542
543 protected:
544
545 /**
546 * If needed, serialize additional symbol table entries for a
547 * specific subclass of this sytem. Currently this is used by
547 * specific subclass of this system. Currently this is used by
548 * Alpha and MIPS.
549 *
550 * @param os stream to serialize to
551 */
552 virtual void serializeSymtab(CheckpointOut &os) const {}
553
554 /**
555 * If needed, unserialize additional symbol table entries for a

--- 12 unchanged lines hidden ---
548 * Alpha and MIPS.
549 *
550 * @param os stream to serialize to
551 */
552 virtual void serializeSymtab(CheckpointOut &os) const {}
553
554 /**
555 * If needed, unserialize additional symbol table entries for a

--- 12 unchanged lines hidden ---