you can do this if you know exactly what you are doing, please follow below steps: 1. ask yourself why you need this fix map to a device io address? if you only want to get a fix formula to calculate device virutal address from physical address, you can call ioremap(), and store the return value into a global variable. 2. ask the architecturer of you platform provider, or you search into source code by yourself, make sure whether the virtual address range 0xF0008000 to 0xF0008FFF has not been mapped yet, this is very important because kernel region cannot be mapped twice. othersie you will get warning from log and without remap this region finally. 3. suppose step 2 is ok, the region is not mapped, then call function ioremap_page_range(0xF0008000, 0xF0009000, 0x80008000, pgprot); kernel will map virtual address [0xF0008000~0xF0009000] to physical address [0x80008000~0x80009000] . Note! you must make sure this region has not been mapped before on your platform. as i guess, they are 99% mapped already :=)
you can try to do it as below: 1. find the definition of VMALLOC_END, define it to be 0xD0800000, the original value will be something like 0xF0000000: #define VMALLOC_END 0xD0800000 2. pass in parameter from u-boot to kernel, set "vmalloc=128M" 3. now you should get result from boot log as below: [ 0.000000] vmalloc : 0xc8800000 - 0xd0800000 ( 128 MB) [ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) 4. although you did what you want to do, i am sure that you don't know what you really want to do because these steps make no sense. keep in mind that vmalloc region, which is from VMALLOC_START to VMALLOC_END, does not use direct memory map.
|
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies