2f0002: d0 8f 43 00 movl $0x00000043,r2
2f0006: 00 00 52
You could make this three bytes more compact by using movzbl. (If you
were using characters in the 0x00-0x3f range, you could use a short
literal and it'd be only three bytes either way.)
Not that that's relevant to your problem.
that 20044f23 is your cons_A_TX w/o that leading
blbc 1001(r11),0x20044f32
(don't know what that bis should do, so I left it aside)
I think that is probably handling for "no console present" or some
such. Most of the console interaction checks it in some form.
Examining the memory at 2f0000 is showing this:
[compacted vertically -Mouse]
P 002F0000 01 01 D0 8F 00 00 2F 00
P 002F0008 5E C3 8F 00 00 2F 00 8F
P 002F0010 5C EA 2F 00 50 9E AF E8
P 002F0018 51 D0 8F 00 00 2F 00 53
P 002F0020 28 50 61 63 C3 8F 5C EA
P 002F0028 2F 00 8F F4 10 30 00 52
P 002F0030 2C 00 63 00 52 63 16 AF
P 002F0038 00 D0 8F 41
I don't have any clue where this is coming from.
I think I might. This disassembles as
2f0000: nop
2f0001: nop
2f0002: movl $002f0000,sp
2f0009: subl3 $002f0000,$002fea5c,r0
2f0015: movab 0x2f0000,r1
2f0019: movl $002f0000,r3
2f0020: movc3 r0,(r1),(r3)
2f0024: subl3 $002fea5c,$003010f4,r2
2f0030: movc5 $0,(r3),$0,r2,(r3)
2f0036: jsb 0x2f0039
(plus a few leftover bytes which make up only a partial instruction)
which looks to me like "relocate myself to where I expect to be" code
(plus a bit more; the instructions at 2f0024 and 2f0030 are "clear bss"
code). This is probably coming from something in the NetBSD bootblock
build procedure getting linked before your code. This code will
explode if the bootblock size and location are such that the relocation
code in the as-loaded location overlaps something in the as-expected
location; I hesitate to say that's what's behind the behaviour you're
seeing, though.
> I'd also take a detailed look (I'm talking
"hexdump -C" level of
> detailed here) at the file being MOP-booted to make sure its
> structure is what you think it is.
It is a netbsd ELF File
That is suspicious to me. It's been a while since I played with MOP,
but I think it doesn't want an executable such as a.out or ELF. Later
messages in the thread make me think that's right, but they also make
me think you've already discovered it, so I don't need to elaborate.
/~\ 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