LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Memory Mapping (same physical address = virtual address) (https://www.linuxquestions.org/questions/linux-kernel-70/memory-mapping-same-physical-address-%3D-virtual-address-456820/)

skd.tech 06-21-2006 01:09 AM

Memory Mapping (same physical address = virtual address)
 
Hi All,
Need to disable MMU in Linux. It needs a section of memory where virutal address=physical address in the memory mapping table. Is there any method to do the same dynamically(means to map a section of physical addresses to the same virutal addresses)

Any hints or pointers would be of great help

-skd

sundialsvcs 06-22-2006 11:29 AM

Well, you can't disable the MMU.

This is what we mainframers used to call a "V=R ('Virtual Equals Real') Region." (Also known as VEQR for those who don't like punctuation, or "page fixing.")

If Linux supports this, and I do not recall, then it will certainly remain a very difficult thing. There could be, for example, issues relating to where in the memory-space this buffer had to be: recall that the virtual address-space is segmented into "kernel" and "user" portions...

Is it not possible to design your program to permit the buffer to be (virtually) "anywhere," and to obtain the necessary addressing by means of offsets to that pointer? A simple #define macro could make the translation invisible to source-code readers.

skd.tech 06-23-2006 04:47 AM

MMU Disable
 
Hi, Thanks for the response.
My reqmnt is specific to the processor. I am doing some thing related to the system freq and i need to switch of the MMU for my implementation. I am doing the same with a kernel driver (assembly code is used for the actual cpu specific task)

Could you please provide any mech to do a 1:1 mapping dynamically inside my driver?

Thanks
Sanil

sundialsvcs 06-23-2006 08:16 AM

I know that you can't turn the MMU off. Perhaps you should explain more fully just what it is you are trying to do, and from what context (kernel, user, or both).

Some of the kernel memory space might already be mapped 1:1, such as memory-mapped I/O areas.

skd.tech 06-26-2006 05:10 AM

MMU Disable
 
Quote:

Originally Posted by sundialsvcs
I know that you can't turn the MMU off. Perhaps you should explain more fully just what it is you are trying to do, and from what context (kernel, user, or both).

Some of the kernel memory space might already be mapped 1:1, such as memory-mapped I/O areas.


Actually in our kernel there is no space mapped 1:1. I need to do the same either from the kernel boot code or dynamically from my driver. Could you give any hints for the same?

sundialsvcs 06-26-2006 06:42 AM

Please explain, in detail, what you are trying to accomplish ... not "what your present intended path to get there" is, but "where do you intend to go with this?"

You're interfacing with .. what?

Your code needs to run .. when?

How exactly is this requirement so gosh-darned different from any other device driver whose code already exists in abundance?

wini_g 06-27-2006 07:41 PM

What about ucLinux : http://www.uclinux.org/ ?

rick.2g 07-24-2006 11:13 PM

looks like wini_g got it - uclinux has some options to run without mmu - but it's a complete rewrite of the mm layer - not trivial. You're far better off working off the uclinux base than trying to "switch the mmu off" in this case.
The thing with this is that uclinux is primarily intended for embedded devices. Is that what you're trying to do? What arch are you on?


All times are GMT -5. The time now is 10:06 AM.