RE: little endian page mapping on PQ3

3 messages, 3 authors, 2007-08-24 · open the first message on its own page

RE: little endian page mapping on PQ3

From: Joyeau Sylvain <hidden>
Date: 2007-08-24 11:40:31

Jose,

You are right, PQ3 supports endianess choice on a per page basis.=20
Without any hook in Linux, you can remap physical address range (but =
RAM), by calling __ioremap() with the "_PAGE_ENDIAN" bit set in the =
flags.

--
sj
-----Original Message-----
From:=20
linuxppc-embedded-bounces+sylvain.joyeau=3Dthomson.net@ozlabs.or
g=20
[mailto:linuxppc-embedded-bounces+sylvain.joyeau=3Dthomson.net@o
zlabs.org] On Behalf Of Jose Almeida
Sent: vendredi 24 ao=FBt 2007 09:59
To: Linuxppc-embedded@ozlabs.org
Subject: little endian page mapping on PQ3
=20
Hi all,
=20
Looking at PQ3 documentation, it looks like there is a way to select
on a page basis if we would like to map one particular page in BIG or
LITTLE endian.
This is a very nice feature when you need to exchange some data
between a PC and a PQ3 target.
=20
I am wondering if someone have already tryed this PQ3 feature ?
I guess this would require some kind of hook in the kernel ...
=20
Any clue ?
=20
Thanks -  Jose
=20
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
=20

Re: little endian page mapping on PQ3

From: Jose Almeida <hidden>
Date: 2007-08-24 13:08:33

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Sylvain,<br>
<br>
Thanks for the information... I will try this.<br>
What I really need to do is to map these pages at user level (these
pages will be contiguous pages, because they are used for DMA purpose).<br>
<br>
I want to do using an mmap() entry point in a driver, in order to map
this to the user. Of course in that case ioremap() does not work.<br>
<br>
Any Clue ?<br>
<br>
Thanks - Jose<br>
<br>
Joyeau Sylvain wrote:
<blockquote
 cite="midB00307ADBC68954AA8D6FB3AC8FD66F30141DE36@rennsmail05.eu.thmulti.com"
 type="cite">
  <pre wrap="">Jose,

You are right, PQ3 supports endianess choice on a per page basis. 
Without any hook in Linux, you can remap physical address range (but RAM), by calling __ioremap() with the "_PAGE_ENDIAN" bit set in the flags.

--
sj

  </pre>
  <blockquote type="cite">
    <pre wrap="">-----Original Message-----
From: 
<a class="moz-txt-link-abbreviated" href="mailto:linuxppc-embedded-bounces+sylvain.joyeau=thomson.net@ozlabs.or">linuxppc-embedded-bounces+sylvain.joyeau=thomson.net@ozlabs.or</a>
g 
[<a class="moz-txt-link-freetext" href="mailto:linuxppc-embedded-bounces+sylvain.joyeau=thomson.net@o">mailto:linuxppc-embedded-bounces+sylvain.joyeau=thomson.net@o</a>
zlabs.org] On Behalf Of Jose Almeida
Sent: vendredi 24 ao&ucirc;t 2007 09:59
To: <a class="moz-txt-link-abbreviated" href="mailto:Linuxppc-embedded@ozlabs.org">Linuxppc-embedded@ozlabs.org</a>
Subject: little endian page mapping on PQ3

Hi all,

Looking at PQ3 documentation, it looks like there is a way to select
on a page basis if we would like to map one particular page in BIG or
LITTLE endian.
This is a very nice feature when you need to exchange some data
between a PC and a PQ3 target.

I am wondering if someone have already tryed this PQ3 feature ?
I guess this would require some kind of hook in the kernel ...

Any clue ?

Thanks -  Jose

_______________________________________________
Linuxppc-embedded mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Linuxppc-embedded@ozlabs.org">Linuxppc-embedded@ozlabs.org</a>
<a class="moz-txt-link-freetext" href="https://ozlabs.org/mailman/listinfo/linuxppc-embedded">https://ozlabs.org/mailman/listinfo/linuxppc-embedded</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
Linuxppc-embedded mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Linuxppc-embedded@ozlabs.org">Linuxppc-embedded@ozlabs.org</a>
<a class="moz-txt-link-freetext" href="https://ozlabs.org/mailman/listinfo/linuxppc-embedded">https://ozlabs.org/mailman/listinfo/linuxppc-embedded</a>


  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 


Meet us at our next event:

MAKS - August 21-26, 2007
Moscow, Russia
<a class="moz-txt-link-freetext" href="http://www.aviasalon.com">http://www.aviasalon.com</a>

TechTalk Hamburg - September 26, 2007
Hamburg, Germany
<a class="moz-txt-link-freetext" href="http://www.sysgo.com/news-events/events">http://www.sysgo.com/news-events/events</a>

MAE - October 20, 2007
Gaydon, United Kingdom
<a class="moz-txt-link-freetext" href="http://www.mae-show.com/">http://www.mae-show.com/</a>

</pre>
</body>
</html>

Re: little endian page mapping on PQ3

From: David Hawkins <hidden>
Date: 2007-08-24 15:49:46

Hi Jose,
I want to do using an mmap() entry point in a driver, in order to map 
this to the user. Of course in that case ioremap() does not work.

Any Clue ?
I used the little-endian flag on the Yosemite board (440EP)
to test what the flag did.

http://www.ovro.caltech.edu/~dwh/correlator/pdf/LNX-762-Hawkins.pdf
http://www.ovro.caltech.edu/~dwh/correlator/software/driver_design.tar.gz

Look at the mmap function in pci_io.c.

	/* PowerPC endian control
	 * - default is cleared, big-endian
	 */
#ifdef _PAGE_ENDIAN
	if (bar->little_endian) {
		pgprot_val(vma->vm_page_prot) |= _PAGE_ENDIAN;
	} else {
		pgprot_val(vma->vm_page_prot) &= ~_PAGE_ENDIAN;
	}
	if (pgprot_val(vma->vm_page_prot) & _PAGE_ENDIAN) {
		LOG_DEBUG("_PAGE_ENDIAN is set\n");
	} else {
		LOG_DEBUG("_PAGE_ENDIAN is not set\n");
	}
#endif

It might be the same for the PQ3 ... at least it'll be
pretty similar.

Dave
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help