Skip to contentSkip to conversation

exec_kernel help

parisc-linux Ryan Bradetich 3 participants 6 messages Sep 18, 1999 – Sep 19, 1999

lore
Share & tools
lore
#0 lore raw

Hello hackers,

I've been struggling with this for the last couple of days, and I'm stuck. I can build a bootable image, but I can not get it to transfer control to the kernel. (I'm working on a C200+ which is a PA-8200 (PA-RISC 2.0) as Grant pointed out earlier). I know the first targeted build is for the PA 1.1, but I am willing and would like to get the kernel working on the 2.0 also.

Here is the output on the console (I'm typing this in by hand)
---------------------------------------

PARISC/Linux Bootstrap Version 0.6 (non-interactive) By Helge Deller & Jason Eckhardt
Built Fri Sep 17 01:05:03 MDT 1999 by rbrad@vega

Reading parameters...done.

Loading PA-RISC/Linux Kernel...
No ramdisks available.
SOM-Kernel:
aux_header_location: 00000080
som : 00200080
exec_dfile : 0009E000
exec_dsize : 0007C000
exec_dmem : C007D000
exec_tfile : 00031000
exec_tsize : 0006C008
exec_tmem : C0010000
Code at 0x00010000, size=0x0006c008
Data at 0x0007D000, size=0x0007C000
BSS at 0x00F9000

Transfering control to kernel. (At entry point 0x00010000)
-----------------------------------------------------

It hangs there and I have to reboot to continue.
I am booting using rbootd/tftpd if that makes any difference.

Any help/pointers would be appreciated :)

Thanks,
-Ryan

#1 lore raw
Quoted 6 lines

I've been struggling with this for the last couple of days, and I'm stuck. I can build a bootable image, but I can not get it to transfer control to the kernel. (I'm working on a C200+ which is a PA-8200 (PA-RISC 2.0) as Grant pointed out earlier). I know the first targeted build is for the PA 1.1, but I am willing and would like to get the kernel working on the 2.0 also.

It would be really nice to support PA2.0 in narrow mode.

Quoted 1 line

Here is the output on the console (I'm typing this in by hand)

Try to get a serial console set up.

Quoted 4 lines

Transfering control to kernel. (At entry point 0x00010000)
-----------------------------------------------------

It hangs there and I have to reboot to continue.

Can you access PIM and see if it got an HPMC ?

Quoted 1 line

Any help/pointers would be appreciated :)

okay, both head.S and our console (which is still called pdc_* though it really is IODC) rely on pa1.1 firmware. I am not sure this works on PA2.0 systems.

Philipp Rumpf

#2 lore raw
Quoted 1 line · Philipp Rumpf

Ryan Bradetich wrote:

...

Quoted 3 lines
Quoted 1 line

Here is the output on the console (I'm typing this in by hand)

Try to get a serial console set up.

Definitely...reading owners manuals can reveal interesting "tricks". Holding the "TOC" button (for about 10 seconds) on my 715 during powerup will force the console to serial port 1. The user doesn't have to muck with setting paths for collecting linux kernel output. Check if the C200+ has the same behavior - good chance it does.

...

Quoted 5 lines
Quoted 1 line

Any help/pointers would be appreciated :)

okay, both head.S and our console (which is still called pdc_* though it really is IODC) rely on pa1.1 firmware. I am not sure this works on PA2.0 systems.

"Legacy" firmware (includes C200+, A180L, etc) run PDC/IODC in narrow mode. I expect PDC calls to work the same. I think something else is different. As Philipp suggested, check the PIM dump since it's the only info available. Someone is looking at a PA debugger...

grant

Grant Grundler
Communications Infrastructure Computer Operations
+1.408.447.7253

#3 lore raw
Quoted 5 lines · Grant Grundler
Quoted 1 line · Philipp Rumpf

Ryan Bradetich wrote:

...

Quoted 2 lines
Quoted 1 line

Here is the output on the console (I'm typing this in by hand)

Quoted 8 lines
Quoted 1 line

Try to get a serial console set up.

Definitely...reading owners manuals can reveal interesting "tricks". Holding the "TOC" button (for about 10 seconds) on my 715 during powerup will force the console to serial port 1. The user doesn't have to muck with setting paths for collecting linux kernel output. Check if the C200+ has the same behavior - good chance it does.

Found out how to do this in the users manual ... next question. What is everyone using for a serial console? I have the HP A4576A monitor attached to the C200+ right now, this monitor does not have a serial connection. It has
the Enhanced Video Connector and the HD-15 (svga) monitor connections. The
only serial device that I can think of is the web console, and I can get one from work later this afternoon, if that will work.

Quoted 6 lines

...

Quoted 5 lines
Quoted 1 line

Any help/pointers would be appreciated :)

okay, both head.S and our console (which is still called pdc_* though it really is IODC) rely on pa1.1 firmware. I am not sure this works on PA2.0 systems.

Will look in to these ... I've been focusing on init/main.c and arch/parisc/boot/boot_code/ipl_[cs].[cS]

Let my outline my understanding of how the kernel gets loaded, and then will someone please correct me if I'm wrong.

1. The ipl is called by the PDC. Execution starts in
arch/parisc/boot/boot_code/ipl_s.S.
2. The ipl does some stuff then calls IPL_main(). (in
arch/parisc/boot/boot_code/ipl_c.c)
3. IPL_main does some stuff/displays some values then calles exec_kernel.
(in arch/parisc/boot/boot_code/ipl_s.S)
4. exec_kernel changes the program counter to the entry_point then does an
rfi. (entry point is 0x00010000)

This is all the farther I've been able to trace/understand. I was assuming
that the rfi throws us to start_kernel in init/main.c.
Although after glancing at arch/parisc/kernel/head.S it looks like that
assumption might have been invalid.

Quoted 4 lines

"Legacy" firmware (includes C200+, A180L, etc) run PDC/IODC in narrow mode. I expect PDC calls to work the same. I think something else is different. As Philipp suggested, check the PIM dump since it's the only info available.

Nothing in the PIM dump, though that was a great idea.... forgot all about checking the PIM codes (duh...) :)

Quoted 1 line

Someone is looking at a PA debugger...

What do you mean by a PA debugger?

Quoted 6 lines

grant

Grant Grundler
Communications Infrastructure Computer Operations
+1.408.447.7253

#4 lore raw
Quoted 6 lines
Quoted 5 lines

Definitely...reading owners manuals can reveal interesting "tricks". Holding the "TOC" button (for about 10 seconds) on my 715 during powerup will force the console to serial port 1. The user doesn't have to muck with setting paths for collecting linux kernel output. Check if the C200+ has the same behavior - good chance it does.

Quoted 6 lines

Found out how to do this in the users manual ... next question. What is everyone using for a serial console? I have the HP A4576A monitor attached to the C200+ right now, this monitor does not have a serial connection. It has
the Enhanced Video Connector and the HD-15 (svga) monitor connections. The
only serial device that I can think of is the web console, and I can get one from work later this afternoon, if that will work.

I'd propose using a machine known to work, a null modem cable and a terminal program. That way you can copy and paste which is very handy sometimes.

Quoted 8 lines

1. The ipl is called by the PDC. Execution starts in
arch/parisc/boot/boot_code/ipl_s.S.
2. The ipl does some stuff then calls IPL_main(). (in
arch/parisc/boot/boot_code/ipl_c.c)
3. IPL_main does some stuff/displays some values then calles exec_kernel.
(in arch/parisc/boot/boot_code/ipl_s.S)
4. exec_kernel changes the program counter to the entry_point then does an
rfi. (entry point is 0x00010000)

yup.

The entry point is in arch/parisc/kernel/head.S
head.S calls arch/parisc/kernel/setup.c (start_parisc) setup.c does some initialization and calls init/main.c (start_kernel)

#5 lore raw
In reply to Philipp Rumpf
Quoted 7 lines · Philipp Rumpf
Quoted 6 lines

I've been struggling with this for the last couple of days, and I'm stuck. I can build a bootable image, but I can not get it to transfer control to the kernel. (I'm working on a C200+ which is a PA-8200 (PA-RISC 2.0) as Grant pointed out earlier). I know the first targeted build is for the PA 1.1, but I am willing and would like to get the kernel working on the 2.0 also.

Quoted 5 lines

It would be really nice to support PA2.0 in narrow mode.

Quoted 1 line

Here is the output on the console (I'm typing this in by hand)

Try to get a serial console set up.

Finally after several hours I finally figured out how to setup the serial console. (BTW, don't put a null-modem adapter on a null-modem cable, it doesn't work :()

Well the result is still the same ... It hangs after printing the message "Transfering control to kernel. (At entry point 0x00010000). So I'll start diving into head.S and see if I can trace it from there.

Quoted 6 lines
Quoted 5 lines

Transfering control to kernel. (At entry point 0x00010000)
-----------------------------------------------------

It hangs there and I have to reboot to continue.

Quoted 8 lines
Quoted 1 line

Any help/pointers would be appreciated :)

okay, both head.S and our console (which is still called pdc_* though it really is IODC) rely on pa1.1 firmware. I am not sure this works on PA2.0 systems.

Philipp Rumpf

I'll investigate this and see if I can track it down. Thanks for the pointers!

-Ryan