kmalloc onto an aligned border
I have a way around this (see my previous thread), but I spent some time researching this to no avail, and I'm wondering if I missed something.
Is it possible to allocate memory in the kernel, such that it starts on a 2^n boundary (for some value of n)? I'm asking because I have a sub-processor which can do address translation using or/mask registers, so its internal memory has to start on a physical 2^n boundary (where 2^n > imagesize). Of course, the memory has to be physically contiguous as well. The allocation would happen near boot time so memory fragmentation would not be an issue. imagesize is large, so allocating 2^(n+1), and finding a boundary within isn't ideal.