mm_disk.cc (8641:4d3ecac1abec) | mm_disk.cc (9808:13ffc0066b76) |
---|---|
1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 31 unchanged lines hidden (view full) --- 40#include "dev/sparc/mm_disk.hh" 41#include "dev/platform.hh" 42#include "mem/packet_access.hh" 43#include "mem/port.hh" 44#include "sim/byteswap.hh" 45#include "sim/system.hh" 46 47MmDisk::MmDisk(const Params *p) | 1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 31 unchanged lines hidden (view full) --- 40#include "dev/sparc/mm_disk.hh" 41#include "dev/platform.hh" 42#include "mem/packet_access.hh" 43#include "mem/port.hh" 44#include "sim/byteswap.hh" 45#include "sim/system.hh" 46 47MmDisk::MmDisk(const Params *p) |
48 : BasicPioDevice(p), image(p->image), curSector((off_t)-1), dirty(false) | 48 : BasicPioDevice(p, p->image->size() * SectorSize), 49 image(p->image), curSector((off_t)-1), dirty(false) |
49{ 50 std::memset(&diskData, 0, SectorSize); | 50{ 51 std::memset(&diskData, 0, SectorSize); |
51 pioSize = image->size() * SectorSize; | |
52} 53 54Tick 55MmDisk::read(PacketPtr pkt) 56{ 57 Addr accessAddr; 58 off_t sector; 59 uint16_t d16; --- 131 unchanged lines hidden --- | 52} 53 54Tick 55MmDisk::read(PacketPtr pkt) 56{ 57 Addr accessAddr; 58 off_t sector; 59 uint16_t d16; --- 131 unchanged lines hidden --- |