public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Petter Larsen <pla@morecom.no>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Linux kernel hangs on "while (bdp->cbd_sc & BD_SC_READY);" when booting the kernel with PPCBoot
Date: 21 Mar 2003 23:29:07 +0100	[thread overview]
Message-ID: <1048285747.27276.114.camel@pla> (raw)
In-Reply-To: <3E7870A8.70507@eunet.yu>

Hello

I have a strange error. Se my debug procedure.

I connect to the target with a BDM4DBG debugger and run only the init
section.

I then load the symbols for the kernel and sets a breakpoint at the
function, 
static void my_console_write(int idx, const char *s,
				unsigned count)
in the file arch/ppc/8xx_io/uart.c.

I use a 2.4.20 kernel, patched with preemptive and low latency patch.

I then do a "c" in the debugger for starting up PPCBoot.

I then load the kernel over tftp in PPCBoot and start it with "bootm
400000"

The kernel starts, and stops at my breakpoint.

When I step through the code it comes to a for loop where it shall print
one character at time.

When a step through the line that says "bdp->cbd_sc |= BD_SC_READY;" I
should see the character that lies in the *cp pointer printed out on the
console. 
This does not happen when I boot the kernel with PPCBoot, but it happens
if I include the simple bootloader in the kernel.

E.g. the kernel will print the character on the console if I include the
simple bootloader in the kernel, the code that is under
arc/ppc/boot/simple..., and boot that kernel  with PPCBoot. This is a
bootloader so what I essentially do here is that PPCBoot just starts
another bootloader, which should not be necessary which also Wolfgang
Denx told me some day.

Another thing I also found out is that if I use the kernel that comes
with the eldk2.0.2 distributions from Denx, kernel 2.4.4, it works
without this simple bootloader in the kernel... Strange.

Is it something wrong with the interrupt which should empty the transmit
buffer or something? I am not so good to find out of these things.

I also saw another thing, when I booted the kernel with the simple
bootloader in the kernel, the line in the function my_console_write(..)
that looks like this "bdp->cbd_sc |= BD_SC_READY;" has a value in
"cbd_sc = 8192" before and after the line is executed. This does not
happen when I boot the kernel without the simple bootloader. When I boot
the kernel without the simple bootloader the value turns in to what I
thought it should do, A000. BD_SC_READY is defined to be 0x8000.

8192 =  0x2000 
0x2000 | 0x8000 = 0xA000

Becuase bdb->cbd_sc = 40960 (0xA000) the loop, "while (bdp->cbd_sc &
BD_SC_READY);" just hangs.


Can anybody help me here?
What is really happening when the code "bdp->cbd_sc |= BD_SC_READY;"
execute? 


Best regards
Petter Larsen
Consultant
moreCom as

       reply	other threads:[~2003-03-21 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E18vNM3-0004nu-00@sc8-sf-list2.sourceforge.net>
     [not found] ` <3E7870A8.70507@eunet.yu>
2003-03-21 22:29   ` Petter Larsen [this message]
2003-03-26  2:10     ` [U-Boot-Users] Linux kernel hangs on "while (bdp->cbd_sc & BD_SC_READY);" when booting the kernel with PPCBoot Petter Larsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1048285747.27276.114.camel@pla \
    --to=pla@morecom.no \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox