[uClinux-dev] "wrong zone alignment" warning and &_end_kernel in 2.4.20

Bernard Leach leachbj at bouncycastle.org
Wed Mar 12 05:59:24 EST 2003


Hi Marcus,

I had the same problem when PAGE_OFFSET was (incorrectly :) set to
_end_kernel.  It should really be set to the start of your ram.  The
kernel automatically reserves the kernel address space during startup.

If you have other "special" regions of memory to reserve take a look at
reserve_node_zero in arch/armnommu/mm/init.c.  I use that function to
reserve the first 8k for remapping to 0x0 for the interrupt vectors &
handlers.

cheers,
bern.

On Wed, 2003-03-12 at 11:50, Markus Pietrek wrote:
> Hi folks,
> 
> when booting uClinux-2.4.20 on a NetARM+50 or NS7520 (armnommu) I receive the 
> kernel warning "BUG: wrong zone alignment, it will crash". The code for this 
> warning is in mmnommu/page_alloc.c
> 
> void __init free_area_init_core(int nid, pg_data_t *pgdat, struct page **gmap,
> 	unsigned long *zones_size, unsigned long zone_start_paddr, 
> 	unsigned long *zholes_size, struct page *lmem_map)
> ...
> 		if ((zone_start_paddr >> PAGE_SHIFT) & (zone_required_alignment-1))
> 			printk("BUG: wrong zone alignment, it will crash %x %x %x %x\n", 
> zone_start_paddr, PAGE_SHIFT, zone_required_alignment, MAX_ORDER );
> ...
> 
> The zone 1 is starting directly after the kernel, which is located at 0x0.
> 
> zone_start_paddr == PAGE_OFFSET == &_end_kernel == 1376256
> PAGE_SHIFT == 12
> MAX_ORDER == 10
> zone_required_alignment == 0x1ff
> 
> I don't understand the reason of this function. But to get rid of this message 
> I would have to align _end_kernel at a 2MB boundary, wasting 600kb memory. 
> Are there other, better ways?
> 
> Best regards,




More information about the uClinux-dev mailing list