1 /* $NetBSD: kcore.h,v 1.4 2001/05/21 14:48:58 fredette Exp $ */
4 * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Gordon W. Ross, Jason R. Thorpe, and Leo Weppelman.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _M68K_KCORE_H_
33 #define _M68K_KCORE_H_
36 * Unified m68k kcore header descriptions.
38 * NOTE: We must have all possible m68k kcore types defined in this
39 * file. Otherwise, we require kernel sources for all m68k platforms
42 * We must provide STE/PTE bits in the kcore header for a couple
45 * - different platforms may have the MMUs configured for different
47 * - we may not have a specific platform's pte.h available to us
49 * These are on-disk structures; use fixed-sized types!
51 * The total size of the cpu_kcore_hdr should be <= DEV_BSIZE!
55 * kcore information for Utah-derived pmaps
57 #define M68K_NPHYS_RAM_SEGS 8 /* XXX */
58 struct m68k_kcore_hdr
{
59 int32_t mmutype
; /* MMU type */
60 u_int32_t sg_v
; /* STE bits */
64 u_int32_t sg40_shift1
;
66 u_int32_t sg40_shift2
;
68 u_int32_t sg40_shift3
;
71 u_int32_t pg_v
; /* PTE bits */
73 u_int32_t sysseg_pa
; /* PA of Sysseg[] */
74 u_int32_t reloc
; /* value added to relocate a symbol
75 before address translation is
77 u_int32_t relocend
; /* if kernbase < va < relocend, we
78 can do simple relocation to get
79 the physical address */
80 phys_ram_seg_t ram_segs
[M68K_NPHYS_RAM_SEGS
];
84 * kcore information for the sun2
86 struct sun2_kcore_hdr
{
88 u_int32_t pg_frame
; /* PTE bits */
90 u_int8_t ksegmap
[512]; /* kernel segment map */
94 * kcore information for the sun3
96 struct sun3_kcore_hdr
{
98 u_int32_t pg_frame
; /* PTE bits */
100 u_int8_t ksegmap
[256]; /* kernel segment map */
104 * kcore information for the sun3x; Motorola MMU, but a very
107 #define SUN3X_NPHYS_RAM_SEGS 4
108 struct sun3x_kcore_hdr
{
109 u_int32_t pg_frame
; /* PTE bits */
111 u_int32_t contig_end
;
112 u_int32_t kernCbase
; /* VA of kernel level C page table */
113 phys_ram_seg_t ram_segs
[SUN3X_NPHYS_RAM_SEGS
];
117 * Catch-all header. "un" is interpreted based on the contents of "name".
119 struct cpu_kcore_hdr
{
120 char name
[16]; /* machine name */
121 u_int32_t page_size
; /* hardware page size */
122 u_int32_t kernbase
; /* start of KVA space */
124 struct m68k_kcore_hdr _m68k
;
125 struct sun2_kcore_hdr _sun2
;
126 struct sun3_kcore_hdr _sun3
;
127 struct sun3x_kcore_hdr _sun3x
;
131 typedef struct cpu_kcore_hdr cpu_kcore_hdr_t
;
133 #endif /* _M68K_KCORE_H_ */