vio_mmio.cc (12974:b840a646cfbd) | vio_mmio.cc (13230:2988dc5d1d6f) |
---|---|
1/* 2 * Copyright (c) 2016-2018 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 --- 65 unchanged lines hidden (view full) --- 74 return 0; 75 } 76 77 panic_if(size != 4, "Unexpected read size: %u\n", size); 78 79 const uint32_t value = read(offset); 80 DPRINTF(VIOIface, " value: 0x%x\n", value); 81 pkt->makeResponse(); | 1/* 2 * Copyright (c) 2016-2018 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 --- 65 unchanged lines hidden (view full) --- 74 return 0; 75 } 76 77 panic_if(size != 4, "Unexpected read size: %u\n", size); 78 79 const uint32_t value = read(offset); 80 DPRINTF(VIOIface, " value: 0x%x\n", value); 81 pkt->makeResponse(); |
82 pkt->set | 82 pkt->setLE<uint32_t>(value); |
83 84 return 0; 85} 86 87uint32_t 88MmioVirtIO::read(Addr offset) 89{ 90 switch(offset) { --- 77 unchanged lines hidden (view full) --- 168 169 // Forward device configuration writes to the device VirtIO model 170 if (offset >= OFF_CONFIG) { 171 vio.writeConfig(pkt, offset - OFF_CONFIG); 172 return 0; 173 } 174 175 panic_if(size != 4, "Unexpected write size @ 0x%x: %u\n", offset, size); | 83 84 return 0; 85} 86 87uint32_t 88MmioVirtIO::read(Addr offset) 89{ 90 switch(offset) { --- 77 unchanged lines hidden (view full) --- 168 169 // Forward device configuration writes to the device VirtIO model 170 if (offset >= OFF_CONFIG) { 171 vio.writeConfig(pkt, offset - OFF_CONFIG); 172 return 0; 173 } 174 175 panic_if(size != 4, "Unexpected write size @ 0x%x: %u\n", offset, size); |
176 DPRINTF(VIOIface, " value: 0x%x\n", pkt->get | 176 DPRINTF(VIOIface, " value: 0x%x\n", pkt->getLE<uint32_t>()); |
177 pkt->makeResponse(); | 177 pkt->makeResponse(); |
178 write(offset, pkt->get | 178 write(offset, pkt->getLE<uint32_t>()); |
179 return 0; 180} 181 182void 183MmioVirtIO::write(Addr offset, uint32_t value) 184{ 185 switch(offset) { 186 case OFF_HOST_FEATURES_SELECT: --- 99 unchanged lines hidden --- | 179 return 0; 180} 181 182void 183MmioVirtIO::write(Addr offset, uint32_t value) 184{ 185 switch(offset) { 186 case OFF_HOST_FEATURES_SELECT: --- 99 unchanged lines hidden --- |