linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Address mapping PPC 405
@ 2005-08-26  1:31 P. Sadik
  2005-08-26  3:10 ` Grant Likely
  2005-08-28 15:15 ` Jon Masters
  0 siblings, 2 replies; 25+ messages in thread
From: P. Sadik @ 2005-08-26  1:31 UTC (permalink / raw)
  To: linuxppc-embedded

Hello,

  I have a question on how PPC addressing works. I am familiar with
the MIPS architecture and new to PPC.

  On MIPS, there are KUSEG (0x0000_0000 to 0x07FF_FFFF)
which is always translated using TLB. Then there are two
un-translated areas KSEG0 (0x8000_0000 which is cached)
and KSEG1 (0xA000_0000).

  Hence, the kernel is compiled with .text at 0x8000_0000. For kernel
itself, the TLB is never consulted. All the local peripherals will be mappe=
d to=20
0xA000_0000. That means, from kernel, if I have to access a register of any=
=20
peripheral, I can use the un-mapped address and everything will work.

 On PPC I see that, the kernel .text is at 0xC000_0000. Is it a=20
translated address? If it is, for running kernel code, the CPU has to
consult the TLB always?

 Another question is regarding addressing local peripherals. I am using
an ML310 board from Xilinx and it has DDR mapped to 0x0000_0000
to 0x0FFF_FFFF (256 MB). Now, I need to add an IP to the PLB.
For that, I am thinking of using 0x2000_0000 to 0x2000_0FFF.
Now, my driver need to access the registers within the above region.
How will I do that? It is an I/O, hence should I use ioremap, or can
I access it directly? What role cache will play in this case?

 The third question is, can I use de-referencing of address. Is it O.K
to use pointers to access the registers, or do I have to use read/write
variants?=20

  I would appreciate a lot if you could give some insight into this. Any
pointers or reading materials will be very helpful.

Thanks and regards,

Sadik.

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

end of thread, other threads:[~2005-11-22 17:35 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-26  1:31 Address mapping PPC 405 P. Sadik
2005-08-26  3:10 ` Grant Likely
2005-08-26 22:47   ` Peter Ryser
2005-08-28 15:15 ` Jon Masters
2005-08-29  0:26   ` Grant Likely
2005-08-29  1:11     ` Jon Masters
2005-08-30 15:38       ` Matt Porter
2005-09-15 16:03         ` PPC4xx cleanup Stefan Roese
2005-09-15 16:25           ` Matt Porter
2005-09-15 19:03             ` Dan Malek
2005-09-19 14:08               ` Matt Porter
2005-09-16 11:06             ` [PATCH] ppc32: cleanup AMCC PPC4xx eval boards to better support U-Boot Stefan Roese
2005-09-16 16:27               ` Eugene Surovegin
2005-09-19 11:02                 ` Stefan Roese
2005-09-19 13:59                   ` Matt Porter
2005-09-19 15:06                     ` Stefan Roese
2005-09-19 15:21                       ` Matt Porter
2005-09-19 17:14                       ` Eugene Surovegin
2005-11-22 17:34               ` [PATCH] ppc32: Add P3P440 (440GP) board support Stefan Roese
2005-09-19 11:20             ` [PATCH] ppc32: cleanup AMCC PPC44x eval boards to better support U-Boot Stefan Roese
2005-09-30 12:52               ` [PATCH] ppc32: cleanup AMCC PPC40x eval boards to " Stefan Roese
2005-10-28 15:58                 ` [PATCH] ppc32: Remove internal PCI arbiter check on PPC40x Stefan Roese
2005-10-31  9:29                   ` [PATCH] ppc32: Add missing initrd header on ppc440 Stefan Roese
2005-10-31 14:41                     ` Matt Porter
2005-08-30 15:09     ` Address mapping PPC 405 Matt Porter

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