Deleted Added
full compact
mmu_oea.c (215163) mmu_oea.c (216174)
1/*-
2 * Copyright (c) 2001 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Matt Thomas <matt@3am-software.com> of Allegro Networks, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

86 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
87 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
88 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
89 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
90 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
91 */
92
93#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Matt Thomas <matt@3am-software.com> of Allegro Networks, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

86 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
87 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
88 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
89 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
90 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
91 */
92
93#include <sys/cdefs.h>
94__FBSDID("$FreeBSD: head/sys/powerpc/aim/mmu_oea.c 215163 2010-11-12 05:12:38Z nwhitehorn $");
94__FBSDID("$FreeBSD: head/sys/powerpc/aim/mmu_oea.c 216174 2010-12-04 02:42:52Z nwhitehorn $");
95
96/*
97 * Manages physical address maps.
98 *
99 * In addition to hardware address maps, this module is called upon to
100 * provide software-use-only maps which may or may not be stored in the
101 * same form as hardware maps. These pseudo-maps are used to store
102 * intermediate results from copy operations to and from address spaces.

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

156#define MOEA_DEBUG
157
158#define TODO panic("%s: not implemented", __func__);
159
160#define VSID_MAKE(sr, hash) ((sr) | (((hash) & 0xfffff) << 4))
161#define VSID_TO_SR(vsid) ((vsid) & 0xf)
162#define VSID_TO_HASH(vsid) (((vsid) >> 4) & 0xfffff)
163
95
96/*
97 * Manages physical address maps.
98 *
99 * In addition to hardware address maps, this module is called upon to
100 * provide software-use-only maps which may or may not be stored in the
101 * same form as hardware maps. These pseudo-maps are used to store
102 * intermediate results from copy operations to and from address spaces.

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

156#define MOEA_DEBUG
157
158#define TODO panic("%s: not implemented", __func__);
159
160#define VSID_MAKE(sr, hash) ((sr) | (((hash) & 0xfffff) << 4))
161#define VSID_TO_SR(vsid) ((vsid) & 0xf)
162#define VSID_TO_HASH(vsid) (((vsid) >> 4) & 0xfffff)
163
164#define PVO_PTEGIDX_MASK 0x007 /* which PTEG slot */
165#define PVO_PTEGIDX_VALID 0x008 /* slot is valid */
166#define PVO_WIRED 0x010 /* PVO entry is wired */
167#define PVO_MANAGED 0x020 /* PVO entry is managed */
168#define PVO_EXECUTABLE 0x040 /* PVO entry is executable */
169#define PVO_BOOTSTRAP 0x080 /* PVO entry allocated during
170 bootstrap */
171#define PVO_FAKE 0x100 /* fictitious phys page */
172#define PVO_VADDR(pvo) ((pvo)->pvo_vaddr & ~ADDR_POFF)
173#define PVO_ISEXECUTABLE(pvo) ((pvo)->pvo_vaddr & PVO_EXECUTABLE)
174#define PVO_ISFAKE(pvo) ((pvo)->pvo_vaddr & PVO_FAKE)
175#define PVO_PTEGIDX_GET(pvo) ((pvo)->pvo_vaddr & PVO_PTEGIDX_MASK)
176#define PVO_PTEGIDX_ISSET(pvo) ((pvo)->pvo_vaddr & PVO_PTEGIDX_VALID)
177#define PVO_PTEGIDX_CLR(pvo) \
178 ((void)((pvo)->pvo_vaddr &= ~(PVO_PTEGIDX_VALID|PVO_PTEGIDX_MASK)))
179#define PVO_PTEGIDX_SET(pvo, i) \
180 ((void)((pvo)->pvo_vaddr |= (i)|PVO_PTEGIDX_VALID))
181
182#define MOEA_PVO_CHECK(pvo)
183
184struct ofw_map {
185 vm_offset_t om_va;
186 vm_size_t om_len;
187 vm_offset_t om_pa;
188 u_int om_mode;
189};

--- 2370 unchanged lines hidden ---
164#define MOEA_PVO_CHECK(pvo)
165
166struct ofw_map {
167 vm_offset_t om_va;
168 vm_size_t om_len;
169 vm_offset_t om_pa;
170 u_int om_mode;
171};

--- 2370 unchanged lines hidden ---