Re: virt_to_phys - what am I doing wrong?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arjan van de Ven wrote:
> On Thu, 2005-06-09 at 10:04 -0700, Tim Bird wrote:
>
>>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:
>  
> what do you wan to do with the "physical" address? You can't use it for
> letting any device do DMA to it or so for example; you HAVE to use the
> dma mapping for that instead.
> 
It's a little embarrassing to continue the thread, since
I made such a stupid mistake with the printf format
option.  However, since you ask...

I'm trying to debug a problem with the kill-printk.patch
on the OSK board.  With printk turned off, the serial
console gets screwed up during booting.  With printk
turned on, the serial console is OK.  I wrote a routine
to output stuff to the serial port even with printk's
turned off, but once the serial port is initialized by
the regular driver, the interaction between my routine
and the serial console causes its own set of problems.

I loaned my jtag device to a colleague, there are no
other serial ports on the device, and there's no video
output, so essentially I'm flying blind (but only at
the exact moment I need the debug output ;-).

I can output stuff before the kernel loads (including
dumping RAM content before the page tables are set
up), so I'm trying to stuff some debug info into
memory, and print it out from the decompression code
(pre-kernel execution) on the next machine restart (warm).
For this, I need the physical address of the RAM where the
debug information was put.

Does this sound sane or is there an easier way?

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux