summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include/jbus.h
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2010-02-13 14:13:39 +0000
committermarius <marius@FreeBSD.org>2010-02-13 14:13:39 +0000
commita9f745a7804ab5158b27da8d1760caf079f1c6d9 (patch)
tree581d1ee68dfed5794bd44dc27f5340ad4ffbbf69 /sys/sparc64/include/jbus.h
parent43f4e3729a30086f02cf5716ce2a080071669d03 (diff)
downloadFreeBSD-src-a9f745a7804ab5158b27da8d1760caf079f1c6d9.zip
FreeBSD-src-a9f745a7804ab5158b27da8d1760caf079f1c6d9.tar.gz
- Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware
of Sun Fire V1280 doesn't round up the size itself but instead lets claiming of non page-sized amounts of memory fail. - Change parameters and variables related to the TLB slots to unsigned which is more appropriate. - Search the whole OFW device tree instead of only the children of the root nexus device for the BSP as starting with UltraSPARC IV the 'cpu' nodes hang off of from 'cmp' (chip multi-threading processor) or 'core' or combinations thereof. Also in large UltraSPARC III based machines the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which group snooping-coherency domains together instead of directly from the nexus. - Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these are multi-core each CPU has two Fireplane config registers and thus the module/target ID has to be determined differently so the one specific to a certain core is used. Similarly, starting with UltraSPARC IV the individual cores use a different property in the OFW device tree to indicate the CPU/core ID as it no longer is in coincidence with the shared slot/socket ID. While at it additionally distinguish between CPUs with Fireplane and JBus interconnects as these also use slightly different sizes for the JBus/agent/module/target IDs. - Check the return value of init_heap(). This requires moving it after cons_probe() so we can panic when appropriate. This should be fine as the PowerPC OFW loader uses that order for quite some time now.
Diffstat (limited to 'sys/sparc64/include/jbus.h')
-rw-r--r--sys/sparc64/include/jbus.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/sys/sparc64/include/jbus.h b/sys/sparc64/include/jbus.h
new file mode 100644
index 0000000..09c93b4
--- /dev/null
+++ b/sys/sparc64/include/jbus.h
@@ -0,0 +1,39 @@
+/*-
+ * Copyright (c) 2010 Marius Strobl <marius@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 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _MACHINE_JBUS_H_
+#define _MACHINE_JBUS_H_
+
+#define JBUS_CR_JID_SHIFT (17)
+#define JBUS_CR_JID_SIZE (3)
+#define JBUS_CR_JID_MASK \
+ (((1 << JBUS_CR_JID_SIZE) - 1) << JBUS_CR_JID_SHIFT)
+
+#define JBUS_CR_GET_JID(cr) ((cr & JBUS_CR_JID_MASK) >> JBUS_CR_JID_SHIFT)
+
+#endif /* _MACHINE_JBUS_H_ */
OpenPOWER on IntegriCloud