Skip to contentSkip to conversation

openboot question

DISCUSSION Kapil Chowksey 3 participants 3 messages Jul 5, 1998 – Jul 6, 1998

lore
Share & tools
lore
#0 lore raw

I am trying to debug the ultralinux kernel (sparc64 using prom ver 3.0). After doing a dload, I try to disassemble, but it just shows a bunch of illtraps.

ok 4000 dload /tftpboot/vmlinux.aout

ok 404000 dis
<Shows a bunch of illtrap instructions>

ok 404000 map?
<shows PADDR = 404000>

Is the `map?' command using dTLB entries ? How can I see which Physical Addr does the vaddr 404000 map to in the iTLB ?

Also, setting a breakpoint to 404000 has no effect.

I would be grateful if someone can explain how to read the iTLB mappings to specify the correct physical address in the `dis' command.

Signature · 2 lines
Kapil Chowksey                         Viva GNU !
[email protected]
#1 lore raw

Hi Kapil,

Quoted 3 lines

I am trying to debug the ultralinux kernel (sparc64 using prom ver 3.0). After doing a dload, I try to disassemble, but it just shows a bunch of illtraps.

I have seen the same problem. Looks like 'dis' doesn't work until you do a 'go'. So you have to set a breakpoint somewhere first, go, and then dis.

Quoted 1 line

Also, setting a breakpoint to 404000 has no effect.

I have seen this too. Try breakpointing some other locations (Look into head.S, avoid branches and try to find straight line fetch parts). This worked for me in most cases. (I have no idea why -- call Sun's customer support for explanation)

Quoted 2 lines

Is the `map?' command using dTLB entries ? How can I see which Physical Addr does the vaddr 404000 map to in the iTLB ?

I haven't used 'map?' myself, but I believe map? reads the translation table in main memory, not TLBs. If you really need the contents of TLBs, you can use ASI's (spacex@ etc).
But anyway, I think VA:404000 should map to PA:404000.

Thanks,
Eiki

#2 lore raw
In reply to Kapil Chowksey
Quoted 7 lines
Quoted 2 lines

Is the `map?' command using dTLB entries ? How can I see which Physical Addr does the vaddr 404000 map to in the iTLB ?

I haven't used 'map?' myself, but I believe map? reads the translation table in main memory, not TLBs. If you really need the contents of TLBs, you can use ASI's (spacex@ etc).
But anyway, I think VA:404000 should map to PA:404000.

map? reads translations PROM knows about, and as we don't know exactly how to tell PROM about our translations, map? simply does not work after head.S code relocates the kernel and even more after we install our own trap table with VPTE tricks etc.
VA 404000 should probably map to 4000 PA (if you fill your memory banks from 0) or at the lowest physical address + 4000 in your system. The nucleus virtual space looks like this:

0-4M: unmapped
4M-8M: kernel code+data
then modules, below 4G PROM mappings
then DVMA
fffff80000000000-fffffffc00000000 VA=PA+fffff80000000000 fffffffc00000000-ffffffffffffffff nucleus VPTE

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | [email protected] | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take full power of the UltraSparc Linux version 2.1.107 on a sparc64 machine (498.80 BogoMips).
___________________________________________________________________