From c325addac59fc053fc8e81fa36f4f33eed669b59 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 30 Jul 2011 20:34:55 +0000 Subject: [PATCH] [ISOBOOT] Use a high segment and 0 offset when loading setupldr. This fixes problems with an award bios. Thanks to Igor Paliychuk (igorko) for his help and patience burning / testing dozens of isos Fixes boot regression of cmake builds on real hw. svn path=/trunk/; revision=53003 --- reactos/boot/freeldr/bootsect/isoboot.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/reactos/boot/freeldr/bootsect/isoboot.S b/reactos/boot/freeldr/bootsect/isoboot.S index 7feb495c179..979c35a1f00 100644 --- a/reactos/boot/freeldr/bootsect/isoboot.S +++ b/reactos/boot/freeldr/bootsect/isoboot.S @@ -360,10 +360,13 @@ get_fs_structures: call crlf #endif - mov bx, FREELDR_BASE // bx = load address +// use high segment, as some bios can fail, when offset is too big + mov bx, FREELDR_BASE / 16 // es = load segment + mov es, bx + xor ebx, ebx // bx = load offset mov si, di // restore file pointer - mov cx, HEX(0FFFF) // load the whole file - call getfssec // get the whole file + mov cx, HEX(0FFFF) // load the whole file + call getfssec // get the whole file #ifdef DEBUG_MESSAGES mov si, offset startldr_msg