1bdb9ab0dSMark Johnston /*- 2bdb9ab0dSMark Johnston * Copyright (c) 2014 EMC Corp. 3bdb9ab0dSMark Johnston * Author: Conrad Meyer <conrad.meyer@isilon.com> 4bdb9ab0dSMark Johnston * All rights reserved. 5bdb9ab0dSMark Johnston * 6bdb9ab0dSMark Johnston * Redistribution and use in source and binary forms, with or without 7bdb9ab0dSMark Johnston * modification, are permitted provided that the following conditions 8bdb9ab0dSMark Johnston * are met: 9bdb9ab0dSMark Johnston * 1. Redistributions of source code must retain the above copyright 10bdb9ab0dSMark Johnston * notice, this list of conditions and the following disclaimer. 11bdb9ab0dSMark Johnston * 2. Redistributions in binary form must reproduce the above copyright 12bdb9ab0dSMark Johnston * notice, this list of conditions and the following disclaimer in the 13bdb9ab0dSMark Johnston * documentation and/or other materials provided with the distribution. 14bdb9ab0dSMark Johnston * 15bdb9ab0dSMark Johnston * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16bdb9ab0dSMark Johnston * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17bdb9ab0dSMark Johnston * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18bdb9ab0dSMark Johnston * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19bdb9ab0dSMark Johnston * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20bdb9ab0dSMark Johnston * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21bdb9ab0dSMark Johnston * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22bdb9ab0dSMark Johnston * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23bdb9ab0dSMark Johnston * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24bdb9ab0dSMark Johnston * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25bdb9ab0dSMark Johnston * SUCH DAMAGE. 26bdb9ab0dSMark Johnston * 27bdb9ab0dSMark Johnston * $FreeBSD$ 28bdb9ab0dSMark Johnston */ 29bdb9ab0dSMark Johnston 30bdb9ab0dSMark Johnston #ifndef _MACHINE_DUMP_H_ 31bdb9ab0dSMark Johnston #define _MACHINE_DUMP_H_ 32bdb9ab0dSMark Johnston 33bdb9ab0dSMark Johnston #define KERNELDUMP_ARCH_VERSION KERNELDUMP_ARM_VERSION 34bdb9ab0dSMark Johnston #define EM_VALUE EM_ARM 35bdb9ab0dSMark Johnston /* XXX: I suppose 20 should be enough. */ 36bdb9ab0dSMark Johnston #define DUMPSYS_MD_PA_NPAIRS 20 37bdb9ab0dSMark Johnston #define DUMPSYS_NUM_AUX_HDRS 1 38bdb9ab0dSMark Johnston 39*ab4ed843SMitchell Horne /* How often to check the dump progress bar? */ 40*ab4ed843SMitchell Horne #define DUMPSYS_PB_CHECK_BITS 22 /* Every 4MB */ 41*ab4ed843SMitchell Horne 42bdb9ab0dSMark Johnston void dumpsys_wbinv_all(void); 43bdb9ab0dSMark Johnston int dumpsys_write_aux_headers(struct dumperinfo *di); 44bdb9ab0dSMark Johnston 45bdb9ab0dSMark Johnston static inline void 46bdb9ab0dSMark Johnston dumpsys_pa_init(void) 47bdb9ab0dSMark Johnston { 48bdb9ab0dSMark Johnston 49bdb9ab0dSMark Johnston dumpsys_gen_pa_init(); 50bdb9ab0dSMark Johnston } 51bdb9ab0dSMark Johnston 52bdb9ab0dSMark Johnston static inline struct dump_pa * 53bdb9ab0dSMark Johnston dumpsys_pa_next(struct dump_pa *p) 54bdb9ab0dSMark Johnston { 55bdb9ab0dSMark Johnston 56bdb9ab0dSMark Johnston return (dumpsys_gen_pa_next(p)); 57bdb9ab0dSMark Johnston } 58bdb9ab0dSMark Johnston 59bdb9ab0dSMark Johnston static inline void 60bdb9ab0dSMark Johnston dumpsys_unmap_chunk(vm_paddr_t pa, size_t s, void *va) 61bdb9ab0dSMark Johnston { 62bdb9ab0dSMark Johnston 63bdb9ab0dSMark Johnston dumpsys_gen_unmap_chunk(pa, s, va); 64bdb9ab0dSMark Johnston } 65bdb9ab0dSMark Johnston 66bdb9ab0dSMark Johnston static inline int 67bdb9ab0dSMark Johnston dumpsys(struct dumperinfo *di) 68bdb9ab0dSMark Johnston { 69bdb9ab0dSMark Johnston 70bdb9ab0dSMark Johnston return (dumpsys_generic(di)); 71bdb9ab0dSMark Johnston } 72bdb9ab0dSMark Johnston 73bdb9ab0dSMark Johnston #endif /* !_MACHINE_DUMP_H_ */ 74