abstract_mem.cc (9203:939077a54014) | abstract_mem.cc (9235:5aa4896ed55a) |
---|---|
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()) { | 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); | 88 fatal("Specified size %d does not match file %s %d\n", 89 range.size(), params()->file, _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 | 90 } 91 lseek(fd, 0, SEEK_SET); 92 pmemAddr = (uint8_t *)mmap(NULL, roundUp(_size, sysconf(_SC_PAGESIZE)), 93 PROT_READ | PROT_WRITE, map_flags, fd, 0); 94 } 95 96 if (pmemAddr == (void *)MAP_FAILED) { 97 perror("mmap"); --- 118 unchanged lines hidden (view full) --- 216 bwTotal.subname(i, system()->getMasterName(i)); 217 } 218 bwRead = bytesRead / simSeconds; 219 bwInstRead = bytesInstRead / simSeconds; 220 bwWrite = bytesWritten / simSeconds; 221 bwTotal = (bytesRead + bytesWritten) / simSeconds; 222} 223 |
225Range<Addr> | 224AddrRange |
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 --- | 225AbstractMemory::getAddrRange() const 226{ 227 return range; 228} 229 230// Add load-locked to tracking list. Should only be called if the 231// operation is a load and the LLSC flag is set. 232void --- 372 unchanged lines hidden --- |