xref: /illumos-gate/usr/src/man/man9e/dump.9e (revision 5d9d9091f564c198a760790b0bfa72c44e17912b)
te
Copyright (c) 1992, Sun Microsystems, Inc.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
DUMP 9E "Oct 9, 2001"
NAME
dump - dump memory to device during system failure
SYNOPSIS
#include <sys/types.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>



int dump(dev_t dev, caddr_t addr, daddr_t blkno, int nblk);
INTERFACE LEVEL
illumos specific (illumos DDI). This entry point is required. For drivers that do not implement dump() routines, nodev(9F) should be used.
ARGUMENTS
dev

Device number.

addr

Address for the beginning of the area to be dumped.

blkno

Block offset to dump memory.

nblk

Number of blocks to dump.

DESCRIPTION
dump() is used to dump a portion of virtual address space directly to a device in the case of system failure. It can also be used for checking the state of the kernel during a checkpoint operation. The memory area to be dumped is specified by addr (base address) and nblk (length). It is dumped to the device specified by dev starting at offset blkno. Upon completion dump() returns the status of the transfer.

When the system is panicking, the calls of functions scheduled by timeout(9F) and ddi_trigger_softintr(9F) will never occur. Neither can delay(9F) be relied upon, since it is implemented via timeout(). See ddi_in_panic(9F).

dump() is called at interrupt priority.

RETURN VALUES
dump() returns 0 on success, or the appropriate error number.
SEE ALSO
cpr (4), nodev (9F)

Writing Device Drivers