linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* problem when read internal memory
@ 2001-04-11 16:41 Alan Wang
  2001-04-11 17:06 ` Daris A Nevil
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Wang @ 2001-04-11 16:41 UTC (permalink / raw)
  To: Linuxppc-EmbeddedMaillist


Hi, all
  we're porting linux-2.2.13 to our customized board(MPC823e). I modified some head file according
the specification of our board such as memory map. the IMMR is set to 0xff000000. now, the kernel
can be loaded by bootloader(written by ourselves). but inm8xx_cpm_reset() which is called in
setup_arch:
void m8xx_cpm_reset(uint host_page_addr)
{
	volatile immap_t	 *imp;
	volatile cpm8xx_t	*commproc;
	pte_t			*pte;

	imp = (immap_t *)IMAP_ADDR;
	commproc = (cpm8xx_t *)&imp->im_cpm;
 this line generates a machine check exception when write/read to internal memory.

why? any suggestion and comment are welcome. thank you.

A.W.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: problem when read internal memory
@ 2001-04-12  1:39 Alan Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Wang @ 2001-04-12  1:39 UTC (permalink / raw)
  To: linuxppc-embedded


Daris,
  thank you for ur suggestion. yes, i have the loader set the IMMR as 0xff000000 too.
and i don't think the machine check exception is caused by TLB problem. If the tlb
entry mapping internal memory doesn't exist, it's a data tlb missing exception. If the
operation violates the storage protection, i think a tlb error exception should be
generated.
  i found that when access a physical addr that doesn't exist will cause a MC exception.
some other reasons to cause MC are in term of bus error. and more? Thx.

A.W.



-----Original Message-----
From: Daris A Nevil [mailto:dnevil@snmc.com]
Sent: Thursday, April 12, 2001 1:07 AM
To: Alan Wang
Cc: Linuxppc-EmbeddedMaillist
Subject: Re: problem when read internal memory


Alan,

It sounds as though you have already changed the value of IMAP_ADDR in
the header file for your specific board (found in linux/include/asm).
You must also make sure that your processor's boot code sets the IMMR
register to this same value before booting the Linux kernel.  Your boot
code should also setup an MMU entry for the IMMR's address by writing to
the MD_EPN register (MMU Data Effective Page Number Reg) of the PPC.
For an example of how this is done you can refer to the boot code for
the QS850 (MPC850-based board).  The source is located at
ftp://qslinux.org.  Once you uncompress the tarball you can go to
snmc/qslinux/qs850boot and view the file init_qs850.s.  Hope this helps.

Regards,
Daris Nevil
SNMC

** 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:[~2001-04-12  1:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-11 16:41 problem when read internal memory Alan Wang
2001-04-11 17:06 ` Daris A Nevil
2001-04-11 19:15   ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2001-04-12  1:39 Alan Wang

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