From: Erik M. <er...@us...> - 2003-02-07 02:46:48
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv17633/src/blob Modified Files: linux.c Log Message: Fix the physical ramdisk location bug by issueing an ATAG_INITRD2 node. The comment tells the whole story. Index: linux.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/linux.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- linux.c 24 Jan 2003 09:31:42 -0000 1.16 +++ linux.c 7 Feb 2003 02:46:44 -0000 1.17 @@ -179,6 +179,23 @@ params->u.initrd.size = RAMDISK_FLASH_LEN; params = tag_next(params); + + /* Uhoh, we got it all wrong. ATAG_INITRD takes a *virtual* address + * not a physical address, so it nicely breaks on PXA machines. + * This was fixed in linux-2.4.18-rmk6, which added the + * ATAG_INITRD2 node. This one really takes a physical address. + * Pre 2.4.18-rmk6 SA11x0 kernels will just ignore this node and + * skip over it. Post 2.4.18-rmk6 kernels will parse both the + * INITRD and the INITRD2 node, but the latter will supersede + * the former and everything will be all right. -- Erik + */ + params->hdr.tag = ATAG_INITRD2; + params->hdr.size = tag_size(tag_initrd); + + params->u.initrd.start = RAMDISK_RAM_BASE; + params->u.initrd.size = RAMDISK_FLASH_LEN; + + params = tag_next(params); } |