Deleted Added
full compact
bat.h (139825) bat.h (242904)
1/*-
2 * Copyright (c) 1999 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Jason R. Thorpe.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 51 unchanged lines hidden (view full) ---

60 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
61 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
62 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
63 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
64 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
65 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66 *
67 * $NetBSD: bat.h,v 1.2 1999/12/18 01:36:06 thorpej Exp $
1/*-
2 * Copyright (c) 1999 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Jason R. Thorpe.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 51 unchanged lines hidden (view full) ---

60 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
61 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
62 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
63 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
64 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
65 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66 *
67 * $NetBSD: bat.h,v 1.2 1999/12/18 01:36:06 thorpej Exp $
68 * $FreeBSD: head/sys/powerpc/include/bat.h 139825 2005-01-07 02:29:27Z imp $
68 * $FreeBSD: head/sys/powerpc/include/bat.h 242904 2012-11-12 06:15:54Z rpaulo $
69 */
70
71#ifndef _MACHINE_BAT_H_
72#define _MACHINE_BAT_H_
73
69 */
70
71#ifndef _MACHINE_BAT_H_
72#define _MACHINE_BAT_H_
73
74#ifndef LOCORE
74struct bat {
75 u_int32_t batu;
76 u_int32_t batl;
77};
75struct bat {
76 u_int32_t batu;
77 u_int32_t batl;
78};
79#endif
78
79/* Lower BAT bits (all but PowerPC 601): */
80#define BAT_PBS 0xfffe0000 /* physical block start */
81#define BAT_W 0x00000040 /* 1 = write-through, 0 = write-back */
82#define BAT_I 0x00000020 /* cache inhibit */
83#define BAT_M 0x00000010 /* memory coherency enable */
84#define BAT_G 0x00000008 /* guarded region */
85

--- 74 unchanged lines hidden (view full) ---

160#define BAT601_BSM_8M 0x0000003f
161
162#define BATU601(va, wim, key, pp) \
163 (((va) & BAT601_BLPI) | (wim) | (key) | (pp))
164
165#define BATL601(pa, size, v) \
166 (((pa) & BAT601_PBN) | (v) | (size))
167
80
81/* Lower BAT bits (all but PowerPC 601): */
82#define BAT_PBS 0xfffe0000 /* physical block start */
83#define BAT_W 0x00000040 /* 1 = write-through, 0 = write-back */
84#define BAT_I 0x00000020 /* cache inhibit */
85#define BAT_M 0x00000010 /* memory coherency enable */
86#define BAT_G 0x00000008 /* guarded region */
87

--- 74 unchanged lines hidden (view full) ---

162#define BAT601_BSM_8M 0x0000003f
163
164#define BATU601(va, wim, key, pp) \
165 (((va) & BAT601_BLPI) | (wim) | (key) | (pp))
166
167#define BATL601(pa, size, v) \
168 (((pa) & BAT601_PBN) | (v) | (size))
169
168#ifdef _KERNEL
170#if defined(_KERNEL) && !defined(LOCORE)
169extern struct bat battable[16];
170#endif
171
172#endif /* _MACHINE_BAT_H_ */
171extern struct bat battable[16];
172#endif
173
174#endif /* _MACHINE_BAT_H_ */