* little endian page mapping on PQ3
@ 2007-08-24 7:59 Jose Almeida
2007-08-24 13:19 ` Clemens Koller
0 siblings, 1 reply; 5+ messages in thread
From: Jose Almeida @ 2007-08-24 7:59 UTC (permalink / raw)
To: Linuxppc-embedded
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: little endian page mapping on PQ3
@ 2007-08-24 11:40 Joyeau Sylvain
2007-08-24 13:08 ` Jose Almeida
0 siblings, 1 reply; 5+ messages in thread
From: Joyeau Sylvain @ 2007-08-24 11:40 UTC (permalink / raw)
To: Jose Almeida, Linuxppc-embedded
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: little endian page mapping on PQ3
2007-08-24 11:40 Joyeau Sylvain
@ 2007-08-24 13:08 ` Jose Almeida
2007-08-24 15:49 ` David Hawkins
0 siblings, 1 reply; 5+ messages in thread
From: Jose Almeida @ 2007-08-24 13:08 UTC (permalink / raw)
To: Joyeau Sylvain; +Cc: Linuxppc-embedded
[-- Attachment #1: Type: text/html, Size: 3387 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: little endian page mapping on PQ3
2007-08-24 7:59 little endian page mapping on PQ3 Jose Almeida
@ 2007-08-24 13:19 ` Clemens Koller
0 siblings, 0 replies; 5+ messages in thread
From: Clemens Koller @ 2007-08-24 13:19 UTC (permalink / raw)
To: Jose Almeida; +Cc: Linuxppc-embedded
Hi, Jose!
Jose Almeida schrieb:
> 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 would be interested, however cannot spend time right now to work
on that subject.
> I am wondering if someone have already tryed this PQ3 feature ?
> I guess this would require some kind of hook in the kernel ...
Just some random bits I found in the web:
http://developer.apple.com/documentation/Hardware/DeviceManagers/pci_srvcs/pci_cards_drivers/PCI_BOOK.250.html
The Interesting part is:
"Thus, the address swizzle is completely transparent to software."
So, I would just try to setup some memory mapping and turn on little endian
mode to access that area... MMMV. Just a guess.
Regards,
--
Clemens Koller
__________________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Straße 45/1
Linhof Werksgelände
D-81379 München
Tel.089-741518-50
Fax 089-741518-19
http://www.anagramm-technology.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: little endian page mapping on PQ3
2007-08-24 13:08 ` Jose Almeida
@ 2007-08-24 15:49 ` David Hawkins
0 siblings, 0 replies; 5+ messages in thread
From: David Hawkins @ 2007-08-24 15:49 UTC (permalink / raw)
To: Jose Almeida; +Cc: Joyeau Sylvain, Linuxppc-embedded
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-24 15:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-24 7:59 little endian page mapping on PQ3 Jose Almeida
2007-08-24 13:19 ` Clemens Koller
-- strict thread matches above, loose matches on Subject: below --
2007-08-24 11:40 Joyeau Sylvain
2007-08-24 13:08 ` Jose Almeida
2007-08-24 15:49 ` David Hawkins
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).