Skip to contentSkip to conversation

Placing a kernel module at a known fixed address

DISCUSSION linux-os (Dick Johnson) 1 participant 1 message Sep 23, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · Sreeni

Hi,

I have a kernel module on Montavista Linux (ARM-MontavistaLinux-XIP). My application demands me placing/running this kernel module at a known fixed virtual/physical address. I can make this module a static one. For this I need the following -

Your application is therefore totally and completely broken by definition.

When you need to access certain physical offsets or bus addresses from user-space, we use mmap().

Quoted 3 lines

***** Placing text,data, heap, stack at a known fixed address *****

You can place your code and your data at some fixed (offset) by using different sections (i.e., .section .foo), then having the linker do the fixups. You CANNOT move the .text section or the .bss or the .data sections and have anything work. You also can't put the stack at some physical location because there are different stacks in use when your module is accessed (each caller has its own "kernel" stack).

Quoted 7 lines

May I know the possible ways of achieving this. I have tried playing around arch/arm/vmlinux.lds linker script file. But when i try to force the linker to place my module at a particular address, the System.map shows me the correct address but the kernel image size is getting very large (when add 10 words of my module, kernel image size is getting increased by 800KB).

Quoted 6 lines

Any help in this is highly appreciated.

Thanks
Sreeni

Cheers,
Dick Johnson
Penguin : Linux version 2.6.13 on an i686 machine (5589.55 BogoMips). Warning : 98.36% of all statistics are fiction.

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.