xref: /freebsd/sys/arm/include/minidump.h (revision 2ff63af9b88c7413b7d71715b5532625752a248e)
18e321b79SRafal Jaworowski /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3af3dc4a7SPedro F. Giffuni  *
48e321b79SRafal Jaworowski  * Copyright (c) 2006 Peter Wemm
58e321b79SRafal Jaworowski  * All rights reserved.
68e321b79SRafal Jaworowski  *
78e321b79SRafal Jaworowski  * Redistribution and use in source and binary forms, with or without
88e321b79SRafal Jaworowski  * modification, are permitted provided that the following conditions
98e321b79SRafal Jaworowski  * are met:
108e321b79SRafal Jaworowski  *
118e321b79SRafal Jaworowski  * 1. Redistributions of source code must retain the above copyright
128e321b79SRafal Jaworowski  *    notice, this list of conditions and the following disclaimer.
138e321b79SRafal Jaworowski  * 2. Redistributions in binary form must reproduce the above copyright
148e321b79SRafal Jaworowski  *    notice, this list of conditions and the following disclaimer in the
158e321b79SRafal Jaworowski  *    documentation and/or other materials provided with the distribution.
168e321b79SRafal Jaworowski  *
178e321b79SRafal Jaworowski  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
188e321b79SRafal Jaworowski  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
198e321b79SRafal Jaworowski  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
208e321b79SRafal Jaworowski  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
218e321b79SRafal Jaworowski  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
228e321b79SRafal Jaworowski  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
238e321b79SRafal Jaworowski  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
248e321b79SRafal Jaworowski  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
258e321b79SRafal Jaworowski  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
268e321b79SRafal Jaworowski  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
278e321b79SRafal Jaworowski  *
288e321b79SRafal Jaworowski  * From: FreeBSD: src/sys/i386/include/minidump.h,v 1.1 2006/04/21 04:28:43
298e321b79SRafal Jaworowski  */
308e321b79SRafal Jaworowski 
318e321b79SRafal Jaworowski #ifndef	_MACHINE_MINIDUMP_H_
32effb4b3cSSvatopluk Kraus #define	_MACHINE_MINIDUMP_H_
338e321b79SRafal Jaworowski 
348e321b79SRafal Jaworowski #define	MINIDUMP_MAGIC		"minidump FreeBSD/arm"
3500e66147SD Scott Phillips #define	MINIDUMP_VERSION	2
368e321b79SRafal Jaworowski 
37effb4b3cSSvatopluk Kraus /*
38effb4b3cSSvatopluk Kraus  * The first page of vmcore is dedicated to the following header.
39effb4b3cSSvatopluk Kraus  * As the rest of the page is zeroed, any header extension can be
40effb4b3cSSvatopluk Kraus  * done without version bumping. It should be taken into account
41effb4b3cSSvatopluk Kraus  * only that new entries will be zero in old vmcores.
42effb4b3cSSvatopluk Kraus  */
43effb4b3cSSvatopluk Kraus 
448e321b79SRafal Jaworowski struct minidumphdr {
458e321b79SRafal Jaworowski 	char magic[24];
468e321b79SRafal Jaworowski 	uint32_t version;
478e321b79SRafal Jaworowski 	uint32_t msgbufsize;
488e321b79SRafal Jaworowski 	uint32_t bitmapsize;
498e321b79SRafal Jaworowski 	uint32_t ptesize;
508e321b79SRafal Jaworowski 	uint32_t kernbase;
51effb4b3cSSvatopluk Kraus 	uint32_t arch;
52effb4b3cSSvatopluk Kraus 	uint32_t mmuformat;
5300e66147SD Scott Phillips 	uint32_t dumpavailsize;
548e321b79SRafal Jaworowski };
558e321b79SRafal Jaworowski 
56effb4b3cSSvatopluk Kraus #define MINIDUMP_MMU_FORMAT_UNKNOWN	0
57effb4b3cSSvatopluk Kraus #define MINIDUMP_MMU_FORMAT_V4		1
58effb4b3cSSvatopluk Kraus #define MINIDUMP_MMU_FORMAT_V6		2
59effb4b3cSSvatopluk Kraus #define MINIDUMP_MMU_FORMAT_V6_LPAE	3
60effb4b3cSSvatopluk Kraus 
618e321b79SRafal Jaworowski #endif /* _MACHINE_MINIDUMP_H_ */
62