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 --- 412 unchanged lines hidden (view full) --- 421void 422VirtIODeviceBase::readConfigBlob(PacketPtr pkt, Addr cfgOffset, const uint8_t *cfg) 423{ 424 const unsigned size(pkt->getSize()); 425 426 if (cfgOffset + size > configSize) 427 panic("Config read out of bounds.\n"); 428 |
429 pkt->makeResponse(); |
430 pkt->setData(const_cast<uint8_t *>(cfg) + cfgOffset); 431} 432 433void 434VirtIODeviceBase::writeConfigBlob(PacketPtr pkt, Addr cfgOffset, uint8_t *cfg) 435{ 436 const unsigned size(pkt->getSize()); 437 438 if (cfgOffset + size > configSize) 439 panic("Config write out of bounds.\n"); 440 |
441 pkt->makeResponse(); |
442 pkt->writeData((uint8_t *)cfg + cfgOffset); 443} 444 445 446const VirtQueue & 447VirtIODeviceBase::getCurrentQueue() const 448{ 449 if (_queueSelect >= _queues.size()) --- 33 unchanged lines hidden --- |