1/* 2 * Copyright (c) 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 --- 61 unchanged lines hidden (view full) --- 70 DPRINTF(VIOPci, "Reading offset 0x%x [len: %i]\n", offset, size); 71 72 // Forward device configuration writes to the device VirtIO model 73 if (offset >= OFF_VIO_DEVICE) { 74 vio.readConfig(pkt, offset - OFF_VIO_DEVICE); 75 return 0; 76 } 77 |
78 pkt->makeResponse(); 79 |
80 switch(offset) { 81 case OFF_DEVICE_FEATURES: 82 DPRINTF(VIOPci, " DEVICE_FEATURES request\n"); 83 assert(size == sizeof(uint32_t)); 84 pkt->set<uint32_t>(vio.deviceFeatures); 85 break; 86 87 case OFF_GUEST_FEATURES: --- 60 unchanged lines hidden (view full) --- 148 DPRINTF(VIOPci, "Writing offset 0x%x [len: %i]\n", offset, size); 149 150 // Forward device configuration writes to the device VirtIO model 151 if (offset >= OFF_VIO_DEVICE) { 152 vio.writeConfig(pkt, offset - OFF_VIO_DEVICE); 153 return 0; 154 } 155 |
156 pkt->makeResponse(); 157 |
158 switch(offset) { 159 case OFF_DEVICE_FEATURES: 160 warn("Guest tried to write device features."); 161 break; 162 163 case OFF_GUEST_FEATURES: 164 DPRINTF(VIOPci, " WRITE GUEST_FEATURES request\n"); 165 assert(size == sizeof(uint32_t)); --- 57 unchanged lines hidden --- |