dumphdr.h revision 843e19887f64dde75055cf8842fc4db2171eff45
/*
* CDDL HEADER START
*
* 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
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DUMPHDR_H
#define _SYS_DUMPHDR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* The dump header describes the contents of a crash dump. Two headers
* are written out: one at the beginning of the dump, and the other at
* the very end of the dump device. The terminal header is at a known
* location (end of device) so we can always find it. The initial header
* is redundant, but helps savecore(1M) determine whether the dump has been
* overwritten by swap activity. See dumpadm(1M) for dump configuration.
*/
#define DUMP_ERPTSIZE (P2ROUNDUP( \
(ERPT_DATA_SZ / 2) * \
(ERPT_EVCH_MAX + \
ERPT_MAX_ERRS * ERPT_HIWAT), \
DUMP_OFFSET)) /* ereport save area */
typedef struct dumphdr {
long dump_pageshift; /* log2(pagesize) */
long dump_pagesize; /* pagesize */
long dump_hashmask; /* page translation hash mask */
long dump_nvtop; /* number of vtop table entries */
} dumphdr_t;
/*
* Values for dump_flags
*/
/*
* Dump translation map hash table entry.
*/
typedef struct dump_map {
} dump_map_t;
/*
* Dump translation map hash function.
*/
(dhp)->dump_hashmask)
#ifdef _KERNEL
extern u_offset_t dumpvp_size;
extern int dump_conflags;
extern char *dumppath;
extern int dump_timeout;
extern int dump_timeleft;
extern int dump_ioerr;
extern int sync_timeout;
extern int sync_timeleft;
extern void dumpfini(void);
extern void dump_resize(void);
extern void dumpsys(void);
extern void dump_messages(void);
extern void dump_ereports(void);
extern void dumpvp_write(const void *, size_t);
extern int dump_plat_addr(void);
extern void dump_plat_pfn(void);
extern int dump_plat_data(void *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DUMPHDR_H */