From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/2] multiboot: Fix module loading and setting of mmap.
Date: Mon, 30 Nov 2009 23:25:44 +0100 [thread overview]
Message-ID: <20091130222544.GA21068@os.inf.tu-dresden.de> (raw)
multiboot: Fix module loading and setting of mmap.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Acked-by: Alexander Graf <agraf@suse.de>
---
hw/pc.c | 2 +-
pc-bios/multiboot.bin | Bin 512 -> 1024 bytes
pc-bios/optionrom/multiboot.S | 5 ++++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 7c791c4..6bcfe1b 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -661,7 +661,7 @@ static int load_multiboot(void *fw_cfg,
/* append module data at the end of last module */
mb_kernel_data = qemu_realloc(mb_kernel_data,
- mh_load_addr - mb_mod_end);
+ mb_mod_end - mh_load_addr);
load_image(initrd_filename,
mb_kernel_data + mb_mod_start - mh_load_addr);
diff --git a/pc-bios/multiboot.bin b/pc-bios/multiboot.bin
index 59737c3c6798f83c1b35534d7865c79ba9ca3bc8..d7da6e04ad6d71d26f577d9d6a019719bcce8766 100644
GIT binary patch
delta 261
zcmXZVu}Z^G6vpv$F1I0cu#I9V4%gzY#MMa$cNeJ-(0mTo!A)Em=wfIHT=E32KEb6f
z2@WZAa%&f<xELrj&`k=OK!*b#{NR6l>Dz<rSAi>annbhA>QS4*9nc|err{)-{caFW
zkS-*`52Rlb!8dr0Vcx-T=_1W#lw+iR82s)bP(*Jwd4ZBNQf*NVi%LEaTeb=1pTyK@
z+^ns}PHl-)KRP1F^qtxdQnO1ag{ZR4?YeL3`o3c=dU$b3KcBZeG`LkZ4HHr0DDm)j
sLZm;BWd>vGLhU(Kng}aYiFF^Qsf$Z-!SNZpqTu*}quA%c_PYG^4_6gol>h($
delta 120
zcmZqRXkd{DUB#FdAZK`>??&3f6b8Mt#U_l$*-{u3C-RF+cFSckrZFB)>jcr=au!gI
z1>?lS%1k@BCmvOp_`zCCFO8p3EQ2v^2O|Rm1HaM%y|n*&7L1b}8FeS`W7J{=3f^Ow
R{EE?l$$@dQBGY6>MgYdxBLx5e
diff --git a/pc-bios/optionrom/multiboot.S b/pc-bios/optionrom/multiboot.S
index be5c9fc..9131837 100644
--- a/pc-bios/optionrom/multiboot.S
+++ b/pc-bios/optionrom/multiboot.S
@@ -62,6 +62,9 @@ run_multiboot:
add %eax, %ebx
movl %ebx, %gs:GS_GDT_DESC + 2
+ xor %eax, %eax
+ mov %eax, %es
+
/* Read the bootinfo struct into RAM */
read_fw_blob(FW_CFG_INITRD)
@@ -71,7 +74,7 @@ run_multiboot:
mov %ax, %fs
/* ES = mmap_addr */
- mov %eax, %fs:0x48
+ mov %fs:48, %eax
shr $4, %eax
mov %ax, %es
--
1.6.5.3
Adam
--
Adam adam@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
next reply other threads:[~2009-11-30 22:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 22:25 Adam Lackorzynski [this message]
2009-11-30 22:26 ` [Qemu-devel] [PATCH 2/2] multiboot: Support arbitrary number of modules Adam Lackorzynski
2009-12-01 6:51 ` Alexander Graf
2009-12-03 20:26 ` Anthony Liguori
2009-12-03 22:19 ` [Qemu-devel] [PATCH 1/2] " Adam Lackorzynski
2009-12-03 22:23 ` [Qemu-devel] [PATCH 2/2] multiboot: Separate multiboot loading into separate file Adam Lackorzynski
2009-12-03 23:20 ` Alexander Graf
2009-12-03 23:24 ` [Qemu-devel] Re: [PATCH 1/2] multiboot: Support arbitrary number of modules Anthony Liguori
2009-12-06 12:52 ` [Qemu-devel] " Adam Lackorzynski
2009-12-06 12:53 ` [Qemu-devel] [PATCH 2/2] multiboot: Separate multiboot loading into separate file Adam Lackorzynski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091130222544.GA21068@os.inf.tu-dresden.de \
--to=adam@os.inf.tu-dresden.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).