qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] x86 Multiboot support (extended)


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH] x86 Multiboot support (extended)
Date: Thu, 31 Jan 2008 11:19:29 +0100


On Jan 31, 2008, at 10:58 AM, Kevin Wolf wrote:

Hi,

I like this idea. When I just tried to load my multiboot kernel it
failed, though, because of the following piece of code:

+ // XXX: multiboot header may be within the first 8192 bytes, but header
+    //      is only the first 1024
+
+    // Ok, let's see if it is a multiboot image
+    for(i=0; i<(256 - 12); i+=4) { // the header is 12x32bit long
+        if(ldl_p(header+i) == 0x1BADB002) {

I wonder if there is any reason why you didn't just replace the 1024 by
8192 in load_linux but added an XXX. Would this cause any problems I
missed? With this change and replacing 256 by 8192 in the above code it
works for my kernel, too.

The main reason behind it was that I did not want to change currently running code if not necessary. If nobody complains about it, I will gladly make the Linux loader load 8kb.



Anyway, I think the for condition should be i < 4 * (256 - 12), even
without changing the 1024.

Uhm. Yes. This looks wrong ;-). Thanks for the catch.

Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]