Newbie: allocating aligned physically-contiguous memory?



My apologies for the dumb Linux question; I usually live in the comp.arch.fpga world.

I'm using a custom architecture (2.4.26 kernel on PPC 405 inside an XC2VP30 FPGA) that can work with a framebuffer aligned on any multiple of 0x00200000.

Here's what I need to do:
1. Allocate block of 0x00200000 physically contiguous bytes from memory.
2. Guarantee the block is aligned on a physical 0x00200000 boundary.
3. Make the block visible from user space, if possible.

It would be nice to just kmalloc(0x00200000,GFP_USER), but that wouldn't give me any way to enforce the physical alignment requirement. I'm sure someone here has done this kind of thing a million times. Any ideas? Anything I should be reading up on?
.



Relevant Pages

  • Re: Help port swsusp to ppc.
    ... > Besides saving the CPU state, the code copies the original kernel back. ... I see personally _NO_ reason to ... at least I won't let a PPC ...
    (Linux-Kernel)
  • Re: [Kgdb-bugreport] [PATCH] Kill kgdb_serial
    ... >> field and wants to send just one binary kernel to all locations. ... > interface parameters during a build doesn't cause any problems. ... With an arch serial driver you get the possibility of ... > many varieties of ppc. ...
    (Linux-Kernel)
  • Re: [Kgdb-bugreport] [PATCH] Kill kgdb_serial
    ... If one builds a different kernel for each test machine, ... With an arch serial driver you get the possibility of ... >> so many varieties of ppc. ... We can still have one single hardcoded function pointer for ppc and manage the ...
    (Linux-Kernel)
  • Re: [PATCH v2] acpi: Fix regression where _PPC is not read at boot even when ignore_ppc=0
    ... to have a static table of machines. ... which right now does not read _PPC at boot time regardless of the ... BIOS wants the kernel to do. ... which leaves the ignore_ppc toggle in place for T60 ...
    (Linux-Kernel)
  • Re: [Kgdb-bugreport] [PATCH] Kill kgdb_serial
    ... If one builds a different kernel for each test machine, ... > serial from point A to B and eth from point ... eth options are on the command line then its is serial. ... >>many varieties of ppc. ...
    (Linux-Kernel)