Mouse wrote:
I'm
currently annotating every mfpr/mtpr instruction, or at least
those with constant register number operands, as to which register
it's referring to; once that's done I'll search out all the 201000xx
references and annotate them. I'll make the disassembler save file
and the resulting text version available....
Okay, ftp.rodents-montreal.org:/mouse/misc/rtvax300/ contains
rtvax300.bin
The binary file Holm made available.
rtvax300.dis
The disassembler save file (based at 0x20040000)
rtvax300.txt
The text-form disassembly corresponding to the .dis file.
I believe I've found the console routines. I've defined symbols for
them - search for cons_ in the .txt to find them and their uses. The
code you're looking for is probably the stuff in [20044ebf..20044f66),
or [20044ebf..2004504d) if you're also interested in the code for using
the other half of the chip too.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Hmm... I've got the files and tried to build a netbsd-boot thats
saying something..but no luck jet..
I don't understand what's going wrong here, since it seems that the code in
boot.c isn't reached at all, every time I'm trying to boot from eza0 I get
this:
>> b eza0
83 BOOT SYS
-EZA0
2..1..0..
?06 HLT INST
PC = 00001801
>>
>> e/l/n:16 r0
G 00000000 20042F75
G 00000001 00FFEA00
G 00000002 00001000
G 00000003 00FFBA00
G 00000004 00000000
G 00000005 00000000
G 00000006 FFFFFFFF
G 00000007 FFFFFFFF
G 00000008 00000800
G 00000009 00001800
G 0000000A 00001800
G 0000000B 00000000
G 0000000C 00000200
G 0000000D FFFFFFFF
G 0000000E 00001800
G 0000000F 00001801
?26 ILL ADR
>>
The Startup code in boot/common/srt0.S looks like this:
#include "../include/asm.h"
/*
* Auto-moving startup code for standalone programs. Can be loaded
* (almost) anywhere in memory but moves itself to the position
* it is linked for. Must be started at first position, recommended
* is phys addr 0 (boot loads programs at 0, but starts them at the
* position set in a.out header.
*/
.globl nisse # pass -e nisse to ld gives OK start addr
.set nisse,0
ALTENTRY(start)
nop;nop;
movl $_C_LABEL(start), %sp # Probably safe place for stack
pushr $0x1fff # save for later usage
subl3 $_C_LABEL(start), $_C_LABEL(edata), %r0
movab _C_LABEL(start), %r1 # get where we are
movl $_C_LABEL(start), %r3 # get where we want to be
cmpl %r1,%r3 # are we where we want to be?
beql relocated # already relocated, skip copy
movc3 %r0,(%r1),(%r3) # copy
subl3 $_C_LABEL(edata), $_C_LABEL(end), %r2
movc5 $0,(%r3),$0,%r2,(%r3) # Zero bss
movpsl -(%sp)
pushl $relocated
rei
relocated: # now relocation is done !!!
movl %sp,_C_LABEL(bootregs) # *bootregs
calls $0, _C_LABEL(Xmain) # Were here!
halt # no return
So is should call Xmain after the relocation is done.
I hacked a little in boot.c:
void
Xmain(void)
{
int io;
int j, nu;
unsigned char * ucp;
u_long marks[MARK_MAX];
extern const char bootprog_rev[];
ucp=(unsigned char *)0x201ffffe; //LED Register
io = 0;
skip = 1;
*ucp=0;
l1:
goto l1;
autoconf();
..it should loop before doing something (besides of displaying an "F" in
the LED Display (~0), but every time it halts on 1800..
I'm trying to compile this with the older netbsd (5.2?)
Regards,
Holm
--
Technik Service u. Handel Tiffe,
www.tsht.de, Holm Tiffe,
Freiberger Stra?e 42, 09600 Obersch?na, USt-Id: DE253710583
www.tsht.de, info at tsht.de, Fax +49 3731 74200, Mobil: 0172 8790 741