[LV] The kernel build process & tools any changes .
Mr. James W. Laferriere
babydr at baby-dragons.com
Sun Mar 18 20:27:20 CET 2007
Hello Jan-Benedict ,
On Sun, 18 Mar 2007 09:50:39 +0100 Jan-Benedict , Glaw <jbglaw at lug-owl.de> Wrote:
> On Sun, 2007-03-18 00:34:33 -0700, Mr. James W. Laferriere <babydr at baby-dragons.com> wrote:
> > Well more on this portion .
> > I've found the SID & (what I think is the )SIE on my ka670 system .
>
> SID (System ID) is a CPU thing and read out of a CPU register (Nr. 62
> or 0x3E in hex). This basically tells you something about the physical
> CPU implementation.
Got this from the 'KA670 CPU Module Technical Manual' . See below .
> > The SIE is defined in Register 20040004 , so doing a Examine on that
> > memory point should give me the SIE .
>
> SIE is the Extended System ID "register". It's a longword quite at the
> start of the system ROM. It tells you something about the surrounding
> machine. Thus, it's a different value.
And the value of '20040004' from the same manual . Available at ...
http://vt100.net/mirror/mds-199909/cd1/vax/ka670tm1.pdf
Section 3.1.7 (phys. page 69) .
> > OK , I have put them in include/asm-vax/vaxcpu.h , Does this look
> > correct ?
> > #define VAX_CPU_670 0x0B000006 /* VAXserver 4000-500 (KA670-A) */
> >
> > That would make the ka670 (REX520 chip) a RIGEL based vax . At least
> > I think the Chip series table is Decimal . Otherwise the VAX_SOC at 20 doesn't
> > match its SID of 0x14000006 .
> >
> > Are my assumptions correct ? Heck even close ?
> > Rsvp , JimL
> >
> > Exmaine the SIE Register .
> > >>>E 20040004
> >
> > P 20040004 01370401
> >
> >
> > Dump the CPU Registers . That s/b the SID .................+
> > >>>t 9c vvv
> > SBR=07FB8000 SLR=00002021 SAVPC=80000011 SAVPSL=80404174 SCBB=20052A00
> > P0BR=80000000 P0LR=00100A80 P1BR=00800000 P1LR=00600000 SID=0B000006 <<<
>
> The MSB of the SID tells you something about the CPU. 0x0B = 11 tells
> you that it's a Riegel CPU (if our vaxcpu.h is correct:-)
My same query .
> The next step would be to wire up another CPU file in
> ./arch/vax/kernel. cpu_ka660.c is probably a good start. That file
> will need a reference in arch/vax/Kconfig, as well as
> arch/vax/kernel/Makefile.
Been there done that by that time . We've done this (sort of) with the
ka660 which You & I worked on before (iirc) . 2005-* - 2006-01 time frame .
> The final step is to place a is_ka670() macro in include/asm-vax/mv.h
> and an external definition for your new mv_ka670 (defined in
> cpu_ka680.c).
Ok , Got that done .
> This mv_ka670 contains some pointers to initialize parts of the
> hardware. Don't forget the special magic struct cpu_match! That's the
Ok , Done .
> point where your CPU/chassis is actually detected. It contains the SID
> and Extended SID (what the VAX Architecture Reference Manual refers to
> as SYS_TYPE, NetBSD as SIE and we as SIDEX) as well as bitmasks which
> describe which SID/SIDEX bits to match against which values. If this
> matches, the supplied struct mv is choosen to be correct for this very
> machine.
Ok , Patch attached to the best of my ability .
Please comment on the patch .
But I am going to try & build this and we'll see what happens .
Tia , JimL
--
+-----------------------------------------------------------------+
| James W. Laferriere | System Techniques | Give me VMS |
| Network Engineer | 663 Beaumont Blvd | Give me Linux |
| babydr at baby-dragons.com | Pacifica, CA. 94044 | only on AXP |
+-----------------------------------------------------------------+
-------------- next part --------------
diff -ruN vax-linux-kernel-200703172115-orig/Documentation/vax/cpu.txt vax-linux-kernel/Documentation/vax/cpu.txt
--- vax-linux-kernel-200703172115-orig/Documentation/vax/cpu.txt 2007-03-17 20:58:16.000000000 -0700
+++ vax-linux-kernel/Documentation/vax/cpu.txt 2007-03-17 23:28:07.000000000 -0700
@@ -29,6 +29,8 @@
KA410
KA630
KA650
+ KA660
+ KA670 < in progress >
UNSUPPORTED CPUS
================
@@ -40,7 +42,6 @@
KA620
KA640
KA655
- KA660
KA730
KA750
KA780
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/Kconfig vax-linux-kernel/arch/vax/Kconfig
--- vax-linux-kernel-200703172115-orig/arch/vax/Kconfig 2007-03-17 20:58:34.000000000 -0700
+++ vax-linux-kernel/arch/vax/Kconfig 2007-03-17 23:25:32.000000000 -0700
@@ -92,6 +92,10 @@
bool "Support for KA660"
default n
+config CPU_KA670
+ bool "Support for KA670"
+ default n
+
config CPU_KA410
bool "Support for KA410"
default n
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/defconfig vax-linux-kernel/arch/vax/defconfig
--- vax-linux-kernel-200703172115-orig/arch/vax/defconfig 2007-03-17 20:58:34.000000000 -0700
+++ vax-linux-kernel/arch/vax/defconfig 2007-03-17 23:33:58.000000000 -0700
@@ -24,6 +24,7 @@
# CONFIG_CPU_KA640 is not set
CONFIG_CPU_KA650=y
# CONFIG_CPU_KA660 is not set
+# CONFIG_CPU_KA670 is not set
# CONFIG_CPU_KA410 is not set
CONFIG_CPU_KA42=y
CONFIG_CPU_KA43=y
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/kernel/Makefile vax-linux-kernel/arch/vax/kernel/Makefile
--- vax-linux-kernel-200703172115-orig/arch/vax/kernel/Makefile 2007-03-17 20:58:34.000000000 -0700
+++ vax-linux-kernel/arch/vax/kernel/Makefile 2007-03-17 23:00:23.000000000 -0700
@@ -26,6 +26,7 @@
obj-$(CONFIG_CPU_KA640) += cpu_ka640.o
obj-$(CONFIG_CPU_KA650) += cpu_ka650.o
obj-$(CONFIG_CPU_KA660) += cpu_ka660.o
+obj-$(CONFIG_CPU_KA670) += cpu_ka670.o
obj-$(CONFIG_CPU_VXT) += cpu_vxt.o
obj-$(CONFIG_MODULES) += module.o
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/kernel/cpu_ka670.c vax-linux-kernel/arch/vax/kernel/cpu_ka670.c
--- vax-linux-kernel-200703172115-orig/arch/vax/kernel/cpu_ka670.c 1969-12-31 16:00:00.000000000 -0800
+++ vax-linux-kernel/arch/vax/kernel/cpu_ka670.c 2007-03-17 23:11:08.000000000 -0700
@@ -0,0 +1,73 @@
+/*
+ * This file contains machine vector handlers for the
+ * KA670 CPU in the VAXserver 4000-500 machines.
+ *
+ * KA670-A V3.7, VMB 2.12 , JimL
+ *
+ * For the VAXserver machines I have, the SID is 14000006 and
+ * the sidex is 01370502. The sidex seems to have a simlar
+ * breakdown that a CVAX with a Q22 bus has. Bootstrap indicates
+ * a firmware rev 3.7 supporting this assumption. If anyone knows
+ * differently, let me know.
+ *
+ * modified from the cpu_ka660.c by Jan-Benedict Glaw jbglaw at lug-owl.de
+ * by: James W. Laferriere <babydr at baby-dragons.com> 20070317
+ */
+
+#include <linux/types.h> /* For NULL */
+#include <linux/kernel.h> /* For printk */
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <asm/mtpr.h>
+#include <asm/mv.h>
+#include <asm/vaxcpu.h>
+#include <asm/clock.h> /* For clock_init routines */
+
+static const char *ka670_cpu_type_str(void)
+{
+ return "KA670";
+}
+
+struct vax_mv mv_ka670 = {
+ .pre_vm_putchar = mtpr_putchar,
+ .pre_vm_getchar = mtpr_getchar,
+ .post_vm_putchar = mtpr_putchar,
+ .post_vm_getchar = mtpr_getchar,
+ .cpu_type_str = ka670_cpu_type_str,
+ .clock_init = generic_clock_init,
+};
+
+static struct cpu_match __CPU_MATCH cpumatch_ka670 = {
+ .mv = &mv_ka670,
+ .sid_mask = VAX_SID_FAMILY_MASK,
+ .sid_match = VAX_SOC << VAX_SID_FAMILY_SHIFT,
+
+ .sidex_addr = SOC_SIDEX_ADDR,
+
+ .sidex_mask = SOC_SIDEX_TYPE_MASK | SOC_Q22_SUBTYPE_MASK,
+ .sidex_match = (SOC_SIDEX_TYPE_Q22 << SOC_SIDEX_TYPE_SHIFT) |
+ (SOC_Q22_SUBTYPE_KA670 << SOC_Q22_SUBTYPE_SHIFT),
+};
+
+static struct platform_device ka670_cqbic_device = {
+ .name = "cqbic"
+};
+
+static struct platform_device ka670_iprcons_device = {
+ .name = "iprcons"
+};
+
+static int __init ka670_platform_device_init(void)
+{
+ if (!is_ka670())
+ return -ENODEV;
+
+ platform_device_register(&ka670_cqbic_device);
+ platform_device_register(&ka670_iprcons_device);
+
+ return 0;
+}
+
+arch_initcall(ka670_platform_device_init);
+
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/kernel/diag_led.c vax-linux-kernel/arch/vax/kernel/diag_led.c
--- vax-linux-kernel-200703172115-orig/arch/vax/kernel/diag_led.c 2007-03-17 20:58:34.000000000 -0700
+++ vax-linux-kernel/arch/vax/kernel/diag_led.c 2007-03-17 23:32:39.000000000 -0700
@@ -59,11 +59,11 @@
} else if (is_ka650 ()) {
inverted = 1;
return DIAG_LED_KA650_BASE;
-#if 0
+/* #if 0 */
} else if (is_ka670 ()) {
inverted = 1;
return DIAG_LED_KA670_BASE;
-#endif
+/* #endif */
} else if (is_ka43 ()) {
inverted = 1;
return DIAG_LED_KA43_BASE;
diff -ruN vax-linux-kernel-200703172115-orig/drivers/vax/net/sgec.c vax-linux-kernel/drivers/vax/net/sgec.c
--- vax-linux-kernel-200703172115-orig/drivers/vax/net/sgec.c 2007-03-17 20:59:12.000000000 -0700
+++ vax-linux-kernel/drivers/vax/net/sgec.c 2007-03-17 23:30:46.000000000 -0700
@@ -929,11 +929,12 @@
*/
printk("Ethernet address in ROM: ");
for (i = 0; i < 6; i++) {
-#if 0 /* Not yet */
+/* #if 0 */
+/* Not yet */
if (is_ka670 ())
dev->dev_addr[i] = (esar[i] & 0xff00) >> 8;
else
-#endif
+/* #endif */
dev->dev_addr[i] = esar[i] & 0xff;
printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
}
diff -ruN vax-linux-kernel-200703172115-orig/drivers/vax/serial/ipr.c vax-linux-kernel/drivers/vax/serial/ipr.c
--- vax-linux-kernel-200703172115-orig/drivers/vax/serial/ipr.c 2007-03-17 20:59:12.000000000 -0700
+++ vax-linux-kernel/drivers/vax/serial/ipr.c 2007-03-17 23:56:47.000000000 -0700
@@ -234,9 +234,10 @@
{
/* This port is not software configurable. It is fixed in
hardware to 9600, 8 bits, no parity, one stop bit.
- (Actually - not completely true. The KA650 console has a
- physical rotary switch for selecting the baud rate. But
- we'll ignore this for now. */
+ (Actually - not completely true.
+ The KA630 KA640 KA650 KA660 KA670 console(s) have a
+ physical rotary switch for selecting the baud rate.
+ But we'll ignore this for now.) */
unsigned long flags;
diff -ruN vax-linux-kernel-200703172115-orig/include/asm-vax/mv.h vax-linux-kernel/include/asm-vax/mv.h
--- vax-linux-kernel-200703172115-orig/include/asm-vax/mv.h 2007-03-17 20:59:38.000000000 -0700
+++ vax-linux-kernel/include/asm-vax/mv.h 2007-03-17 23:58:37.000000000 -0700
@@ -71,6 +71,7 @@
extern struct vax_mv mv_ka640;
extern struct vax_mv mv_ka650;
extern struct vax_mv mv_ka660;
+extern struct vax_mv mv_ka670;
extern struct vax_mv mv_vxt;
/*
@@ -196,6 +197,14 @@
#endif
}
+static inline int is_ka670(void) {
+#ifdef CONFIG_CPU_KA670
+ return mv == &mv_ka670;
+#else
+ return 0;
+#endif
+}
+
static inline int is_vxt(void) {
#ifdef CONFIG_CPU_VXT
return mv == &mv_vxt;
diff -ruN vax-linux-kernel-200703172115-orig/include/asm-vax/vaxcpu.h vax-linux-kernel/include/asm-vax/vaxcpu.h
--- vax-linux-kernel-200703172115-orig/include/asm-vax/vaxcpu.h 2007-03-17 20:59:38.000000000 -0700
+++ vax-linux-kernel/include/asm-vax/vaxcpu.h 2007-03-18 11:50:54.000000000 -0700
@@ -48,6 +48,10 @@
/* SOC */
#define VAX_CPU_660 0x14000006 /* VAXserver 4000-200 (KA660-B) */
+
+/* REX */
+#define VAX_CPU_670 0x0B000006 /* VAXserver 4000-500 (KA670-A) */
+
#define VAX_CPU_VXT 0x14000006 /* VXT2000 - from NetBSD */
/*****************************************************************************/
-------------- next part --------------
_______________________________________________
Linux-Vax mailing list
Linux-Vax at pergamentum.com
http://www.pergamentum.com/mailman/listinfo/linux-vax
More information about the Vax-linux
mailing list