Deleted Added
sdiff udiff text old ( 9203:939077a54014 ) new ( 9235:5aa4896ed55a )
full compact
1/*
2 * Copyright (c) 2010-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

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

80 int map_flags = MAP_ANON | MAP_PRIVATE;
81 pmemAddr = (uint8_t *)mmap(NULL, size(),
82 PROT_READ | PROT_WRITE, map_flags, -1, 0);
83 } else {
84 int map_flags = MAP_PRIVATE;
85 int fd = open(params()->file.c_str(), O_RDONLY);
86 long _size = lseek(fd, 0, SEEK_END);
87 if (_size != range.size()) {
88 warn("Specified size %d does not match file %s %d\n", range.size(),
89 params()->file, _size);
90 range = RangeSize(range.start, _size);
91 }
92 lseek(fd, 0, SEEK_SET);
93 pmemAddr = (uint8_t *)mmap(NULL, roundUp(_size, sysconf(_SC_PAGESIZE)),
94 PROT_READ | PROT_WRITE, map_flags, fd, 0);
95 }
96
97 if (pmemAddr == (void *)MAP_FAILED) {
98 perror("mmap");

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

217 bwTotal.subname(i, system()->getMasterName(i));
218 }
219 bwRead = bytesRead / simSeconds;
220 bwInstRead = bytesInstRead / simSeconds;
221 bwWrite = bytesWritten / simSeconds;
222 bwTotal = (bytesRead + bytesWritten) / simSeconds;
223}
224
225Range<Addr>
226AbstractMemory::getAddrRange() const
227{
228 return range;
229}
230
231// Add load-locked to tracking list. Should only be called if the
232// operation is a load and the LLSC flag is set.
233void

--- 372 unchanged lines hidden ---