pci.cc (10559:62f5f7363197) pci.cc (10565:23593fdaadcd)
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
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->allocate();
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
78 switch(offset) {
79 case OFF_DEVICE_FEATURES:
80 DPRINTF(VIOPci, " DEVICE_FEATURES request\n");
81 assert(size == sizeof(uint32_t));
82 pkt->set<uint32_t>(vio.deviceFeatures);
83 break;
84
85 case OFF_GUEST_FEATURES:

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

146 DPRINTF(VIOPci, "Writing offset 0x%x [len: %i]\n", offset, size);
147
148 // Forward device configuration writes to the device VirtIO model
149 if (offset >= OFF_VIO_DEVICE) {
150 vio.writeConfig(pkt, offset - OFF_VIO_DEVICE);
151 return 0;
152 }
153
156 pkt->allocate();
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 ---
154 switch(offset) {
155 case OFF_DEVICE_FEATURES:
156 warn("Guest tried to write device features.");
157 break;
158
159 case OFF_GUEST_FEATURES:
160 DPRINTF(VIOPci, " WRITE GUEST_FEATURES request\n");
161 assert(size == sizeof(uint32_t));

--- 57 unchanged lines hidden ---