summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2007-05-20 13:19:32 +0000
committermarius <marius@FreeBSD.org>2007-05-20 13:19:32 +0000
commitd6c586f25c7d68e7affd51f87d096dd0f337d92c (patch)
tree51b84454d070849cdadd540e0d80f2b82039dae3
parent42e374c608c2270663f61283f5027eb60ea5f2d1 (diff)
downloadFreeBSD-src-d6c586f25c7d68e7affd51f87d096dd0f337d92c.zip
FreeBSD-src-d6c586f25c7d68e7affd51f87d096dd0f337d92c.tar.gz
Given that these sparc64 (as in sun4u) specific headers only exist
in the sun4v source in order to be able to compile the source which is shared between sparc64 and sun4v just #include the sparc64 version here instead of duplicating it. This is based on the approach taken by pc98 headers in order to compile the source shared between i386 and pc98.
-rw-r--r--sys/sun4v/include/upa.h47
-rw-r--r--sys/sun4v/include/ver.h71
2 files changed, 4 insertions, 114 deletions
diff --git a/sys/sun4v/include/upa.h b/sys/sun4v/include/upa.h
index 3e56917..70bf34d 100644
--- a/sys/sun4v/include/upa.h
+++ b/sys/sun4v/include/upa.h
@@ -1,50 +1,7 @@
/*-
- * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
- * 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 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 file is in the public domain.
*
* $FreeBSD$
*/
-#ifndef _MACHINE_UPA_H_
-#define _MACHINE_UPA_H_
-
-#define UPA_MEMSTART 0x1c000000000UL
-#define UPA_MEMEND 0x1ffffffffffUL
-
-#define UPA_CR_MID_SHIFT (17)
-#define UPA_CR_MID_SIZE (5)
-#define UPA_CR_MID_MASK \
- (((1 << UPA_CR_MID_SIZE) - 1) << UPA_CR_MID_SHIFT)
-
-#define UPA_CR_GET_MID(cr) ((cr & UPA_CR_MID_MASK) >> UPA_CR_MID_SHIFT)
-
-#ifdef LOCORE
-
-#define UPA_GET_MID(r1) \
- ldxa [%g0] ASI_UPA_CONFIG_REG, r1 ; \
- srlx r1, UPA_CR_MID_SHIFT, r1 ; \
- and r1, (1 << UPA_CR_MID_SIZE) - 1, r1
-
-#endif
-
-#endif /* _MACHINE_UPA_H_ */
+#include <sparc64/upa.h>
diff --git a/sys/sun4v/include/ver.h b/sys/sun4v/include/ver.h
index fec56ce..d752cc7 100644
--- a/sys/sun4v/include/ver.h
+++ b/sys/sun4v/include/ver.h
@@ -1,74 +1,7 @@
/*-
- * Copyright (c) 2001 Jake Burkholder.
- * 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 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 file is in the public domain.
*
* $FreeBSD$
*/
-#ifndef _MACHINE_VER_H_
-#define _MACHINE_VER_H_
-
-#define VER_MANUF_SHIFT (48)
-#define VER_IMPL_SHIFT (32)
-#define VER_MASK_SHIFT (24)
-#define VER_MAXTL_SHIFT (8)
-#define VER_MAXWIN_SHIFT (0)
-
-#define VER_MANUF_SIZE (16)
-#define VER_IMPL_SIZE (16)
-#define VER_MASK_SIZE (8)
-#define VER_MAXTL_SIZE (8)
-#define VER_MAXWIN_SIZE (5)
-
-#define VER_MANUF_MASK (((1L<<VER_MANUF_SIZE)-1)<<VER_MANUF_SHIFT)
-#define VER_IMPL_MASK (((1L<<VER_IMPL_SIZE)-1)<<VER_IMPL_SHIFT)
-#define VER_MASK_MASK (((1L<<VER_MASK_SIZE)-1)<<VER_MASK_SHIFT)
-#define VER_MAXTL_MASK (((1L<<VER_MAXTL_SIZE)-1)<<VER_MAXTL_SHIFT)
-#define VER_MAXWIN_MASK (((1L<<VER_MAXWIN_SIZE)-1)<<VER_MAXWIN_SHIFT)
-
-#define VER_MANUF(ver) \
- (((ver) & VER_MANUF_MASK) >> VER_MANUF_SHIFT)
-#define VER_IMPL(ver) \
- (((ver) & VER_IMPL_MASK) >> VER_IMPL_SHIFT)
-#define VER_MASK(ver) \
- (((ver) & VER_MASK_MASK) >> VER_MASK_SHIFT)
-#define VER_MAXTL(ver) \
- (((ver) & VER_MAXTL_MASK) >> VER_MAXTL_SHIFT)
-#define VER_MAXWIN(ver) \
- (((ver) & VER_MAXWIN_MASK) >> VER_MAXWIN_SHIFT)
-
-extern int cpu_impl;
-extern char sparc64_model[];
-
-/* Known implementations. */
-#define CPU_IMPL_SPARC64 0x01
-#define CPU_IMPL_ULTRASPARCI 0x10
-#define CPU_IMPL_ULTRASPARCII 0x11
-#define CPU_IMPL_ULTRASPARCIIi 0x12
-#define CPU_IMPL_ULTRASPARCIIe 0x13
-#define CPU_IMPL_ULTRASPARCIII 0x14
-#define CPU_IMPL_ULTRASPARCIIIp 0x15
-#define CPU_IMPL_ULTRASPARCIIIi 0x16
-
-#endif /* !_MACHINE_VER_H_ */
+#include <sparc64/ver.h>
OpenPOWER on IntegriCloud