[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: bootpimage and tagged list
From:       "Paul Chitescu" <Paul.Chitescu () IMC-Group ! org>
Date:       2003-11-18 12:53:10
[Download RAW message or body]

----- Original Message -----
From: "Russell King - ARM Linux" <linux@arm.linux.org.uk>
To: <linux-arm-kernel@lists.arm.linux.org.uk>
Sent: Tuesday, November 18, 2003 14:15
Subject: Re: bootpimage and tagged list


> On Tue, Nov 18, 2003 at 12:11:11PM +0000, Yves Rutschle wrote:
> > Then on the (slightly) newer 2.4.19-rmk3-ds2, problems
> > arose; it turned out that the kernel wasn't parsing the
> > tagged list properly, which eventually could be fixed with:
>
> Wrong fix.
>
> The size is specifically in units of words to ensure that it is
> always word aligned.  Change this and you bugger up all the boot
> loaders which are currently in existence.

I don't know about the newer kernel versions (didn't have time to upgrade
that) but in 2.4.17-rmk7 there's a related bug in the creation of the tagged
list (in bootp/init.S) when not provided by the bootloader.

--- ./bootp/init.S.orig       Thu Oct 11 19:04:57 2001
+++ ./bootp/init.S    Tue Jun 17 16:42:28 2003
@@ -52,13 +52,13 @@

                ldr     r9, [r8, #4]            @ get first tag
                teq     r9, r4
-               bne     taglist                 @ ok, we have a tag list
+               beq     taglist                 @ ok, we have a tag list

 /*
- * We didn't find a valid tag list - create one.
+ * We didn't find a valid tag list - create one with only an invalid
ATAG_CORE.
  */
                str     r4, [r8, #4]
-               mov     r4, #8
+               mov     r4, #2
                str     r4, [r8, #0]
                mov     r4, #0
                str     r4, [r8, #8]
@@ -69,11 +69,12 @@
  * tag takes precidence.
  */
 taglist:       ldr     r9, [r8, #0]            @ tag length
+               mov     r9, r9, LSL #2          @ convert to offset
                teq     r9, #0                  @ last tag?
                addne   r8, r8, r9
                bne     taglist

-               mov     r4, #16                 @ length of initrd tag
+               mov     r4, #4                  @ length of initrd tag
                mov     r9, #0                  @ end of tag list terminator
                stmia   r8, {r4, r5, r6, r7, r9}
                mov     pc, r12                 @ call kernel

--
 Paul Chitescu
 pchitescu@null.ro   http://pchitescu.null.ro/   ICQ:22641673
 Any spammers will be painfully squeezed into /dev/null


["arm-bootp-taglist.patch.gz" (application/x-gzip)]

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic