1292407Sbr/*-
2292407Sbr * Copyright (c) 2014 EMC Corp.
3292407Sbr * Author: Conrad Meyer <conrad.meyer@isilon.com>
4292407Sbr * All rights reserved.
5292407Sbr *
6292407Sbr * Redistribution and use in source and binary forms, with or without
7292407Sbr * modification, are permitted provided that the following conditions
8292407Sbr * are met:
9292407Sbr * 1. Redistributions of source code must retain the above copyright
10292407Sbr *    notice, this list of conditions and the following disclaimer.
11292407Sbr * 2. Redistributions in binary form must reproduce the above copyright
12292407Sbr *    notice, this list of conditions and the following disclaimer in the
13292407Sbr *    documentation and/or other materials provided with the distribution.
14292407Sbr *
15292407Sbr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16292407Sbr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17292407Sbr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18292407Sbr * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19292407Sbr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20292407Sbr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21292407Sbr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22292407Sbr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23292407Sbr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24292407Sbr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25292407Sbr * SUCH DAMAGE.
26292407Sbr *
27292407Sbr * $FreeBSD$
28292407Sbr */
29292407Sbr
30292407Sbr#ifndef _MACHINE_DUMP_H_
31292407Sbr#define	_MACHINE_DUMP_H_
32292407Sbr
33292407Sbr#define	KERNELDUMP_ARCH_VERSION	KERNELDUMP_RISCV_VERSION
34292407Sbr#define	EM_VALUE		EM_RISCV
35292407Sbr
36292407Sbr/* 20 phys_avail entry pairs correspond to 10 pa's */
37292407Sbr#define	DUMPSYS_MD_PA_NPAIRS	10
38292407Sbr#define	DUMPSYS_NUM_AUX_HDRS	0
39292407Sbr
40292407Sbrstatic inline void
41292407Sbrdumpsys_pa_init(void)
42292407Sbr{
43292407Sbr
44292407Sbr	dumpsys_gen_pa_init();
45292407Sbr}
46292407Sbr
47292407Sbrstatic inline struct dump_pa *
48292407Sbrdumpsys_pa_next(struct dump_pa *p)
49292407Sbr{
50292407Sbr
51292407Sbr	return (dumpsys_gen_pa_next(p));
52292407Sbr}
53292407Sbr
54292407Sbrstatic inline void
55292407Sbrdumpsys_wbinv_all(void)
56292407Sbr{
57292407Sbr
58292407Sbr	dumpsys_gen_wbinv_all();
59292407Sbr}
60292407Sbr
61292407Sbrstatic inline void
62292407Sbrdumpsys_unmap_chunk(vm_paddr_t pa, size_t s, void *va)
63292407Sbr{
64292407Sbr
65292407Sbr	dumpsys_gen_unmap_chunk(pa, s, va);
66292407Sbr}
67292407Sbr
68292407Sbrstatic inline int
69292407Sbrdumpsys_write_aux_headers(struct dumperinfo *di)
70292407Sbr{
71292407Sbr
72292407Sbr	return (dumpsys_gen_write_aux_headers(di));
73292407Sbr}
74292407Sbr
75292407Sbrstatic inline int
76292407Sbrdumpsys(struct dumperinfo *di)
77292407Sbr{
78292407Sbr
79292407Sbr	return (dumpsys_generic(di));
80292407Sbr}
81292407Sbr
82292407Sbr#endif  /* !_MACHINE_DUMP_H_ */
83