param.h (70584) | param.h (78342) |
---|---|
1/*- 2 * Copyright (c) 2001 David E. O'Brien 3 * Copyright (c) 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * William Jolitz. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)param.h 5.8 (Berkeley) 6/28/91 | 1/*- 2 * Copyright (c) 2001 David E. O'Brien 3 * Copyright (c) 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * William Jolitz. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)param.h 5.8 (Berkeley) 6/28/91 |
38 * $FreeBSD: head/sys/powerpc/include/param.h 70584 2001-01-02 00:06:45Z obrien $ | 38 * $FreeBSD: head/sys/powerpc/include/param.h 78342 2001-06-16 07:14:07Z benno $ |
39 */ 40 41/* 42 * Machine dependent constants for PowerPC (32-bit only currently) 43 */ 44 45/* 46 * Round p (pointer or byte index) up to a correctly-aligned value --- 22 unchanged lines hidden (view full) --- 69#ifndef MACHINE 70#define MACHINE "powerpc" 71#endif 72#ifndef MACHINE_ARCH 73#define MACHINE_ARCH "powerpc" 74#endif 75#define MID_MACHINE MID_POWERPC 76 | 39 */ 40 41/* 42 * Machine dependent constants for PowerPC (32-bit only currently) 43 */ 44 45/* 46 * Round p (pointer or byte index) up to a correctly-aligned value --- 22 unchanged lines hidden (view full) --- 69#ifndef MACHINE 70#define MACHINE "powerpc" 71#endif 72#ifndef MACHINE_ARCH 73#define MACHINE_ARCH "powerpc" 74#endif 75#define MID_MACHINE MID_POWERPC 76 |
77#if !defined(LOCORE) |
|
77#include <machine/cpu.h> | 78#include <machine/cpu.h> |
79#endif |
|
78 79/* 80 * OBJFORMAT_NAMES is a comma-separated list of the object formats 81 * that are supported on the architecture. 82 */ 83#define OBJFORMAT_NAMES "elf" 84#define OBJFORMAT_DEFAULT "elf" 85 --- 67 unchanged lines hidden (view full) --- 153 : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT)) 154 155#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ 156 ((off_t)(db) << DEV_BSHIFT) 157 158/* 159 * Mach derived conversion macros 160 */ | 80 81/* 82 * OBJFORMAT_NAMES is a comma-separated list of the object formats 83 * that are supported on the architecture. 84 */ 85#define OBJFORMAT_NAMES "elf" 86#define OBJFORMAT_DEFAULT "elf" 87 --- 67 unchanged lines hidden (view full) --- 155 : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT)) 156 157#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ 158 ((off_t)(db) << DEV_BSHIFT) 159 160/* 161 * Mach derived conversion macros 162 */ |
161#define trunc_page(x) ((x) & ~PAGE_MASK) | 163#define trunc_page(x) ((unsigned long)(x) & ~(PAGE_MASK)) |
162#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK) 163#define trunc_4mpage(x) ((unsigned)(x) & ~PDRMASK) 164#define round_4mpage(x) ((((unsigned)(x)) + PDRMASK) & ~PDRMASK) 165 | 164#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK) 165#define trunc_4mpage(x) ((unsigned)(x) & ~PDRMASK) 166#define round_4mpage(x) ((((unsigned)(x)) + PDRMASK) & ~PDRMASK) 167 |
166#define atop(x) ((unsigned)(x) >> PAGE_SHIFT) 167#define ptoa(x) ((unsigned)(x) << PAGE_SHIFT) | 168#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT) 169#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT) |
168 169#define powerpc_btop(x) ((unsigned)(x) >> PAGE_SHIFT) 170#define powerpc_ptob(x) ((unsigned)(x) << PAGE_SHIFT) 171 172#define pgtok(x) ((x) * (PAGE_SIZE / 1024)) 173 | 170 171#define powerpc_btop(x) ((unsigned)(x) >> PAGE_SHIFT) 172#define powerpc_ptob(x) ((unsigned)(x) << PAGE_SHIFT) 173 174#define pgtok(x) ((x) * (PAGE_SIZE / 1024)) 175 |
176/* XXX: NetBSD defines that we're using for the moment */ 177#define USER_SR 13 178#define KERNEL_SR 14 179#define KERNEL_SEGMENT (0xfffff0 + KERNEL_SR) 180#define EMPTY_SEGMENT 0xfffff0 181#define USER_ADDR ((void *)(USER_SR << ADDR_SR_SHFT)) 182#define SEGMENT_LENGTH 0x10000000 183#define SEGMENT_MASK 0xf0000000 184 185#if !defined(NPMAPS) 186#define NPMAPS 32768 187#endif /* !defined(NPMAPS) */ 188 189#if !defined(MSGBUFSIZE) 190#define MSGBUFSIZE PAGE_SIZE 191#endif /* !defined(MSGBUFSIZE) */ 192 193/* 194 * XXX: Stop NetBSD msgbuf_paddr code from happening. 195 */ 196#define MSGBUFADDR 197 |
|
174#endif /* !_MACHINE_PARAM_H_ */ 175#endif /* !_NO_NAMESPACE_POLLUTION */ | 198#endif /* !_MACHINE_PARAM_H_ */ 199#endif /* !_NO_NAMESPACE_POLLUTION */ |