linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* MBX hang (tlbia)
@ 2000-06-09 10:09 Jamie Guinan
  2000-06-13 17:13 ` Jamie Guinan
  0 siblings, 1 reply; 3+ messages in thread
From: Jamie Guinan @ 2000-06-09 10:09 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,

I've been playing with the mpc8xx-2.2.13.tgz kernel on a MBX/821
board.

To help learn about PowerPC innards, and with an eye towards making
a self-bootable system, I've been trying to get the board to boot
without help from EPPCBug.  I borrowed some init code from eCos
(I think Murray did something similar), wrote a small elf loader,
and packed the whole thing up (loader+zImage.initrd) into flash
memory to boot.

Its actually coming along Ok, I get as far as,

  loaded at:     00210000 0021B1D8
  relocated to:  00100000 0010B1D8
  board data at: 003F4558 003F4580
  relocated to:  00200100 00200128
  zimage at:     00216000 00271893
  initrd at:     00271893 00273E7D
  avail ram:     00274000 00400000

  Linux/PPC load:
  Uncompressing Linux...done.
  Now booting the kernel

but it hangs in arch/ppc/kernel/head.S at

	tlbia			/* Invalidate all TLB entries */

(I narrowed this down by essentially doing a binary search
 inserting a macro to set the LEDs on the MBX; insert it
 before the tlbia and the LED glows - after, it does not;
 the LED is on a control register at 0xFA100001 btw.)

Now, I realize that the eCos initializations must be a little
different from those done by EPPCBug, because it works when
I load with EPPCBug.  But if anyone knows why this particular
instruction would hang, I'd appreciate a clue.

Thanks,
-Jamie

p.s.  I read that MBX is an end-of-life product.  I preferred
it over the FADS for its simplicity, so I'm looking for something
similar (price, size, features, documentation).  Recommendations
are welcome.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MBX hang (tlbia)
  2000-06-09 10:09 MBX hang (tlbia) Jamie Guinan
@ 2000-06-13 17:13 ` Jamie Guinan
  2000-06-13 23:53   ` Dan Malek
  0 siblings, 1 reply; 3+ messages in thread
From: Jamie Guinan @ 2000-06-13 17:13 UTC (permalink / raw)
  To: linuxppc-embedded


On Fri, 9 Jun 2000, Jamie Guinan wrote:
>
> Hi,
>
> I've been playing with the mpc8xx-2.2.13.tgz kernel on a MBX/821
> board.
>
> ... I've been trying to get the board to boot
> without help from EPPCBug.  I borrowed some init code from eCos...
> ... but it hangs in arch/ppc/kernel/head.S at
>
> 	tlbia			/* Invalidate all TLB entries */

Just for future reference in the list archives, I got my bootloader
to work.  It turns out that eCos uses the MMU to map cacheable and
non-cacheable regions.  They have a function hal_map_memory()
which seems roughly analogous to ioremap().  Anyway, by simply
commenting out the parts of their 8xx init stuff which sets up
the MMU and TLBs, I can boot Linux and the tlbia falls through
without a hitch, and I get my shell prompt a few seconds later.
Joy...

-Jamie


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MBX hang (tlbia)
  2000-06-13 17:13 ` Jamie Guinan
@ 2000-06-13 23:53   ` Dan Malek
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Malek @ 2000-06-13 23:53 UTC (permalink / raw)
  To: guinan; +Cc: linuxppc-embedded


Jamie Guinan wrote:

> ..... Anyway, by simply
> commenting out the parts of their 8xx init stuff which sets up
> the MMU and TLBs,

You need to enter Linux with MMUs disabled.  I think this is true
of all architectures.  The tlbia is needed to invalidate everything
because a few lines later Linux sets up its own virtual environment.

Running with caches enabled is OK, because anything Linux ensures
cache coherency among the operations it performs during boot.  You
can't arbitrarily disable the MMU, because you need some knowledge of
the physical environment you came from so you know what will happen
when the MMU is disabled.

Good job.  Have fun!


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-06-13 23:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-06-09 10:09 MBX hang (tlbia) Jamie Guinan
2000-06-13 17:13 ` Jamie Guinan
2000-06-13 23:53   ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).