Re: OpenBSD on the VXT2000
Anders Gavare <[email protected]> Sun, 15 Dec 2002 07:23:48 +0100 (MET)
| Newsgroups | gmane.os.openbsd.vax |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 14 Dec 2002, Hugh Graham wrote:
> What's the rest of the XSID? (The "boardtype" only uses 8 bits of
> this register, but there's often more info there that can be used to
> tell one model from another.)
Here's what I've been able to copy by hand from the machine: (most of
it is probably not usefull...)
I 00000000 FFFFFFFF
I 00000001 FFFFFFFF
I 00000002 FFFFFFFF
I 00000003 FFFFFFFF
I 00000004 00000000
00000005 = ?38 IPR NOT IMPL
00000006 = ?38 IPR NOT IMPL
00000007 = ?38 IPR NOT IMPL
I 00000008 FFFFFFFF
I 00000009 003FFFFF
I 0000000A 007FFFFF
I 0000000B 00000000
I 0000000C 00FFFFFF
I 0000000D 003FFFFF
0000000E = ?38 IPR NOT IMPL
0000000F = ?38 IPR NOT IMPL
I 00000010 00000000
I 00000011 0000A800
I 00000012 0000001F
I 00000013 00000004
00000014 = ?3A IPR NORD
I 00000015 00000000
00000016 = ?38 IPR NOT IMPL
00000017 = ?38 IPR NOT IMPL
I 00000018 00000000
00000019 = ?38 IPR NOT IMPL
...
00000024 = ?38 IPR NOT IMPL
I 00000025 00000010
00000026 = ?38 IPR NOT IMPL
I 00000027 00000000
00000028 = ?38 IPR NOT IMPL
00000029 = ?38 IPR NOT IMPL
I 0000002A 007E4979
I 0000002B 041F0209
0000002C = ?38 IPR NOT IMPL
...
00000037 = ?38 IPR NOT IMPL
I 00000038 00000000
00000039 = ?3A IPR NORD
0000003A = ?3A IPR NORD
0000003B = ?38 IPR NOT IMPL
0000003C = ?38 IPR NOT IMPL
0000003D = ?38 IPR NOT IMPL
I 0000003E 14000006
0000003F = ?3A IPR NORD
00000040 = ?38 IPR NOT IMPL
...
0000007F = ?38 IPR NOT IMPL
00000080 = ?26 ILL ADR
And the XSID / SIE / SIDEX / whatever it is called:
P 20040004 08020002
> I'm interested in patches, certainly. If you're enthusiastic, we should
> probably apply ourselves to finding you a VXT2000+ as well, so you can
> work on them side by side so as to net break any support that exists
> for the other.
This is my first vax ever, so I'm just playing around with it.
Here's a patch to make the MOP boot program work, but it breaks support
for VXT2000+ as I don't know yet how to separate the two.
--- ../../../../../orig_sys/sys/arch/vax/boot/boot/consio.c Fri Aug 9 22:26:45 2002
+++ consio.c Sun Dec 15 06:56:27 2002
@@ -85,6 +85,8 @@
int vxt_getchar(void);
int vxt_testchar(void);
+int vxt2000_getchar(void);
+
void putchar(int);
int getchar(void);
int testkey(void);
@@ -151,6 +153,13 @@
break;
case VAX_BTYP_VXT:
+ put_fp = rom_putchar;
+ get_fp = vxt2000_getchar;
+ test_fp = rom_testchar;
+ rom_putc = 0x20040058; /* 537133144 */
+ rom_getc = 0x20040044; /* 537133124 */
+ break;
+/* Gavare */
put_fp = vxt_putchar;
get_fp = vxt_getchar;
test_fp = vxt_testchar;
@@ -277,6 +286,10 @@
test_fp = ka53_rom_testchar;
}
+
+/*
+ * getchar/putchar/testchar for VXT2000+ (NOT VXT2000)
+ */
static volatile int *vxtregs = (int *)0x200A0000;
#define CH_SR 1
@@ -307,3 +320,20 @@
return 0;
return vxtregs[CH_DAT];
}
+
+/*
+ * getchar for VXT2000. (for putchar, use rom_putchar)
+ */
+int
+vxt2000_getchar(void)
+{
+ volatile int r = 0;
+
+ while (r == 0) {
+ asm("movzbl $0, r1");
+ asm("jsb 0x20040044");
+ asm("movl r1,%0" : "=g" (r));
+ }
+ return r;
+}
+
Trying to use the default rom_getchar doesn't work, as the routine at
20040044 only modifies r1 if a char was available. If no char was
available, nothing is modified at all. Hence the need for a separate
vxt2000_getchar().
Anders