Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/include use <sparc/foo.h> where appropriate...
details: https://anonhg.NetBSD.org/src/rev/218547a021f5
branches: trunk
changeset: 534294:218547a021f5
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Jul 20 11:52:21 2002 +0000
description:
use <sparc/foo.h> where appropriate. now these files become very
very difficult to get out of sync. add bootinfo.h and promlib.h
(using the same method) so that sparc64 headers can build sparc
stand (not yet finished.)
diffstat:
sys/arch/sparc64/include/aout_machdep.h | 61 +----
sys/arch/sparc64/include/asm.h | 176 +-----------
sys/arch/sparc64/include/bootinfo.h | 3 +
sys/arch/sparc64/include/cdefs.h | 9 +-
sys/arch/sparc64/include/cgtworeg.h | 267 +------------------
sys/arch/sparc64/include/disklabel.h | 46 +---
sys/arch/sparc64/include/eeprom.h | 184 +------------
sys/arch/sparc64/include/frame.h | 139 +---------
sys/arch/sparc64/include/idprom.h | 61 +----
sys/arch/sparc64/include/ieee.h | 142 +---------
sys/arch/sparc64/include/ieeefp.h | 25 +-
sys/arch/sparc64/include/instr.h | 452 +------------------------------
sys/arch/sparc64/include/int_const.h | 77 +-----
sys/arch/sparc64/include/int_limits.h | 202 +-------------
sys/arch/sparc64/include/int_mwgwtypes.h | 125 +--------
sys/arch/sparc64/include/int_types.h | 88 +-----
sys/arch/sparc64/include/kbd.h | 99 +------
sys/arch/sparc64/include/kbio.h | 121 +--------
sys/arch/sparc64/include/limits.h | 110 +-------
sys/arch/sparc64/include/lock.h | 121 +--------
sys/arch/sparc64/include/openpromio.h | 62 +----
sys/arch/sparc64/include/profile.h | 87 +-----
sys/arch/sparc64/include/promlib.h | 3 +
sys/arch/sparc64/include/ptrace.h | 54 +---
sys/arch/sparc64/include/reloc.h | 133 +--------
sys/arch/sparc64/include/remote-sl.h | 69 +----
sys/arch/sparc64/include/setjmp.h | 9 +-
sys/arch/sparc64/include/stdarg.h | 146 +---------
sys/arch/sparc64/include/types.h | 97 +------
sys/arch/sparc64/include/varargs.h | 71 +----
sys/arch/sparc64/include/vuid_event.h | 88 +-----
31 files changed, 64 insertions(+), 3263 deletions(-)
diffs (truncated from 3480 to 300 lines):
diff -r 3edcd3cec7dc -r 218547a021f5 sys/arch/sparc64/include/aout_machdep.h
--- a/sys/arch/sparc64/include/aout_machdep.h Sat Jul 20 11:48:17 2002 +0000
+++ b/sys/arch/sparc64/include/aout_machdep.h Sat Jul 20 11:52:21 2002 +0000
@@ -1,60 +1,3 @@
-/* $NetBSD: aout_machdep.h,v 1.1.1.1 1998/06/20 04:58:51 eeh Exp $ */
-
-/*
- * Copyright (c) 1993 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 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 ``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: aout_machdep.h,v 1.2 2002/07/20 11:52:21 mrg Exp $ */
-#ifndef _SPARC_EXEC_H_
-#define _SPARC_EXEC_H_
-
-#define __LDPGSZ 8192 /* linker page size */
-
-enum reloc_type {
- RELOC_8, RELOC_16, RELOC_32,
- RELOC_DISP8, RELOC_DISP16, RELOC_DISP32,
- RELOC_WDISP30, RELOC_WDISP22,
- RELOC_HI22, RELOC_22,
- RELOC_13, RELOC_LO10,
- RELOC_UNUSED1, RELOC_UNUSED2,
- RELOC_BASE10, RELOC_BASE13, RELOC_BASE22,
- RELOC_PC10, RELOC_PC22,
- RELOC_JMP_TBL,
- RELOC_UNUSED3,
- RELOC_GLOB_DAT, RELOC_JMP_SLOT, RELOC_RELATIVE
-};
-
-/* Relocation format. */
-struct relocation_info_sparc {
- int r_address; /* offset in text or data segment */
- unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
- r_extern : 1, /* 1 if need to add symbol to value */
- : 2; /* unused bits */
- enum reloc_type r_type : 5; /* relocation type time copy */
- long r_addend; /* relocation addend */
-};
-#define relocation_info relocation_info_sparc
-
-#endif /* _SPARC_EXEC_H_ */
+#include <sparc/aout_machdep.h>
diff -r 3edcd3cec7dc -r 218547a021f5 sys/arch/sparc64/include/asm.h
--- a/sys/arch/sparc64/include/asm.h Sat Jul 20 11:48:17 2002 +0000
+++ b/sys/arch/sparc64/include/asm.h Sat Jul 20 11:52:21 2002 +0000
@@ -1,175 +1,3 @@
-/* $NetBSD: asm.h,v 1.18 2002/06/24 01:21:38 thorpej Exp $ */
-
-/*
- * Copyright (c) 1994 Allen Briggs
- * All rights reserved.
- *
- * Gleaned from locore.s and sun3 asm.h which had the following copyrights:
- * locore.s:
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1982, 1990 The Regents of the University of California.
- * sun3/include/asm.h:
- * Copyright (c) 1993 Adam Glass
- * Copyright (c) 1990 The Regents of the University of California.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 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 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 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)
- * 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.
- */
-
-#ifndef _ASM_H_
-#define _ASM_H_
-
-#ifndef _LOCORE
-#define _LOCORE
-#endif
-#include <machine/frame.h>
-
-#ifdef __arch64__
-#ifndef __ELF__
-#define __ELF__
-#endif
-#endif
-
-/* Pull in CCFSZ, CC64FSZ, and BIAS from frame.h */
-#ifndef _LOCORE
-#define _LOCORE
-#endif
-#include <machine/frame.h>
-
-#ifdef __ELF__
-#define _C_LABEL(name) name
-#else
-#ifdef __STDC__
-#define _C_LABEL(name) _ ## name
-#else
-#define _C_LABEL(name) _/**/name
-#endif
-#endif
-#define _ASM_LABEL(name) name
+/* $NetBSD: asm.h,v 1.19 2002/07/20 11:52:21 mrg Exp $ */
-#ifdef PIC
-/*
- * PIC_PROLOGUE() is akin to the compiler generated function prologue for
- * PIC code. It leaves the address of the Global Offset Table in DEST,
- * clobbering register TMP in the process.
- *
- * We can use two code sequences. We can read the %pc or use the call
- * instruction that saves the pc in %o7. Call requires the branch unit and
- * IEU1, and clobbers %o7 which needs to be restored. This instruction
- * sequence takes about 4 cycles due to instruction interdependence. Reading
- * the pc takes 4 cycles to dispatch and is always dispatched alone. That
- * sequence takes 7 cycles.
- */
-#define PIC_PROLOGUE(dest,tmp) \
- mov %o7, tmp; \
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4),dest; \
- call 0f; \
- or dest,%lo(_GLOBAL_OFFSET_TABLE_+4),dest; \
-0: \
- add dest,%o7,dest; \
- mov tmp, %o7
-
-/*
- * PICCY_SET() does the equivalent of a `set var, %dest' instruction in
- * a PIC-like way, but without involving the Global Offset Table. This
- * only works for VARs defined in the same file *and* in the text segment.
- */
-#define PICCY_SET(var,dest,tmp) \
- 3: rd %pc, tmp; add tmp,(var-3b),dest
-#else
-#define PIC_PROLOGUE(dest,tmp)
-#define PICCY_OFFSET(var,dest,tmp)
-#endif
-
-#define FTYPE(x) .type x,@function
-#define OTYPE(x) .type x,@object
-
-#define _ENTRY(name) \
- .align 4; .globl name; .proc 1; FTYPE(name); name:
-
-#ifdef GPROF
-/* see _MCOUNT_ENTRY in profile.h */
-#ifdef __ELF__
-#define _PROF_PROLOGUE \
- .data; .align 8; 1: .uaword 0; .uaword 0; \
- .text; save %sp,-CC64FSZ,%sp; sethi %hi(1b),%o0; call _mcount; \
- or %o0,%lo(1b),%o0; restore
-#else
-#define _PROF_PROLOGUE \
- .data; .align 8; 1: .uaword 0; .uaword 0; \
- .text; save %sp,-CC64FSZ,%sp; sethi %hi(1b),%o0; call mcount; \
- or %o0,%lo(1b),%o0; restore
-#endif
-#else
-#define _PROF_PROLOGUE
-#endif
-
-#define ENTRY(name) _ENTRY(_C_LABEL(name)); _PROF_PROLOGUE
-#define ENTRY_NOPROFILE(name) _ENTRY(_C_LABEL(name))
-#define ASENTRY(name) _ENTRY(_ASM_LABEL(name)); _PROF_PROLOGUE
-#define FUNC(name) ASENTRY(name)
-#define RODATA(name) .align 4; .text; .globl _C_LABEL(name); \
- OTYPE(_C_LABEL(name)); _C_LABEL(name):
-
-
-#define ASMSTR .asciz
-
-#define RCSID(name) .asciz name
-
-#ifdef __ELF__
-#define WEAK_ALIAS(alias,sym) \
- .weak alias; \
- alias = sym
-#endif
-
-/*
- * WARN_REFERENCES: create a warning if the specified symbol is referenced.
- */
-#ifdef __ELF__
-#ifdef __STDC__
-#define WARN_REFERENCES(_sym,_msg) \
- .section .gnu.warning. ## _sym ; .ascii _msg ; .text
-#else
-#define WARN_REFERENCES(_sym,_msg) \
- .section .gnu.warning./**/_sym ; .ascii _msg ; .text
-#endif /* __STDC__ */
-#else
-#ifdef __STDC__
-#define __STRING(x) #x
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg ## ,30,0,0,0 ; \
- .stabs __STRING(_ ## sym) ## ,1,0,0,0
-#else
-#define __STRING(x) "x"
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg,30,0,0,0 ; \
- .stabs __STRING(_/**/sym),1,0,0,0
-#endif /* __STDC__ */
-#endif /* __ELF__ */
-
-#endif /* _ASM_H_ */
+#include <sparc/asm.h>
diff -r 3edcd3cec7dc -r 218547a021f5 sys/arch/sparc64/include/bootinfo.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sparc64/include/bootinfo.h Sat Jul 20 11:52:21 2002 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: bootinfo.h,v 1.1 2002/07/20 11:52:21 mrg Exp $ */
+
+#include <sparc/bootinfo.h>
diff -r 3edcd3cec7dc -r 218547a021f5 sys/arch/sparc64/include/cdefs.h
--- a/sys/arch/sparc64/include/cdefs.h Sat Jul 20 11:48:17 2002 +0000
+++ b/sys/arch/sparc64/include/cdefs.h Sat Jul 20 11:52:21 2002 +0000
@@ -1,8 +1,3 @@
-/* $NetBSD: cdefs.h,v 1.3 1999/03/20 01:40:26 thorpej Exp $ */
+/* $NetBSD: cdefs.h,v 1.4 2002/07/20 11:52:21 mrg Exp $ */
-#ifndef _MACHINE_CDEFS_H_
-#define _MACHINE_CDEFS_H_
-
-/* No arch-specific cdefs. */
-
-#endif /* !_MACHINE_CDEFS_H_ */
+#include <sparc/cdefs.h>
diff -r 3edcd3cec7dc -r 218547a021f5 sys/arch/sparc64/include/cgtworeg.h
--- a/sys/arch/sparc64/include/cgtworeg.h Sat Jul 20 11:48:17 2002 +0000
+++ b/sys/arch/sparc64/include/cgtworeg.h Sat Jul 20 11:52:21 2002 +0000
@@ -1,266 +1,3 @@
-/* $NetBSD: cgtworeg.h,v 1.1.1.1 1998/06/20 04:58:51 eeh Exp $ */
-
-/*
- * Copyright (c) 1994 Dennis Ferguson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 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.
- *
- * 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.
- */
-
-/* cgtworeg.h - CG2 colour frame buffer definitions
Home |
Main Index |
Thread Index |
Old Index