linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* memory map
@ 2000-04-21  9:49 zzh
  2000-04-21 16:58 ` Dan Malek
  0 siblings, 1 reply; 10+ messages in thread
From: zzh @ 2000-04-21  9:49 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,everyone.
I have some questions about the memory map on linux on 8xx and ppc
1)Some area eg BCSR mapped below KERNELBASE,is this safe?
I check some process's vm area,it does not fall in this area,will
it be unsafe under some circumstances?
2)I read mapin_ram() in mm/init.c ,found that phys mem is also mapped
both by bat and page table ,what is this for?
Can someone help me?


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

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re:Re: memory map
@ 2000-04-24  3:24 zzh
  2000-04-24  3:54 ` Dan Malek
  0 siblings, 1 reply; 10+ messages in thread
From: zzh @ 2000-04-24  3:24 UTC (permalink / raw)
  To: Dan Malek; +Cc: linuxppc-embedded


>zzh wrote:
>
>
>> 1)Some area eg BCSR mapped below KERNELBASE,is this safe?
>
>If you ioremap() after the kernel VM allocator is initialized, this
>is fine.  You then get a kernel virtual address to use that will
>map to the physical address.  Don't map this in mm/init.c initialization
>as this maps 1:1 because the VM is not initialized yet.  The things
>mapped in mm/init.c should be just the minimum to debug or get
>the kernel booted.
>
>> I check some process's vm area,it does not fall in this area,will
>> it be unsafe under some circumstances?
>
>The "some" circumstances are incorrect mapping during the early
>initialization.
>
>> 2)I read mapin_ram() in mm/init.c ,found that phys mem is also mapped
>> both by bat and page table ,what is this for?
>
>Physical memory is mapped by BATs, if they exist on the processor.
>Since the 8xx doesn't have BATs, the memory is mapped through page
>tables.
>
>
>	-- Dan
In fact,i am hacking with a motorola 8260 ads board.I download the
mpc8xx to start with.I find it is in fact quite different.The cpm
part is similar,but the core should not use the code in CONFIG_8XX
.I think the memory problem is very important.No i determine to
proceed as follows:
1)Before start_here,map KERNELBASE to 0 with BAT,then can safely call
other function
2)In mapin_ram(),map KERNELBASE to phys mem use paging,i think this is necessary because we need to individually controll the caching property of those pages used by cpm.
3)Map internal memory space with BAT above KERNELBASE.on startup,
my board's IMMR=0f000000,so change this to f0000000 in ROM code
before init dram etc and use it in kernel too.
Do you think this is ok?I learned that you do a 8260 port too,
what is the method you use and how's the status of the work?
                           Best Regard
                           davidzhang


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

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: memory map
@ 2000-04-24  5:11 Shuangjun Zhu
  2000-04-24 16:09 ` Dan Malek
  0 siblings, 1 reply; 10+ messages in thread
From: Shuangjun Zhu @ 2000-04-24  5:11 UTC (permalink / raw)
  To: Dan Malek; +Cc: linuxppc-embedded


Dan Malek wrote:

>
>zzh wrote:
>
>> In fact,i am hacking with a motorola 8260 ads board.
>
>I just checked in all of my 8260 changes.  You may find them
>helpful.
>


Where can I get the code?

>> ....I download the
>> mpc8xx to start with.I find it is in fact quite different.
>
>Yes, it is quite different.....It is just a 603 with a bigger
>CPM.
>
>
>> my board's IMMR=0f000000,so change this to f0000000 in ROM code
>
>That's a good thing.  The current configuration assumes the
>IMMR at 0xf0000000.  Map the board BCSRs up in that range and get
>all of it with one BAT.
>
>


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

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re:Re: memory map
@ 2000-04-25  9:31 zzh
  2000-04-25 17:05 ` Dan Malek
  0 siblings, 1 reply; 10+ messages in thread
From: zzh @ 2000-04-25  9:31 UTC (permalink / raw)
  To: Dan Malek; +Cc: linuxppc-embedded


>Steve Tarr wrote:
>
>
>> This IMMR  for the MPC8260 is VERY  tricky,
>
>I didn't think so.  The only thing different is that it isn't stored
>in a special register, so you have to know the current IMMR to change
>to a different one. You can read the default setting from the
>config word or boot rom, and then change it if you wish.
>
this should be done as early as possible unless want to set or copy those values again from old to new.The value is really unimportant
if decide to map it with  BAT.
ADS manual say this should be 0x0470-0000 with no obvious reason.
At least it is not mandatary.My pilot board cannot read hwconfig
from flash(it took me much time to find this before learned it from Motorola web site),the default IMMR after power on is 0x0f00-0000.
I choose to map it to 0xf000-0000 with  BAT.
>You have to get the default word from someplace, and that is either
>the application choice from the boot rom or by asserting RSTCONF and
>using a default when there isn't a boot rom.
>
>I think the implementation is pretty slick, especially when you look
>at the multiprocessor implementation.
>
>Just because Motorola screwed up one of their reference boards (again),
>doesn't mean it can't work well for others.  The purpose of these reference
>boards is to demonstrate the ease of using a processor, and I am just
>amazed they consistently build the most difficult to use and unreliable
>platform to do that.  Fortunately, there are other choices.
Any other board ? I know there is one from EST with no FCC.
>
>
>	-- Dan


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

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Memory map
@ 2000-11-27 19:04 Konstantin Sabodash
  2000-11-27 19:22 ` Dan Malek
  0 siblings, 1 reply; 10+ messages in thread
From: Konstantin Sabodash @ 2000-11-27 19:04 UTC (permalink / raw)
  To: linuxppc-embedded, wg


Hello TWG - pat, mark & steve.

I've seen your post to linuxppc-embedded@lists.linuxppc.org  regarding
memory access  from Linux.
Your code works fine.

 "paddr2 = mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0x50000000);"

But  page size is 1K and their start addresses  appears in address
space  with increment 0x1000.
So if I put 0x50000400 address it give me segmentation fault. It works
fine in region 0x50000000 ...  0x500003ff  next 0x50001000 ...
0x500103ff and so on.
Question : how can we increase page size to eliminate these holes.
Thanks in advance.

--
Konstantin Sabodash


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

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

end of thread, other threads:[~2000-11-27 19:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-21  9:49 memory map zzh
2000-04-21 16:58 ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2000-04-24  3:24 zzh
2000-04-24  3:54 ` Dan Malek
2000-04-23 22:16   ` Steve Tarr
2000-04-24 16:07     ` Dan Malek
2000-04-24  5:11 Shuangjun Zhu
2000-04-24 16:09 ` Dan Malek
2000-04-25  9:31 zzh
2000-04-25 17:05 ` Dan Malek
2000-11-27 19:04 Memory map Konstantin Sabodash
2000-11-27 19:22 ` 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).