| Line 626... |
Line 626... |
| 626 |
return result
|
626 |
return result
|
| 627 |
|
627 |
|
| 628 |
@command(timeout = 50000)
|
628 |
@command(timeout = 50000)
|
| 629 |
def storage_read_sectors_md(self, volume, sector, count, addr):
|
629 |
def storage_read_sectors_md(self, volume, sector, count, addr):
|
| 630 |
""" Read sectors from as storage device """
|
630 |
""" Read sectors from as storage device """
|
| 631 |
self.logger.debug("Reading %d sectors from disk at volume %d, sector %d to memory at 0x%x\n" % (count, volume, sector, addr)
|
631 |
self.logger.debug("Reading %d sectors from disk at volume %d, sector %d to memory at 0x%x\n" % (count, volume, sector, addr))
|
| 632 |
result = self.lib.monitorcommand(struct.pack("IIQIIII", 28, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
|
632 |
result = self.lib.monitorcommand(struct.pack("IIQIIII", 28, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
|
| 633 |
self.logger.debug("Read sectors, result: 0x%x\n" % result.rc)
|
633 |
self.logger.debug("Read sectors, result: 0x%x\n" % result.rc)
|
| 634 |
if result.rc > 0x80000000:
|
634 |
if result.rc > 0x80000000:
|
| 635 |
raise DeviceError("storage_read_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, rc))
|
635 |
raise DeviceError("storage_read_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, rc))
|
| 636 |
|
636 |
|
| 637 |
@command(timeout = 50000)
|
637 |
@command(timeout = 50000)
|
| 638 |
def storage_write_sectors_md(self, volume, sector, count, addr):
|
638 |
def storage_write_sectors_md(self, volume, sector, count, addr):
|
| 639 |
""" Read sectors from as storage device """
|
639 |
""" Read sectors from as storage device """
|
| 640 |
self.logger.debug("Writing %d sectors from memory at 0x%x to disk at volume %d, sector %d\n" % (count, addr, volume, sector)
|
640 |
self.logger.debug("Writing %d sectors from memory at 0x%x to disk at volume %d, sector %d\n" % (count, addr, volume, sector))
|
| 641 |
result = self.lib.monitorcommand(struct.pack("IIQIIII", 29, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
|
641 |
result = self.lib.monitorcommand(struct.pack("IIQIIII", 29, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
|
| 642 |
self.logger.debug("Wrote sectors, result: 0x%x\n" % result.rc)
|
642 |
self.logger.debug("Wrote sectors, result: 0x%x\n" % result.rc)
|
| 643 |
if result.rc > 0x80000000:
|
643 |
if result.rc > 0x80000000:
|
| 644 |
raise DeviceError("storage_write_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, rc))
|
644 |
raise DeviceError("storage_write_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, rc))
|
| 645 |
|
645 |
|