LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* About MMU setting in MPC8245
@ 2006-01-11 10:26 happa
  2006-01-11 16:07 ` Mark A. Greer
  0 siblings, 1 reply; 3+ messages in thread
From: happa @ 2006-01-11 10:26 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

Hi,
Sorry, I have very basic question about PPC MMU setting.

In "http://www.denx.de/wiki/PPCEmbedded/Kernel#BOOTLOADER",
chapter 10.2. Memory Map, I get the following information.
 
"The bootloader is responsible for configuring the memory map before jumping to the Linux kernel."

Is anyone know what memory map should be done in bootloader? 
If I'm using ICE to load linux kernel, what kind of CPU registers need be configured first?
Is IBAT/DBAT and Segment register need be set?

I have set the following registers before loading kernel via ICE.
Did I miss something else?
(The target CPU is MPC8245)
offset   register 
-------  -----------------------------------
0x0C     Cache Line Size 
0x04     PCI Command Register 
0xA8     Processor interface configuration 1     
0xAC     Processor interface configuration 2  
0x80     Memory starting address register1
0x84     Memory starting address register2
0x88     Extended memory starting addressregister1
0x8C     Extended memory starting addressregister2
0x90     Memory ending address register1
0x94     Memory ending address register2
0x98     Extended memory ending address register1
0x9C     Extended memory ending address register2
0xA0     Memory bank enable register
0xD0     Extended ROM configuration register 1
0xD4     Extended ROM configuration register 2
0xD8     Extended ROM configuration register 3
0xDC     Extended ROM configuration register 4
0xF0     MCCR1
0xF4     MCCR2
0xF8     MCCR3
0xFC     MCCR4

Would anyone give me some references about MMU setting? 

^ permalink raw reply	[flat|nested] 3+ messages in thread
* About MMU setting in MPC8245
@ 2006-01-12  6:45 happa
  0 siblings, 0 replies; 3+ messages in thread
From: happa @ 2006-01-12  6:45 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

Hi, Mark,
    Thanks for your information.
    
>Are you in PCI host mode?  If so, the first sentence of chapter 3--
>Address Maps of the 8245 manual states:

>	"The MPC8245 in PCI host mode supports an address mapping
>	configuration that is designated as address map B."

>Map B == CHRP mapping.

Yes, my CPU is in PCI host mode, and my address is use Map B.

I'm figure out my problem.

My kernel seems work fine until it calling run_init_process("/sbin/init").

run_init_process("/sbin/init")
   |
   v
..wait until the file got from NFS .....     
   |
   v 
 load_elf_binary()
   |
   v
 flush_old_exec()
   |
   v
 exec_mmap()
   |
   v
 activate_mm() ---> After this function is called any virtual memory operations
                    (access address out of my physical dram range), will let kernel jump into exception mode.
"Oops: kernel access of bad area, sig: 11 [#2]"


So I guess the problem is relative to mmu setting.
Would you give me any idea which part I need to check?

Thanks.

/Wen

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

end of thread, other threads:[~2006-01-12  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-11 10:26 About MMU setting in MPC8245 happa
2006-01-11 16:07 ` Mark A. Greer
  -- strict thread matches above, loose matches on Subject: below --
2006-01-12  6:45 happa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox