From 9df238a8aa1c6074f98280d9dfa08c4ea7e1ff86 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Tue, 14 May 2013 14:06:25 +0100 Subject: [PATCH] [romprefix] Fix incorrect pointer offset in undiloader.S Commit 2422647 ("[prefix] Allow prefix to specify an arbitrary maximum address for relocation") introduced a regression into the UNDI ROM loader by preserving an extra register on the stack without modifying the %sp-relative addresses used in the routine. Fix by correcting the %sp-relative addresses to allow for the extra preserved variable. Signed-off-by: Frediano Ziglio Signed-off-by: Michael Brown --- src/arch/i386/prefix/undiloader.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/i386/prefix/undiloader.S b/src/arch/i386/prefix/undiloader.S index ccdd816e..74bb5904 100644 --- a/src/arch/i386/prefix/undiloader.S +++ b/src/arch/i386/prefix/undiloader.S @@ -23,8 +23,8 @@ undiloader: popw %ds /* UNDI loader parameter structure address into %es:%di */ movw %sp, %bx - movw %ss:18(%bx), %di - movw %ss:20(%bx), %es + movw %ss:22(%bx), %di + movw %ss:24(%bx), %es /* Install to specified real-mode addresses */ pushw %di movw %es:12(%di), %bx