On Thursday 09 June 2005 13:04, Tim Bird wrote: > Hi all, > > I'm trying to use virt_to_phys() to find the physical address > of some kernel RAM. (This is an on ARM OSK board). > It's not working as I expected: > > membase = kmalloc(DEBUG_MEM_LENGTH, GFP_ATOMIC); > physbase = virt_to_phys(membase); > printk("membase=0x%p\n", membase); > printk("physbase=0x%lu\n", physbase); > > Gives me: > membase=0xc1c8c000 > physbase=0x298369024 Are you aware you printed your physbase value in decimal? > physbase isn't in the range of real physical memory on my > machine. (I'm only interested in the first page of the > allocation, so I don't care if subsequent pages are > not physically contiguous.) -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/