linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* MPC8240 PTE setup
@ 2002-04-22 18:07 Robert Morin
  2002-04-22 19:49 ` Dan Malek
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Morin @ 2002-04-22 18:07 UTC (permalink / raw)
  To: linuxppc-embedded


Hi everyone,

I am new to embedded Linux but I have more than 10 years experience
in embedded systems on many different processors and real-time
O/Ses.

I have based my work on the Linux kernel 2.5.8 and the ZX4500 platform
(plus my modification). My goal is to move from pSOS to Linux and for the
moment I am using the pSOS bootloader (PPCBOOT on its way) to load
the linux kernel.

I have a problem with the MMU (MPC8240+CPLD+serial
port+DiskOnChip on PortX). The boot process is looping in
openpic_safe_writefield() and I can see with my BDI2000 that the
MMU is not translating correctly virtual addresses to physical
addresses. I made a patch to use a BAT instead of PTE but
this cause only to move the problem further upstream
(unable to run /busybox correctly).

I have check the parameter passed with ioremap() and it's
ok. With the BDI2000, I get this with the phys command:

	phys 0xfdfd0000          (virtual address returned by ioremap)

	PHYS = 0xfffff000	END = 0xffffffff
instead of
	PHYS 0xfdf40000 END = 0xfdffffff


Here is a screenshot (this is a pSOS boot sequence):


Standard output device initialized...
System clock initialized...
SYSTEM START @ 09:52:18  22/04/2002  (usec tick)
DiskOnChip has a capacity of 32 MB
Initializing User Accounts, this may take a while...
Initializing FTP Server Daemon...
15.0/mxz/index :  200b - prepc error value
No startup table - cannot initialize revision control.
Cannot open system files -- trying TFTP instead.
Remote file: zImage.img, IP: 10.64.21.18
TFTP download completed.
Transfering control to the downloaded code.

(here it is)

loaded at:     00100000 001B0BCC
relocated to:  00800000 008B0BCC
zimage at:     00805980 0088DBE4
initrd at:     0088E000 008A69BF
avail ram:     00400000 00800000

Linux/PPC load: console=ttyS0,19200 root=/dev/ram0 init=/busybox lash
Uncompressing Linux...done.
Now booting the kernel

Robert Morin
Firmware engineer
Miranda Media Network
St-Laurent, Qc
Canada


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

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

* Re: MPC8240 PTE setup
  2002-04-22 19:49 ` Dan Malek
@ 2002-04-22 19:08   ` Robert Morin
  2002-04-23 15:20     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Morin @ 2002-04-22 19:08 UTC (permalink / raw)
  To: Dan Malek; +Cc: linuxppc-embedded


Hi Dan,

> > I have based my work on the Linux kernel 2.5.8 ....
>
> You don't want to use that yet :-)  Use the 2_4_devel kernel.
>

Ok, I will look to it.

> > ....I can see with my BDI2000 that the
> > MMU is not translating correctly virtual addresses to physical
> > addresses.
>
> The mmu always translates correctly, your programming of it
> is probably incorrect :-)
>

This is my problem and I think it's related to the pSOS bootloader
but I have difficulties pointing to the problem.

> > .... I made a patch to use a BAT instead of PTE but
> > this cause only to move the problem further upstream
>
> What BAT did you change, and to what?
>

In my file mxhost2_setup.c in function mxhost2_map_io(), I've
added:

    io_block_mapping(0xfdf00000, 0xfdf00000, 0x00100000, _PAGE_IO );

as a work-around and modify also my find_bridge() to prevent using the
ioremap_base.


> > I have check the parameter passed with ioremap() and it's
> > ok. With the BDI2000, I get this with the phys command:
> >
> > 	phys 0xfdfd0000          (virtual address returned by ioremap)
> >
> > 	PHYS = 0xfffff000	END = 0xffffffff
> > instead of
> > 	PHYS 0xfdf40000 END = 0xfdffffff
>
> So, you did 'virt = ioremap(0xfdf40000)' and virt == 0xfdfd0000?
> Where did you call ioremap()?  Are you trying to remap the EUMB registers
> again (this is done in mpc10x_common.c for 82xx boards)?
>

I made my trace inside the mpc10x_common.c to have this result. I am
not making changes in the kernel, I want to keep as is as much as
possible.

For the moment, I will move my platform into 2_4_devel to see if
the situation improved.

>
> 	-- Dan

Thanks.

Robert

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

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

* Re: MPC8240 PTE setup
  2002-04-22 18:07 MPC8240 PTE setup Robert Morin
@ 2002-04-22 19:49 ` Dan Malek
  2002-04-22 19:08   ` Robert Morin
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Malek @ 2002-04-22 19:49 UTC (permalink / raw)
  To: rmorin; +Cc: linuxppc-embedded


Robert Morin wrote:


> I have based my work on the Linux kernel 2.5.8 ....

You don't want to use that yet :-)  Use the 2_4_devel kernel.

> ....I can see with my BDI2000 that the
> MMU is not translating correctly virtual addresses to physical
> addresses.

The mmu always translates correctly, your programming of it
is probably incorrect :-)


> .... I made a patch to use a BAT instead of PTE but
> this cause only to move the problem further upstream

What BAT did you change, and to what?


> I have check the parameter passed with ioremap() and it's
> ok. With the BDI2000, I get this with the phys command:
>
> 	phys 0xfdfd0000          (virtual address returned by ioremap)
>
> 	PHYS = 0xfffff000	END = 0xffffffff
> instead of
> 	PHYS 0xfdf40000 END = 0xfdffffff

So, you did 'virt = ioremap(0xfdf40000)' and virt == 0xfdfd0000?
Where did you call ioremap()?  Are you trying to remap the EUMB registers
again (this is done in mpc10x_common.c for 82xx boards)?


	-- Dan


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

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

* Re: MPC8240 PTE setup
  2002-04-22 19:08   ` Robert Morin
@ 2002-04-23 15:20     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2002-04-23 15:20 UTC (permalink / raw)
  To: Robert Morin; +Cc: Dan Malek, linuxppc-embedded


On Mon, Apr 22, 2002 at 03:08:10PM -0400, Robert Morin wrote:
>
> Hi Dan,
>
> > > I have based my work on the Linux kernel 2.5.8 ....
> >
> > You don't want to use that yet :-)  Use the 2_4_devel kernel.
>
> Ok, I will look to it.

Also, the zx4500 port (and the sandpoint one which it is based upon)
relied on an old hack to get the EPIC going which was to overload
OpenPIC_NumInitSenses like so:
static void __init
zx4500_init_IRQ(void)
{
	OpenPIC_InitSenses = zx4500_openpic_initsenses;
	OpenPIC_NumInitSenses = sizeof(zx4500_openpic_initsenses);
	openpic_init(1, 0, NULL, -1);

These need to be replaced with calls to openpic_set_sources(int first,
int total, void *first_ISU);

I'm in the middle of making this switch for the LoPEC boards as an
example for how the rest need to look, but if you get yours working
please post what you did. (what I've tried, and what Matt Porter and I
_think_ is right isn't working, and I'm looking into that now).

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

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

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

end of thread, other threads:[~2002-04-23 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-22 18:07 MPC8240 PTE setup Robert Morin
2002-04-22 19:49 ` Dan Malek
2002-04-22 19:08   ` Robert Morin
2002-04-23 15:20     ` Tom Rini

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).