flash_device.hh (11168:f98eb2da15a4) | flash_device.hh (11174:5a9019db4a08) |
---|---|
1/* 2 * Copyright (c) 2013-2015 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 --- 93 unchanged lines hidden (view full) --- 102 Stats::Histogram fileSystemAccess; 103 104 /** Histogram of access latencies*/ 105 Stats::Histogram writeLatency; 106 Stats::Histogram readLatency; 107 }; 108 109 /** Device access functions Inherrited from AbstractNVM*/ | 1/* 2 * Copyright (c) 2013-2015 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 --- 93 unchanged lines hidden (view full) --- 102 Stats::Histogram fileSystemAccess; 103 104 /** Histogram of access latencies*/ 105 Stats::Histogram writeLatency; 106 Stats::Histogram readLatency; 107 }; 108 109 /** Device access functions Inherrited from AbstractNVM*/ |
110 virtual void initializeMemory(uint64_t disk_size, uint32_t sector_size) | 110 void initializeMemory(uint64_t disk_size, uint32_t sector_size) override |
111 { 112 initializeFlash(disk_size, sector_size); 113 } 114 | 111 { 112 initializeFlash(disk_size, sector_size); 113 } 114 |
115 virtual void readMemory(uint64_t address, uint32_t amount, 116 Callback *event) | 115 void readMemory(uint64_t address, uint32_t amount, 116 Callback *event) override |
117 { 118 accessDevice(address, amount, event, ActionRead); 119 } | 117 { 118 accessDevice(address, amount, event, ActionRead); 119 } |
120 virtual void writeMemory(uint64_t address, uint32_t amount, 121 Callback *event) | 120 121 void writeMemory(uint64_t address, uint32_t amount, 122 Callback *event) override |
122 { 123 accessDevice(address, amount, event, ActionWrite); 124 } 125 126 /**Initialization function; called when all disk specifics are known*/ 127 void initializeFlash(uint64_t disk_size, uint32_t sector_size); 128 129 /**Flash action function*/ --- 11 unchanged lines hidden (view full) --- 141 142 /** Function to indicate that a page is known*/ 143 void clearUnknownPages(uint32_t index); 144 145 /** Function to test if a page is known*/ 146 bool getUnknownPages(uint32_t index); 147 148 /**Stats register function*/ | 123 { 124 accessDevice(address, amount, event, ActionWrite); 125 } 126 127 /**Initialization function; called when all disk specifics are known*/ 128 void initializeFlash(uint64_t disk_size, uint32_t sector_size); 129 130 /**Flash action function*/ --- 11 unchanged lines hidden (view full) --- 142 143 /** Function to indicate that a page is known*/ 144 void clearUnknownPages(uint32_t index); 145 146 /** Function to test if a page is known*/ 147 bool getUnknownPages(uint32_t index); 148 149 /**Stats register function*/ |
149 void regStats(); | 150 void regStats() override; |
150 151 /** Disk sizes in bytes */ 152 uint64_t diskSize; 153 const uint32_t blockSize; 154 const uint32_t pageSize; 155 156 /** Garbage collection algorithm emulator */ 157 const uint32_t GCActivePercentage; --- 39 unchanged lines hidden --- | 151 152 /** Disk sizes in bytes */ 153 uint64_t diskSize; 154 const uint32_t blockSize; 155 const uint32_t pageSize; 156 157 /** Garbage collection algorithm emulator */ 158 const uint32_t GCActivePercentage; --- 39 unchanged lines hidden --- |