base.cc (10565:23593fdaadcd) base.cc (10602:3499de20ab3a)
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
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();
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());
436
437 if (cfgOffset + size > configSize)
438 panic("Config write out of bounds.\n");
439
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();
440 pkt->writeData((uint8_t *)cfg + cfgOffset);
441}
442
443
444const VirtQueue &
445VirtIODeviceBase::getCurrentQueue() const
446{
447 if (_queueSelect >= _queues.size())

--- 33 unchanged lines hidden ---
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 ---