mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Update to new crashdump API
This commit is contained in:
parent
143c9ae267
commit
ff2387cb57
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110483
@ -183,53 +183,24 @@ static int
|
|||||||
idad_dump(dev_t dev, void *virtual, vm_offset_t physical, off_t offset, size_t length)
|
idad_dump(dev_t dev, void *virtual, vm_offset_t physical, off_t offset, size_t length)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* This needs modified to the new dump API */
|
|
||||||
return (ENXIO);
|
|
||||||
#if 0
|
|
||||||
struct idad_softc *drv;
|
struct idad_softc *drv;
|
||||||
u_int count, blkno, secsize;
|
int error = 0;
|
||||||
long blkcnt;
|
|
||||||
int i, error, dumppages;
|
|
||||||
caddr_t va;
|
|
||||||
vm_offset_t addr, a;
|
|
||||||
|
|
||||||
if ((error = disk_dumpcheck(dev, &count, &blkno, &secsize)))
|
|
||||||
return (error);
|
|
||||||
|
|
||||||
drv = idad_getsoftc(dev);
|
drv = idad_getsoftc(dev);
|
||||||
if (drv == NULL)
|
if (drv == NULL)
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
|
||||||
addr = 0;
|
drv->controller->flags &= ~IDA_INTERRUPTS;
|
||||||
blkcnt = howmany(PAGE_SIZE, secsize);
|
|
||||||
|
|
||||||
while (count > 0) {
|
if (length > 0) {
|
||||||
va = NULL;
|
error = ida_command(drv->controller, CMD_WRITE, virtual,
|
||||||
|
length, drv->drive, offset / DEV_BSIZE, DMA_DATA_OUT);
|
||||||
dumppages = imin(count / blkcnt, MAXDUMPPGS);
|
|
||||||
|
|
||||||
for (i = 0; i < dumppages; i++) {
|
|
||||||
a = addr + (i * PAGE_SIZE);
|
|
||||||
if (is_physical_memory(a))
|
|
||||||
va = pmap_kenter_temporary(trunc_page(a), i);
|
|
||||||
else
|
|
||||||
va = pmap_kenter_temporary(trunc_page(0), i);
|
|
||||||
}
|
|
||||||
|
|
||||||
error = ida_command(drv->controller, CMD_WRITE, va,
|
|
||||||
PAGE_SIZE * dumppages, drv->drive, blkno, DMA_DATA_OUT);
|
|
||||||
if (error)
|
if (error)
|
||||||
return (error);
|
goto out;
|
||||||
|
|
||||||
if (dumpstatus(addr, (off_t)count * DEV_BSIZE) < 0)
|
|
||||||
return (EINTR);
|
|
||||||
|
|
||||||
blkno += blkcnt * dumppages;
|
|
||||||
count -= blkcnt * dumppages;
|
|
||||||
addr += PAGE_SIZE * dumppages;
|
|
||||||
}
|
}
|
||||||
return (0);
|
out:
|
||||||
#endif
|
drv->controller->flags |= IDA_INTERRUPTS;
|
||||||
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user