Date: Sat, 25 Jan 2003 14:48:25 -0800 (PST) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 24192 for review Message-ID: <200301252248.h0PMmP7R023142@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=24192 Change 24192 by jmallett@jmallett_dalek on 2003/01/25 14:48:06 Buy, beg, borrow, steal, and fake enough to fall over later in MI code compile. Affected files ... .. //depot/projects/mips/sys/mips/include/bus.h#2 edit .. //depot/projects/mips/sys/mips/include/elf.h#3 edit .. //depot/projects/mips/sys/mips/include/limits.h#2 edit .. //depot/projects/mips/sys/mips/include/md_var.h#2 edit .. //depot/projects/mips/sys/mips/include/pmap.h#2 edit .. //depot/projects/mips/sys/mips/include/reg.h#2 edit .. //depot/projects/mips/sys/mips/include/stdarg.h#2 edit .. //depot/projects/mips/sys/mips/include/vmparam.h#3 edit Differences ... ==== //depot/projects/mips/sys/mips/include/bus.h#2 (text+ko) ==== @@ -32,5 +32,6 @@ typedef unsigned long bus_size_t; typedef int bus_type_t; typedef unsigned long bus_space_handle_t; +typedef unsigned long bus_space_tag_t; #endif /* !_MACHINE_BUS_H_ */ ==== //depot/projects/mips/sys/mips/include/elf.h#3 (text+ko) ==== @@ -33,6 +33,8 @@ /* * EABI ELF definitions for the MIPS architecture. + * + * For now, this is 32-bit. */ #include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */ @@ -46,10 +48,63 @@ #define ELF_MACHINE_OK(x) ((x) == ELF_ARCH) /* - * Auxillary info. + * Auxillary info. Called auxv_t in the ELF ABI, but we call it this to + * avoid conflicts. + */ + +typedef struct { /* Auxiliary vector entry on initial stack */ + int a_type; /* Entry type. */ + union { + int a_val; /* Integer value. */ + void *a_ptr; /* Address. */ + void (*a_fcn)(void); /* Function pointer (not used). */ + } a_un; +} Elf32_Auxinfo; + +typedef struct { /* Auxiliary vector entry on initial stack */ + long a_type; /* Entry type. */ + union { + long a_val; /* Integer value. */ + void *a_ptr; /* Address. */ + void (*a_fcn)(void); /* Function pointer (not used). */ + } a_un; +} Elf64_Auxinfo; + +__ElfType(Auxinfo); + +/* Values for a_type. */ +#define AT_NULL 0 /* Terminates the vector. */ +#define AT_IGNORE 1 /* Ignored entry. */ +#define AT_EXECFD 2 /* File descriptor of program to load. */ +#define AT_PHDR 3 /* Program header of program already loaded. */ +#define AT_PHENT 4 /* Size of each program header entry. */ +#define AT_PHNUM 5 /* Number of program header entries. */ +#define AT_PAGESZ 6 /* Page size in bytes. */ +#define AT_BASE 7 /* Interpreter's base address. */ +#define AT_FLAGS 8 /* Flags (unused). */ +#define AT_ENTRY 9 /* Where interpreter should transfer control. */ + +/* + * The following non-standard values are used for passing information + * from John Polstra's testbed program to the dynamic linker. These + * are expected to go away soon. * - * XXX Empty for now. + * Unfortunately, these overlap the Linux non-standard values, so they + * must not be used in the same context. + */ +#define AT_BRK 10 /* Starting point for sbrk and brk. */ +#define AT_DEBUG 11 /* Debugging level. */ + +/* + * The following non-standard values are used in Linux ELF binaries. */ +#define AT_NOTELF 10 /* Program is not ELF ?? */ +#define AT_UID 11 /* Real uid. */ +#define AT_EUID 12 /* Effective uid. */ +#define AT_GID 13 /* Real gid. */ +#define AT_EGID 14 /* Effective gid. */ + +#define AT_COUNT 15 /* Count of defined aux entry types. */ /* * Relocation types. ==== //depot/projects/mips/sys/mips/include/limits.h#2 (text+ko) ==== @@ -1,5 +1,6 @@ -/*- - * Copyright (c) 2003 Juli Mallett. All rights reserved. +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -9,11 +10,18 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -22,14 +30,79 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * @(#)limits.h 8.3 (Berkeley) 1/4/94 + * $FreeBSD: src/sys/powerpc/include/limits.h,v 1.23 2003/01/18 11:23:42 grehan Exp $ */ #ifndef _MACHINE_LIMITS_H_ #define _MACHINE_LIMITS_H_ +#define CHAR_BIT 8 /* number of bits in a char */ + /* - * Nothing to see here. + * According to ANSI (section 2.2.4.2), the values below must be usable by + * #if preprocessing directives. Additionally, the expression must have the + * same type as would an expression that is an object of the corresponding + * type converted according to the integral promotions. The subtraction for + * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an + * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + * These numbers are for the default configuration of gcc. They work for + * some other compilers as well, but this should not be depended on. */ +#define SCHAR_MAX 0x7f /* max value for a signed char */ +#define SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ + +#define UCHAR_MAX 0xff /* max value for an unsigned char */ + +#ifdef __CHAR_UNSIGNED__ +#define CHAR_MAX UCHAR_MAX /* max value for a char */ +#define CHAR_MIN 0 /* min value for a char */ +#else +#define CHAR_MAX SCHAR_MAX /* max value for a char */ +#define CHAR_MIN SCHAR_MIN /* min value for a char */ +#endif + +#define USHRT_MAX 0xffff /* max value for an unsigned short */ +#define SHRT_MAX 0x7fff /* max value for a short */ +#define SHRT_MIN (-0x7fff - 1) /* min value for a short */ + +#define UINT_MAX 0xffffffffU /* max value for an unsigned int */ +#define INT_MAX 0x7fffffff /* max value for an int */ +#define INT_MIN (-0x7fffffff - 1) /* min value for an int */ + +/* Bad hack for gcc configured to give 64-bit longs. */ +#ifdef _LARGE_LONG +#define ULONG_MAX 0xffffffffffffffffUL +#define LONG_MAX 0x7fffffffffffffffL +#define LONG_MIN (-0x7fffffffffffffffL - 1) +#else +#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */ +#define LONG_MAX 0x7fffffffL /* max value for a long */ +#define LONG_MIN (-0x7fffffffL - 1) /* min value for a long */ +#endif + + /* max value for an unsigned long long */ +#define ULLONG_MAX 0xffffffffffffffffULL +#define LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ +#define LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ + +#if !defined(_ANSI_SOURCE) +#define SSIZE_MAX INT_MAX /* max value for a ssize_t */ + +#if !defined(_POSIX_SOURCE) +#define SIZE_T_MAX UINT_MAX /* max value for a size_t */ + +#define OFF_MAX LLONG_MAX /* max value for an off_t */ +#define OFF_MIN LLONG_MIN /* min value for an off_t */ + +/* Quads and long longs are the same size. Ensure they stay in sync. */ +#define UQUAD_MAX ULLONG_MAX /* max value for a uquad_t */ +#define QUAD_MAX LLONG_MAX /* max value for a quad_t */ +#define QUAD_MIN LLONG_MIN /* min value for a quad_t */ + +#define LONG_BIT 32 + +#endif /* !_POSIX_SOURCE */ +#endif /* !_ANSI_SOURCE */ #endif /* !_MACHINE_LIMITS_H_ */ ==== //depot/projects/mips/sys/mips/include/md_var.h#2 (text+ko) ==== @@ -28,8 +28,6 @@ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ -/* - * Nothing to see here. - */ +void swi_vm(void *); #endif /* !_MACHINE_MD_VAR_H_ */ ==== //depot/projects/mips/sys/mips/include/pmap.h#2 (text+ko) ==== @@ -29,6 +29,9 @@ #ifndef _MACHINE_PMAP_H_ #define _MACHINE_PMAP_H_ +struct md_page { +}; + struct pmap { }; ==== //depot/projects/mips/sys/mips/include/reg.h#2 (text+ko) ==== @@ -29,7 +29,14 @@ #define _MACHINE_REG_H_ /* - * Nothing to see here. + * A structure representing the registers we have. */ +struct reg { + __register_t r_regs[38]; +}; + +struct fpreg { + double r_regs[33]; +}; #endif /* !_MACHINE_REG_H_ */ ==== //depot/projects/mips/sys/mips/include/stdarg.h#2 (text+ko) ==== @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2003 Juli Mallett. All rights reserved. + * Copyright (c) 2002 David E. O'Brien. All rights reserved. + * Copyright (c) 2000 Tsubai Masanari. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -9,27 +10,115 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * + * $NetBSD: stdarg.h,v 1.5 2000/02/27 17:50:21 tsubai Exp $ * $FreeBSD$ */ #ifndef _MACHINE_STDARG_H_ #define _MACHINE_STDARG_H_ -/* - * Nothing to see here. - */ +#include <sys/cdefs.h> +#include <sys/_types.h> + +#ifndef _VA_LIST_DECLARED +#define _VA_LIST_DECLARED +typedef __va_list va_list; +#endif + +#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) + +#define va_start(ap, last) \ + __builtin_stdarg_start((ap), (last)) + +#define va_arg(ap, type) \ + __builtin_va_arg((ap), type) + +#if __ISO_C_VISIBLE >= 1999 +#define va_copy(dest, src) \ + __builtin_va_copy((dest), (src)) +#endif + +#define va_end(ap) \ + __builtin_va_end(ap) + +#else /* ! __GNUC__ post GCC 2.95 */ + +#ifdef __lint__ + +#define va_start(ap, last) ((ap) = *(va_list *)0) +#define va_arg(ap, type) (*(type *)(void *)&(ap)) + +#else + +#if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 95) +#define va_start(ap, last) \ + (__builtin_next_arg(last), \ + __builtin_memcpy((void *)&(ap), __builtin_saveregs (), \ + sizeof(__gnuc_va_list))) +#else +#error Unsupported compiler. +#endif + +#define __INTEGER_TYPE_CLASS 1 +#define __REAL_TYPE_CLASS 8 +#define __RECORD_TYPE_CLASS 12 + +#define __va_longlong(type) \ + (__builtin_classify_type(*(type *)0) == __INTEGER_TYPE_CLASS && \ + sizeof(type) == 8) + +#define __va_double(type) \ + (__builtin_classify_type(*(type *)0) == __REAL_TYPE_CLASS) + +#define __va_struct(type) \ + (__builtin_classify_type(*(type *)0) >= __RECORD_TYPE_CLASS) + +#define __va_size(type) \ + ((sizeof(type) + sizeof(int) - 1) / sizeof(int) * sizeof(int)) + +#if BYTE_ORDER == LITTLE_ENDIAN +#define va_arg(ap, T) \ + (((T *)( \ + (ap) += (/*CONSTCOND*/ __alignof__(T) <= sizeof(int) \ + ? sizeof(int) : ((long)(ap) & 4) + sizeof(T)), \ + (ap) - (/*CONSTCOND*/ __alignof__(T) <= sizeof(int) \ + ? sizeof(int) : sizeof(T)) \ + ))[0]) +#else +#define va_arg(ap, T) \ + (((T *)( \ + (ap) += (/*CONSTCOND*/ __alignof__(T) <= sizeof(int) \ + ? sizeof(int) : ((long)(ap) & 4) + sizeof(T)) \ + ))[-1]) +#endif + +#endif /* __lint__ */ + +#define va_end(ap) + +#if __ISO_C_VISIBLE >= 1999 +#if !defined(_ANSI_SOURCE) && \ + (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \ + defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L) +#define va_copy(dest, src) \ + ((dest) = (src)) +#endif +#endif + +#endif /* __GNUC__ post GCC 2.95 */ -#endif /* !_MACHINE_STDARG_H_ */ +#endif /* _MACHINE_STDARG_H_ */ ==== //depot/projects/mips/sys/mips/include/vmparam.h#3 (text+ko) ==== @@ -104,17 +104,21 @@ */ /* user/kernel map constants */ -#define VM_MIN_ADDRESS ((vaddr_t)0x00000000) -#define VM_MAXUSER_ADDRESS ((vaddr_t)0x80000000) -#define VM_MAX_ADDRESS ((vaddr_t)0x80000000) -#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xC0000000) +#ifndef VM_INITIAL_PAGEIN +#define VM_INITIAL_PAGEIN 16 +#endif +#define VM_MIN_ADDRESS ((vm_offset_t)0x00000000) +#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x80000000) +#define VM_MAX_ADDRESS ((vm_offset_t)0x80000000) +#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xC0000000) #ifdef ENABLE_MIPS_TX3900 -#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xFF000000) +#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFF000000) #else -#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xFFFFC000) +#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFFFFC000) #endif /* virtual sizes (bytes) for various kernel submaps */ +#define VM_KMEM_SIZE (16*1024*1024) /* XXX ??? */ #define VM_PHYS_SIZE (USRIOSIZE*NBPG) /* VM_PHYSSEG_MAX defined by platform-dependent code. */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301252248.h0PMmP7R023142>