How to allocate 24MB memory in kernel space
I'm new in the stuff of kernel programming. I want to write a kernel module in which I have to allocate a continious memory of 24MB. And I need the physical start address of these area to give it to another program.
I already tried diffrent things but nothing solved my problem.
1. to allocate with kmalloc worked fine but then I heard about the 128kB boarder.
2. __get_free_pages an __get_dma_pages failed in kernel exeptions.
3. I also tried to give the kernel the parameter mem=1000M at boottime to reserve the last 24MB for my module.
But when I tried to remap the memory in kernelspace with ioremap( 0x3E800000 /* 1000MB */, 0x1800000 /* 24MB */) to get the physical start address of these area I get a kernel exeption again.
Can anyone help me?
Thanks to everyone who spend time on my problem.