Index: arch/sparc64/Makefile.inc
===================================================================
--- arch/sparc64/Makefile.inc	(revision 07bd114e358b12ea7dd76453301cc9cee94beb2d)
+++ arch/sparc64/Makefile.inc	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
@@ -48,4 +48,5 @@
 
 ARCH_SOURCES = \
+	arch/$(ARCH)/src/cpu/cpu.c \
 	arch/$(ARCH)/src/asm.S \
 	arch/$(ARCH)/src/console.c \
Index: arch/sparc64/include/asm.h
===================================================================
--- arch/sparc64/include/asm.h	(revision 07bd114e358b12ea7dd76453301cc9cee94beb2d)
+++ arch/sparc64/include/asm.h	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
@@ -86,4 +86,17 @@
 }
 
+/** Read Version Register.
+ *
+ * @return Value of VER register.
+ */
+static inline __u64 ver_read(void)
+{
+	__u64 v;
+	
+	__asm__ volatile ("rdpr %%ver, %0\n" : "=r" (v));
+	
+	return v;
+}
+
 /** Read Trap Base Address register.
  *
Index: arch/sparc64/include/cpu.h
===================================================================
--- arch/sparc64/include/cpu.h	(revision 07bd114e358b12ea7dd76453301cc9cee94beb2d)
+++ arch/sparc64/include/cpu.h	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
@@ -30,7 +30,21 @@
 #define __sparc64_CPU_H__
 
-#include <typedefs.h>
+#include <arch/register.h>
+
+#define MANUF_FUJITSU		0x04
+#define MANUF_ULTRASPARC	0x17	/**< UltraSPARC I, UltraSPARC II */
+#define MANUF_SUN		0x3e
+
+#define IMPL_ULTRASPARCI	0x10
+#define IMPL_ULTRASPARCII	0x11
+#define IMPL_ULTRASPARCII_I	0x12
+#define IMPL_ULTRASPARCII_E	0x13
+#define IMPL_ULTRASPARCIII	0x15
+#define IMPL_ULTRASPARCIV_PLUS	0x19
+
+#define IMPL_SPARC64V		0x5
 
 struct cpu_arch {
+	ver_reg_t ver;
 };
 	
Index: arch/sparc64/include/register.h
===================================================================
--- arch/sparc64/include/register.h	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
+++ arch/sparc64/include/register.h	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2005 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - 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.
+ * - 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.
+ */
+
+#ifndef __sparc64_REGISTER_H__
+#define __sparc64_REGISTER_H__
+
+#include <arch/types.h>
+
+/** Version Register. */
+union ver_reg {
+	__u64 value;
+	struct {
+		__u16 manuf;	/**< Manufacturer code. */
+		__u16 impl;
+		__u8 mask;	/**< Mask set revision. */
+		unsigned : 8;
+		__u8 maxtl;
+		unsigned : 3;
+		unsigned maxwin : 5;
+	} __attribute__ ((packed));
+};
+typedef union ver_reg ver_reg_t;
+
+#endif
Index: arch/sparc64/src/cpu/cpu.c
===================================================================
--- arch/sparc64/src/cpu/cpu.c	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
+++ arch/sparc64/src/cpu/cpu.c	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2005 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - 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.
+ * - 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.
+ */
+
+#include <cpu.h>
+#include <arch.h>
+#include <arch/register.h>
+#include <arch/asm.h>
+#include <print.h>
+
+void cpu_arch_init(void)
+{
+}
+
+void cpu_identify(void)
+{
+	CPU->arch.ver.value = ver_read();
+}
+
+void cpu_print_report(cpu_t *m)
+{
+	char *manuf, *impl;
+
+	switch (CPU->arch.ver.manuf) {
+	    case MANUF_FUJITSU:
+		manuf = "Fujitsu";
+		break;
+	    case MANUF_ULTRASPARC:
+		manuf = "UltraSPARC";
+		break;
+	    case MANUF_SUN:
+	    	manuf = "Sun";
+		break;
+	    default:
+		manuf = "Unknown";
+		break;
+	}
+	
+	switch (CPU->arch.ver.impl) {
+	    case IMPL_ULTRASPARCI:
+		impl = "UltraSPARC I";
+		break;
+	    case IMPL_ULTRASPARCII:
+		impl = "UltraSPARC II";
+		break;
+	    case IMPL_ULTRASPARCII_I:
+		impl = "UltraSPARC IIi";
+		break;
+	    case IMPL_ULTRASPARCII_E:
+		impl = "UltraSPARC IIe";
+		break;
+	    case IMPL_ULTRASPARCIII:
+		impl = "UltraSPARC III";
+		break;
+	    case IMPL_ULTRASPARCIV_PLUS:
+		impl = "UltraSPARC IV+";
+		break;
+	    case IMPL_SPARC64V:
+		impl = "SPARC 64V";
+		break;
+	    default:
+		impl = "Unknown";
+		break;
+	}
+
+	printf("cpu%d: manuf=%s, impl=%s, mask=%d\n", CPU->id, manuf, impl, CPU->arch.ver.mask);
+}
Index: arch/sparc64/src/dummy.s
===================================================================
--- arch/sparc64/src/dummy.s	(revision 07bd114e358b12ea7dd76453301cc9cee94beb2d)
+++ arch/sparc64/src/dummy.s	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
@@ -31,8 +31,5 @@
 .global asm_delay_loop
 .global before_thread_runs_arch
-.global cpu_arch_init
 .global cpu_halt
-.global cpu_identify
-.global cpu_print_report
 .global cpu_sleep
 .global fmath_dpow
@@ -52,8 +49,5 @@
 asm_delay_loop:
 before_thread_runs_arch:
-cpu_arch_init:
 cpu_halt:
-cpu_identify:
-cpu_print_report:
 cpu_sleep:
 fmath_dpow:
Index: generic/src/console/kconsole.c
===================================================================
--- generic/src/console/kconsole.c	(revision 07bd114e358b12ea7dd76453301cc9cee94beb2d)
+++ generic/src/console/kconsole.c	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
@@ -159,5 +159,5 @@
 }
 
-/** Try to find a command begenning with prefix */
+/** Try to find a command beginning with prefix */
 static const char * cmdtab_search_one(const char *name,link_t **startpos)
 {
Index: generic/src/main/main.c
===================================================================
--- generic/src/main/main.c	(revision 07bd114e358b12ea7dd76453301cc9cee94beb2d)
+++ generic/src/main/main.c	(revision 2cf87e50d5dcd3aefbd08693599d8fca4149537d)
@@ -204,5 +204,5 @@
 
 	calibrate_delay_loop();
-	
+
 	timeout_init();
 	scheduler_init();
