Re: [PATCH 6/7] setup.c: clean up initrd related code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 16 Oct 2006 10:03:13 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote:
> >  	end = (unsigned long)&_end;
> >  	tmp = PAGE_ALIGN(end) - sizeof(u32) * 2;
> >  	if (tmp < end)
> >  		tmp += PAGE_SIZE;
> >  
> 
> Any idea on what is this code for ?
> It seems that a minimum gap is needed betweend the end of kernel
> code and initrd but I don't see why...

Perhaps because current tools put initrd image at that place.

For example:

arch/mips/boot/addinitrd.c:92:
	loadaddr = ((SWAB(esecs[2].s_vaddr) + SWAB(esecs[2].s_size)
			+ MIPS_PAGE_SIZE-1) & ~MIPS_PAGE_MASK) - 8;
	if (loadaddr < (SWAB(esecs[2].s_vaddr) + SWAB(esecs[2].s_size)))
		loadaddr += MIPS_PAGE_SIZE;
	initrd_header[0] = SWAB(0x494E5244);
	initrd_header[1] = SWAB(st.st_size);

---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux