Deprecated: Assigning the return value of new by reference is deprecated in /var/www/psdevWiki/inc/parserutils.php on line 161

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/psdevWiki/inc/parserutils.php on line 164

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/psdevWiki/inc/parserutils.php on line 294

Deprecated: Function split() is deprecated in /var/www/psdevWiki/inc/auth.php on line 97

Warning: Cannot modify header information - headers already sent by (output started at /var/www/psdevWiki/inc/parserutils.php:161) in /var/www/psdevWiki/inc/auth.php on line 180

Deprecated: Function split() is deprecated in /var/www/psdevWiki/inc/common.php on line 552

Warning: Cannot modify header information - headers already sent by (output started at /var/www/psdevWiki/inc/parserutils.php:161) in /var/www/psdevWiki/inc/actions.php on line 71
ps3:kernel_call:ioremap [psDevWiki]
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PST/-8.0/no DST' instead in /var/www/psdevWiki/inc/template.php on line 154
 

Linux Kernel helper functions - ioremap family

ioremap - map bus memory into CPU space @address: bus address of the memory @size: size of the resource to map

ioremap performs a platform specific sequence of operations to make bus memory CPU accessible via the readb/readw/readl/writeb/writew/writel functions and the other mmio helpers. The returned address is not guaranteed to be usable directly as a virtual address.

PS3 Note: The PS3 Linux Kernel does in fact use the returned address directly as a virtual address, so there appears no need to limit oneself to the read*/write* functions as suggested here.

There are a few variations of it:

function declaration description
ioremap
void __iomem *ioremap(phys_addr_t address, 
                      unsigned long size); 
is the standard one and provides non-cacheable guarded mappings and can be hooked by the platform via ppc_md
ioremap_flags
void __iomem *ioremap_flags(phys_addr_t address, 
                            unsigned long size,
		            unsigned long flags); 
allows to specify the page flags as an argument and can also be hooked by the platform via ppc_md
ioremap_nocache
 #define ioremap_nocache(addr, size)	ioremap((addr), (size)) 
is identical to ioremap
iounmap
 void iounmap(volatile void __iomem *addr); 
undoes such a mapping and can be hooked

It would be very useful to work out how these functions work, as they must call some operation in the hypervisor to map the memory, and if so that may give a way to map arbitrary memory on the otherside of the hypervisor (unlikely but possible).

 

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PST/-8.0/no DST' instead in /var/www/psdevWiki/inc/template.php on line 523
ps3/kernel_call/ioremap.txt · Last modified: 2008/05/15 00:07
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki