linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Instruction OCM
@ 2008-05-19 15:17 mojtaba
  2008-05-19 16:58 ` Stephen Neuendorffer
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: mojtaba @ 2008-05-19 15:17 UTC (permalink / raw)
  To: linuxppc-embedded

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

Dear all,

I cannot run Linux when I have an instruction OCM in my design but, without
instruction OCM everything is fine. I tried to do some debugging. It seems
that the Linux memory management unit has a problem with that.  After
entering the MMU initialization phase, it suddenly jumps to address
0x00000700 it get stuck there. Is there anybody who have tried a design with
instruction OCM? Do I need to do special configuration for the Linux kernel?


Regards,

Mojtaba


[-- Attachment #2: Type: text/html, Size: 2126 bytes --]

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

* RE: Instruction OCM
  2008-05-19 15:17 Instruction OCM mojtaba
@ 2008-05-19 16:58 ` Stephen Neuendorffer
  2008-05-20  8:31   ` mojtaba
  2008-05-19 17:59 ` Koss, Mike (Mission Systems)
  2008-05-19 18:53 ` Sergey Temerkhanov
  2 siblings, 1 reply; 8+ messages in thread
From: Stephen Neuendorffer @ 2008-05-19 16:58 UTC (permalink / raw)
  To: mojtaba, linuxppc-embedded

The traps are down there in low memory.  trap 700 is probably the one
that deals with MMU exceptions.  My guess is your OCM region is
overlapping with the DDR memory containing that code.

Steve

> -----Original Message-----
> From: linuxppc-embedded-bounces+stephen=3Dneuendorffer.name@ozlabs.org
[mailto:linuxppc-embedded-
> bounces+stephen=3Dneuendorffer.name@ozlabs.org] On Behalf Of mojtaba
> Sent: Monday, May 19, 2008 8:17 AM
> To: linuxppc-embedded@ozlabs.org
> Subject: Instruction OCM
> =

> Dear all,
> =

> I cannot run Linux when I have an instruction OCM in my design but,
without instruction OCM
> everything is fine. I tried to do some debugging. It seems that the
Linux memory management unit has
> a problem with that.  After entering the MMU initialization phase, it
suddenly jumps to address
> 0x00000700 it get stuck there. Is there anybody who have tried a
design with instruction OCM? Do I
> need to do special configuration for the Linux kernel?
> =

> Regards,
> =

> Mojtaba


This email and any attachments are intended for the sole use of the named r=
ecipient(s) and contain(s) confidential information that may be proprietary=
, privileged or copyrighted under applicable law. If you are not the intend=
ed recipient, do not read, copy, or forward this email message or any attac=
hments. Delete this email message and any attachments immediately.

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

* RE: Instruction OCM
  2008-05-19 15:17 Instruction OCM mojtaba
  2008-05-19 16:58 ` Stephen Neuendorffer
@ 2008-05-19 17:59 ` Koss, Mike (Mission Systems)
  2008-05-19 18:53 ` Sergey Temerkhanov
  2 siblings, 0 replies; 8+ messages in thread
From: Koss, Mike (Mission Systems) @ 2008-05-19 17:59 UTC (permalink / raw)
  To: mojtaba, linuxppc-embedded

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

How is your IOCM actually built into your system, i.e. what is its base
address? It cannot overlap with any other memory address in the system.
 
-- Mike

________________________________

From: mojtaba [mailto:kernelppc@gmail.com] 
Sent: Monday, May 19, 2008 11:17 AM
To: linuxppc-embedded@ozlabs.org
Subject: Instruction OCM



Dear all,

I cannot run Linux when I have an instruction OCM in my design but,
without instruction OCM everything is fine. I tried to do some
debugging. It seems that the Linux memory management unit has a problem
with that.  After entering the MMU initialization phase, it suddenly
jumps to address 0x00000700 it get stuck there. Is there anybody who
have tried a design with instruction OCM? Do I need to do special
configuration for the Linux kernel? 

Regards,

Mojtaba


[-- Attachment #2: Type: text/html, Size: 3208 bytes --]

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

* Re: Instruction OCM
  2008-05-19 15:17 Instruction OCM mojtaba
  2008-05-19 16:58 ` Stephen Neuendorffer
  2008-05-19 17:59 ` Koss, Mike (Mission Systems)
@ 2008-05-19 18:53 ` Sergey Temerkhanov
  2008-05-20  9:19   ` mojtaba
  2 siblings, 1 reply; 8+ messages in thread
From: Sergey Temerkhanov @ 2008-05-19 18:53 UTC (permalink / raw)
  To: linuxppc-embedded

mojtaba wrote:
>
> Dear all,
>
> I cannot run Linux when I have an instruction OCM in my design but, 
> without instruction OCM everything is fine. I tried to do some 
> debugging. It seems that the Linux memory management unit has a 
> problem with that.  After entering the MMU initialization phase, it 
> suddenly jumps to address 0x00000700 it get stuck there. Is there 
> anybody who have tried a design with instruction OCM? Do I need to do 
> special configuration for the Linux kernel?
>
> Regards,
>
> Mojtaba
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Address 0x700 means invalid opcode exception.
If instruction OCM is same as data OCM (I think it's so) then any MMU 
mapping is not applicable to this region at all as OCM controller 
decodes virtual addresses bypassing any MMU mappings.
In your situation MMU maps virtual address of OCM to physical address 
containing some random data and CPU tries to execute it. So you get 
invalid opcode exception.

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

* RE: Instruction OCM
  2008-05-19 16:58 ` Stephen Neuendorffer
@ 2008-05-20  8:31   ` mojtaba
  0 siblings, 0 replies; 8+ messages in thread
From: mojtaba @ 2008-05-20  8:31 UTC (permalink / raw)
  To: 'Stephen Neuendorffer', linuxppc-embedded; +Cc: mike.koss

Actually there is no overlapping between IOCM and DDR. The IOCM region
addre4sses are:
PARAMETER C_BASEADDR = 0xc0a00000
PARAMETER C_HIGHADDR = 0xc0a1ffff
And the DDR addresses are:
PARAMETER C_MEM0_BASEADDR = 0x00000000
PARAMETER C_MEM0_HIGHADDR = 0x0fffffff
Furthermore, if such a conflict existed, the synthesizer would have
identified it.


-----Original Message-----
From: Stephen Neuendorffer [mailto:stephen.neuendorffer@xilinx.com] 
Sent: Monday, May 19, 2008 6:59 PM
To: mojtaba; linuxppc-embedded@ozlabs.org
Subject: RE: Instruction OCM

The traps are down there in low memory.  trap 700 is probably the one
that deals with MMU exceptions.  My guess is your OCM region is
overlapping with the DDR memory containing that code.

Steve

> -----Original Message-----
> From: linuxppc-embedded-bounces+stephen=neuendorffer.name@ozlabs.org
[mailto:linuxppc-embedded-
> bounces+stephen=neuendorffer.name@ozlabs.org] On Behalf Of mojtaba
> Sent: Monday, May 19, 2008 8:17 AM
> To: linuxppc-embedded@ozlabs.org
> Subject: Instruction OCM
> 
> Dear all,
> 
> I cannot run Linux when I have an instruction OCM in my design but,
without instruction OCM
> everything is fine. I tried to do some debugging. It seems that the
Linux memory management unit has
> a problem with that.  After entering the MMU initialization phase, it
suddenly jumps to address
> 0x00000700 it get stuck there. Is there anybody who have tried a
design with instruction OCM? Do I
> need to do special configuration for the Linux kernel?
> 
> Regards,
> 
> Mojtaba


This email and any attachments are intended for the sole use of the named
recipient(s) and contain(s) confidential information that may be
proprietary, privileged or copyrighted under applicable law. If you are not
the intended recipient, do not read, copy, or forward this email message or
any attachments. Delete this email message and any attachments immediately.

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

* RE: Instruction OCM
  2008-05-19 18:53 ` Sergey Temerkhanov
@ 2008-05-20  9:19   ` mojtaba
  2008-05-20 11:11     ` Temerkhanov
  0 siblings, 1 reply; 8+ messages in thread
From: mojtaba @ 2008-05-20  9:19 UTC (permalink / raw)
  To: 'Sergey Temerkhanov', linuxppc-embedded

Thank you for your email. But what is the solution to that? I have seen this
in a thesis: 

"when using the OCM buses to connect memory, we can only use virtual memory
as long as the virtual address is the same as the physical address, which is
conceptually
the same as using a system without MMU. Therefore porting Linux to a
system based on an OCM memory system is not possible"

http://ce.et.tudelft.nl/publicationfiles/1367_700_thesis.pdf

Is that right? What do you suggest?

-----Original Message-----
From: linuxppc-embedded-bounces+kernelppc=gmail.com@ozlabs.org
[mailto:linuxppc-embedded-bounces+kernelppc=gmail.com@ozlabs.org] On Behalf
Of Sergey Temerkhanov
Sent: Monday, May 19, 2008 8:53 PM
To: linuxppc-embedded@ozlabs.org
Subject: Re: Instruction OCM

mojtaba wrote:
>
> Dear all,
>
> I cannot run Linux when I have an instruction OCM in my design but, 
> without instruction OCM everything is fine. I tried to do some 
> debugging. It seems that the Linux memory management unit has a 
> problem with that.  After entering the MMU initialization phase, it 
> suddenly jumps to address 0x00000700 it get stuck there. Is there 
> anybody who have tried a design with instruction OCM? Do I need to do 
> special configuration for the Linux kernel?
>
> Regards,
>
> Mojtaba
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Address 0x700 means invalid opcode exception.
If instruction OCM is same as data OCM (I think it's so) then any MMU 
mapping is not applicable to this region at all as OCM controller 
decodes virtual addresses bypassing any MMU mappings.
In your situation MMU maps virtual address of OCM to physical address 
containing some random data and CPU tries to execute it. So you get 
invalid opcode exception.
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

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

* Re: Instruction OCM
  2008-05-20  9:19   ` mojtaba
@ 2008-05-20 11:11     ` Temerkhanov
  2008-05-20 21:26       ` Stephen Neuendorffer
  0 siblings, 1 reply; 8+ messages in thread
From: Temerkhanov @ 2008-05-20 11:11 UTC (permalink / raw)
  To: mojtaba, linuxppc-embedded

On Tuesday 20 May 2008 13:19:26 mojtaba wrote:
> Thank you for your email. But what is the solution to that? I have seen
> this in a thesis:
>
> "when using the OCM buses to connect memory, we can only use virtual memory
> as long as the virtual address is the same as the physical address, which
> is conceptually
> the same as using a system without MMU. Therefore porting Linux to a
> system based on an OCM memory system is not possible"
>
> http://ce.et.tudelft.nl/publicationfiles/1367_700_thesis.pdf
>
> Is that right? What do you suggest?
>


Getting OCM-based devices (and even memory) to work in Linux is possible. All 
you need is to setup a mapping with virtual addresses equal to physical (some  
info can be found here: 
http://courses.ece.uiuc.edu/ece412/MP_Files/mp2/20060623-XUP-Linux-Tutorial-REVISION-FINAL.pdf)

Furthermore, if you really need to get the code running from OCM, I'd suggest 
to setup such MMU mapping for OCM region very early - it can be done in 
initial_mmu function at head_4xx.S. Look at line 936 (#if 
defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(SERIAL_DEBUG_IO_BASE))
 - that's very good point to start.

Regards, Sergey Temerkhanov

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

* RE: Instruction OCM
  2008-05-20 11:11     ` Temerkhanov
@ 2008-05-20 21:26       ` Stephen Neuendorffer
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Neuendorffer @ 2008-05-20 21:26 UTC (permalink / raw)
  To: temerkhanov, mojtaba, linuxppc-embedded, Grant Likely


Ah yes, I forgot about that little detail with the OCM.

It would be slick if these mappings were generated based on memory nodes
in the device tree for ARCH=3Dpowerpc.

Steve

> -----Original Message-----
> From: linuxppc-embedded-bounces+stephen=3Dneuendorffer.name@ozlabs.org
[mailto:linuxppc-embedded-
> bounces+stephen=3Dneuendorffer.name@ozlabs.org] On Behalf Of Temerkhanov
> Sent: Tuesday, May 20, 2008 4:11 AM
> To: mojtaba; linuxppc-embedded@ozlabs.org
> Subject: Re: Instruction OCM
> =

> On Tuesday 20 May 2008 13:19:26 mojtaba wrote:
> > Thank you for your email. But what is the solution to that? I have
seen
> > this in a thesis:
> >
> > "when using the OCM buses to connect memory, we can only use virtual
memory
> > as long as the virtual address is the same as the physical address,
which
> > is conceptually
> > the same as using a system without MMU. Therefore porting Linux to a
> > system based on an OCM memory system is not possible"
> >
> > http://ce.et.tudelft.nl/publicationfiles/1367_700_thesis.pdf
> >
> > Is that right? What do you suggest?
> >
> =

> =

> Getting OCM-based devices (and even memory) to work in Linux is
possible. All
> you need is to setup a mapping with virtual addresses equal to
physical (some
> info can be found here:
>
http://courses.ece.uiuc.edu/ece412/MP_Files/mp2/20060623-XUP-Linux-Tutor
ial-REVISION-FINAL.pdf)
> =

> Furthermore, if you really need to get the code running from OCM, I'd
suggest
> to setup such MMU mapping for OCM region very early - it can be done
in
> initial_mmu function at head_4xx.S. Look at line 936 (#if
> defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(SERIAL_DEBUG_IO_BASE))
>  - that's very good point to start.
> =

> Regards, Sergey Temerkhanov
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded


This email and any attachments are intended for the sole use of the named r=
ecipient(s) and contain(s) confidential information that may be proprietary=
, privileged or copyrighted under applicable law. If you are not the intend=
ed recipient, do not read, copy, or forward this email message or any attac=
hments. Delete this email message and any attachments immediately.

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

end of thread, other threads:[~2008-05-20 21:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-19 15:17 Instruction OCM mojtaba
2008-05-19 16:58 ` Stephen Neuendorffer
2008-05-20  8:31   ` mojtaba
2008-05-19 17:59 ` Koss, Mike (Mission Systems)
2008-05-19 18:53 ` Sergey Temerkhanov
2008-05-20  9:19   ` mojtaba
2008-05-20 11:11     ` Temerkhanov
2008-05-20 21:26       ` Stephen Neuendorffer

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