All of lore.kernel.org
 help / color / mirror / Atom feed
* About ARM TCM patch
@ 2009-09-25  1:30 Peter Chen
  2009-09-25  5:04 ` Dave Hylands
  2009-09-25  9:15 ` Linus Walleij
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Chen @ 2009-09-25  1:30 UTC (permalink / raw)
  To: linux-arm-kernel

Dear ML,

I read the TCM patch from http://lwn.net/Articles/353032/

It said:
Code executing inside the ITCM does not "see" any MMU mappings
and e.g. register accesses must be made to physical addresses.

I am doubt it is correctly for all systems, at my SoC 
platform(arm1136JF, v6), the situation is difference.

1. After MMU open, the code running at ITCM can't see physical address 
for register.

2. After MMU open, the code can't run at physical addressed ITCM.

-- 
Best regards,
Peter Chen

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

* About ARM TCM patch
  2009-09-25  1:30 About ARM TCM patch Peter Chen
@ 2009-09-25  5:04 ` Dave Hylands
  2009-09-25  9:15 ` Linus Walleij
  1 sibling, 0 replies; 5+ messages in thread
From: Dave Hylands @ 2009-09-25  5:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

On Thu, Sep 24, 2009 at 6:30 PM, Peter Chen <hzpeterchen@gmail.com> wrote:
> Dear ML,
>
> I read the TCM patch from http://lwn.net/Articles/353032/
>
> It said:
> Code executing inside the ITCM does not "see" any MMU mappings
> and e.g. register accesses must be made to physical addresses.
>
> I am doubt it is correctly for all systems, at my SoC platform(arm1136JF,
> v6), the situation is difference.
>
> 1. After MMU open, the code running at ITCM can't see physical address for
> register.
>
> 2. After MMU open, the code can't run at physical addressed ITCM.

That's my understanding as well. Once the MMU is enabled, ALL access
go through the MMU, whether they originate from the ITCM or not.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/

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

* About ARM TCM patch
  2009-09-25  1:30 About ARM TCM patch Peter Chen
  2009-09-25  5:04 ` Dave Hylands
@ 2009-09-25  9:15 ` Linus Walleij
  2009-09-26 21:58   ` Linus Walleij
  1 sibling, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2009-09-25  9:15 UTC (permalink / raw)
  To: linux-arm-kernel

2009/9/25 Peter Chen <hzpeterchen@gmail.com>:

> I read the TCM patch from http://lwn.net/Articles/353032/

Are you trying to use it too?

> 1. After MMU open, the code running at ITCM can't see physical address for
> register.
>
> 2. After MMU open, the code can't run at physical addressed ITCM.

Could this be different between ARM9 (which I use) and ARM11?

Linus Walleij

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

* About ARM TCM patch
  2009-09-25  9:15 ` Linus Walleij
@ 2009-09-26 21:58   ` Linus Walleij
  2009-09-27  1:29     ` Peter Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2009-09-26 21:58 UTC (permalink / raw)
  To: linux-arm-kernel

2009/9/25 Linus Walleij <linus.ml.walleij@gmail.com>:
> 2009/9/25 Peter Chen <hzpeterchen@gmail.com>:

>> 1. After MMU open, the code running at ITCM can't see physical address for
>> register.
>>
>> 2. After MMU open, the code can't run at physical addressed ITCM.
>
> Could this be different between ARM9 (which I use) and ARM11?

Thinking about it this rings a bell. I know it behaves like described on ARM9,
so code executing in TCM can only "see" physical memory.

But one difference between the ARM9 and ARM11 families is that the cache
is mapped to virtual (MMU:ed) address space in ARM9 and to physical address
space in ARM11 is it not? (Is this so already in ARM10 BTW?)

So just thinking intuitively about it, as a TCM memory is very close to what
a cache is to the CPU I think it's something like this on ARM9:

     CPU
     / \
Cache   TCM
  |      |
 MMU     |
  |      |
External memory interface

But on ARM11 (ARM10?):

     CPU
      |
     MMU
     / \
Cache   TCM
  |
External memory interface

Is that correct more or less? Catalin would you happen to know this?

Anyway the code should still work actually, since we make a 1-1 memory
map anyway. But you cannot place the TCM in the memory locations I
chose for U300 since these are occupied on ARM11.

Linus Walleij

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

* About ARM TCM patch
  2009-09-26 21:58   ` Linus Walleij
@ 2009-09-27  1:29     ` Peter Chen
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Chen @ 2009-09-27  1:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 2009-09-26 at 23:58 +0200, Linus Walleij wrote:
> 2009/9/25 Linus Walleij <linus.ml.walleij@gmail.com>:
> > 2009/9/25 Peter Chen <hzpeterchen@gmail.com>:
> 
> >> 1. After MMU open, the code running at ITCM can't see physical address for
> >> register.
> >>
> >> 2. After MMU open, the code can't run at physical addressed ITCM.
> >
> > Could this be different between ARM9 (which I use) and ARM11?
> 
> Thinking about it this rings a bell. I know it behaves like described on ARM9,
> so code executing in TCM can only "see" physical memory.
> 
> But one difference between the ARM9 and ARM11 families is that the cache
> is mapped to virtual (MMU:ed) address space in ARM9 and to physical address
> space in ARM11 is it not? (Is this so already in ARM10 BTW?)
> 
> So just thinking intuitively about it, as a TCM memory is very close to what
> a cache is to the CPU I think it's something like this on ARM9:
> 
>      CPU
>      / \
> Cache   TCM
>   |      |
>  MMU     |
>   |      |
> External memory interface
> 
> But on ARM11 (ARM10?):
> 
>      CPU
>       |
>      MMU
>      / \
> Cache   TCM
>   |
> External memory interface
> 
> Is that correct more or less? Catalin would you happen to know this?
I think you are right. 

> Anyway the code should still work actually, since we make a 1-1 memory
> map anyway. But you cannot place the TCM in the memory locations I
> chose for U300 since these are occupied on ARM11.
Sorry, I haven't tried your patch at kernel, I just did experiments at u-boot.


> Linus Walleij
-- 
Best Regards
Peter Chen

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

end of thread, other threads:[~2009-09-27  1:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-25  1:30 About ARM TCM patch Peter Chen
2009-09-25  5:04 ` Dave Hylands
2009-09-25  9:15 ` Linus Walleij
2009-09-26 21:58   ` Linus Walleij
2009-09-27  1:29     ` Peter Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.