Mapping Physical Memory To Kernel Virtual

Mapping Physical Memory To Kernel Virtual

Post by John Toltes » Thu, 24 Oct 1996 04:00:00



Hi

I am writing a serial device driver for a board that uses dual-ported
RAM.

I am looking for a kernel call that maps physical memory to kernel
virtual memory.

( In System V, the call is phystokv() )

Does anyone know the corresponding Linux call?

By chance, I decided to directly do after the physical memory address (
in this case 0xD0000 ) and it
worked, but I am sure this is not the correct method.

Any help would be appreciated.

John

John Toltesi
www.connecttech.com

 
 
 

Mapping Physical Memory To Kernel Virtual

Post by Michael Hohmu » Fri, 25 Oct 1996 04:00:00




Quote:> I am looking for a kernel call that maps physical memory to kernel
> virtual memory.

> ( In System V, the call is phystokv() )

> Does anyone know the corresponding Linux call?

vremap().

Michael
--

WWW:   http://www.inf.tu-dresden.de/~mh1/

 
 
 

Mapping Physical Memory To Kernel Virtual

Post by Itai Nahsho » Sat, 26 Oct 1996 04:00:00



> Hi

> I am writing a serial device driver for a board that uses dual-ported
> RAM.

> I am looking for a kernel call that maps physical memory to kernel
> virtual memory.

I know that I can open /dev/mem and mmap the svga video frame buffer
to my process address space. That's the way XF86DGA works.
You need superuser permitions.

The Kernel source has some comment about disabling cache for
high device addresses.

Itai
--

 
 
 

Mapping Physical Memory To Kernel Virtual

Post by Markus Gutschk » Sat, 26 Oct 1996 04:00:00



> By chance, I decided to directly do after the physical memory address (
> in this case 0xD0000 ) and it
> worked, but I am sure this is not the correct method.

You might want to take a look at the file
linux/Documentation/IO-mapping.txt in recent 2.1.x kernel releases. It
contains some information on accessing physical addresses from kernel
space.

Markus