From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by ozlabs.org (Postfix) with ESMTP id 975B7DDF11 for ; Tue, 20 May 2008 01:16:03 +1000 (EST) Received: by fg-out-1718.google.com with SMTP id d23so1682436fga.39 for ; Mon, 19 May 2008 08:16:01 -0700 (PDT) From: "mojtaba" To: Subject: Instruction OCM Date: Mon, 19 May 2008 17:17:29 +0200 Message-ID: <012401c8b9c3$74b947c0$5e2bd740$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0125_01C8B9D4.384217C0" List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multipart message in MIME format. ------=_NextPart_000_0125_01C8B9D4.384217C0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0125_01C8B9D4.384217C0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

------=_NextPart_000_0125_01C8B9D4.384217C0-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound4-wa4-R.bigfish.com (outbound-wa4.frontbridge.com [216.32.181.16]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.bigfish.com", Issuer "*.bigfish.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 6677FDDDFD for ; Tue, 20 May 2008 02:58:48 +1000 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Subject: RE: Instruction OCM Date: Mon, 19 May 2008 09:58:44 -0700 In-reply-to: <012401c8b9c3$74b947c0$5e2bd740$@com> References: <012401c8b9c3$74b947c0$5e2bd740$@com> From: "Stephen Neuendorffer" To: "mojtaba" , Message-Id: <20080519165845.4430019C0055@mail16-wa4.bigfish.com> List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xmrm0101.northgrum.com (xmrm0101.northgrum.com [155.104.240.104]) by ozlabs.org (Postfix) with ESMTP id 61C4FDE133 for ; Tue, 20 May 2008 03:59:59 +1000 (EST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8B9DA.228ABEC6" Subject: RE: Instruction OCM Date: Mon, 19 May 2008 12:59:51 -0500 Message-ID: In-Reply-To: <012401c8b9c3$74b947c0$5e2bd740$@com> References: <012401c8b9c3$74b947c0$5e2bd740$@com> From: "Koss, Mike (Mission Systems)" To: "mojtaba" , List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. ------_=_NextPart_001_01C8B9DA.228ABEC6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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. =20 -- Mike ________________________________ From: mojtaba [mailto:kernelppc@gmail.com]=20 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?=20 Regards, Mojtaba ------_=_NextPart_001_01C8B9DA.228ABEC6 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
How is your IOCM actually built into your = system, i.e. what=20 is its base address? It cannot overlap with any other memory address in = the=20 system.
 
-- Mike


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

Dear all,

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

Regards,

Mojtaba

------_=_NextPart_001_01C8B9DA.228ABEC6-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.yandex.ru (smtp1.yandex.ru [213.180.200.14]) by ozlabs.org (Postfix) with ESMTP id 7DA76DDE19 for ; Tue, 20 May 2008 05:22:44 +1000 (EST) Received: from ppp91-78-89-110.pppoe.mtu-net.ru ([91.78.89.110]:21302 "EHLO [10.0.0.10]" smtp-auth: "temerkhanov" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S8372644AbYESSxV (ORCPT ); Mon, 19 May 2008 22:53:21 +0400 Message-ID: <4831CCA2.6000107@yandex.ru> Date: Mon, 19 May 2008 22:53:22 +0400 From: Sergey Temerkhanov MIME-Version: 1.0 To: linuxppc-embedded@ozlabs.org Subject: Re: Instruction OCM References: <012401c8b9c3$74b947c0$5e2bd740$@com> In-Reply-To: <012401c8b9c3$74b947c0$5e2bd740$@com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by ozlabs.org (Postfix) with ESMTP id 7CCD9DDF4B for ; Tue, 20 May 2008 18:29:48 +1000 (EST) Received: by nf-out-0910.google.com with SMTP id e27so984604nfd.9 for ; Tue, 20 May 2008 01:29:46 -0700 (PDT) From: "mojtaba" To: "'Stephen Neuendorffer'" , References: <012401c8b9c3$74b947c0$5e2bd740$@com> <20080519165845.4430019C0055@mail16-wa4.bigfish.com> In-Reply-To: <20080519165845.4430019C0055@mail16-wa4.bigfish.com> Subject: RE: Instruction OCM Date: Tue, 20 May 2008 10:31:15 +0200 Message-ID: <015e01c8ba53$df25afa0$9d710ee0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: mike.koss@ngc.com List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by ozlabs.org (Postfix) with ESMTP id 6FC58DDF89 for ; Tue, 20 May 2008 19:18:00 +1000 (EST) Received: by nf-out-0910.google.com with SMTP id e27so993494nfd.9 for ; Tue, 20 May 2008 02:17:57 -0700 (PDT) From: "mojtaba" To: "'Sergey Temerkhanov'" , References: <012401c8b9c3$74b947c0$5e2bd740$@com> <4831CCA2.6000107@yandex.ru> In-Reply-To: <4831CCA2.6000107@yandex.ru> Subject: RE: Instruction OCM Date: Tue, 20 May 2008 11:19:26 +0200 Message-ID: <016b01c8ba5a$9a621000$cf263000$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp7.yandex.ru (smtp7.yandex.ru [213.180.200.45]) by ozlabs.org (Postfix) with ESMTP id B57EBDE071 for ; Tue, 20 May 2008 21:11:30 +1000 (EST) Received: from cifronik.21th.com ([62.16.86.116]:38787 "EHLO satanklaus.cifronic.local" smtp-auth: "temerkhanov" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S738521AbYETLL0 (ORCPT ); Tue, 20 May 2008 15:11:26 +0400 From: Temerkhanov To: "mojtaba" , linuxppc-embedded@ozlabs.org Subject: Re: Instruction OCM Date: Tue, 20 May 2008 15:11:25 +0400 References: <012401c8b9c3$74b947c0$5e2bd740$@com> <4831CCA2.6000107@yandex.ru> <016b01c8ba5a$9a621000$cf263000$@com> In-Reply-To: <016b01c8ba5a$9a621000$cf263000$@com> MIME-Version: 1.0 Message-Id: <200805201511.25957.temerkhanov@yandex.ru> Content-Type: text/plain; charset="iso-8859-1" Reply-To: temerkhanov@cifronik.ru List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound7-dub-R.bigfish.com (outbound-dub.frontbridge.com [213.199.154.16]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.bigfish.com", Issuer "*.bigfish.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id D5783DDF0C for ; Wed, 21 May 2008 07:26:28 +1000 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Subject: RE: Instruction OCM Date: Tue, 20 May 2008 14:26:15 -0700 In-reply-to: <200805201511.25957.temerkhanov@yandex.ru> References: <012401c8b9c3$74b947c0$5e2bd740$@com> <4831CCA2.6000107@yandex.ru><016b01c8ba5a$9a621000$cf263000$@com> <200805201511.25957.temerkhanov@yandex.ru> From: "Stephen Neuendorffer" To: , "mojtaba" , , "Grant Likely" Message-Id: <20080520212616.B378E3A006D@mail99-dub.bigfish.com> List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.