base.cc (10559:62f5f7363197) | base.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 --- 408 unchanged lines hidden (view full) --- 417{ 418 panic("Unhandled device config write (offset: 0x%x).\n", cfgOffset); 419} 420 421void 422VirtIODeviceBase::readConfigBlob(PacketPtr pkt, Addr cfgOffset, const uint8_t *cfg) 423{ 424 const unsigned size(pkt->getSize()); | 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 --- 408 unchanged lines hidden (view full) --- 417{ 418 panic("Unhandled device config write (offset: 0x%x).\n", cfgOffset); 419} 420 421void 422VirtIODeviceBase::readConfigBlob(PacketPtr pkt, Addr cfgOffset, const uint8_t *cfg) 423{ 424 const unsigned size(pkt->getSize()); |
425 pkt->allocate(); | |
426 427 if (cfgOffset + size > configSize) 428 panic("Config read out of bounds.\n"); 429 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()); | 425 426 if (cfgOffset + size > configSize) 427 panic("Config read out of bounds.\n"); 428 429 pkt->setData(const_cast<uint8_t *>(cfg) + cfgOffset); 430} 431 432void 433VirtIODeviceBase::writeConfigBlob(PacketPtr pkt, Addr cfgOffset, uint8_t *cfg) 434{ 435 const unsigned size(pkt->getSize()); |
437 pkt->allocate(); | |
438 439 if (cfgOffset + size > configSize) 440 panic("Config write out of bounds.\n"); 441 442 pkt->writeData((uint8_t *)cfg + cfgOffset); 443} 444 445 --- 37 unchanged lines hidden --- | 436 437 if (cfgOffset + size > configSize) 438 panic("Config write out of bounds.\n"); 439 440 pkt->writeData((uint8_t *)cfg + cfgOffset); 441} 442 443 --- 37 unchanged lines hidden --- |