From e7c4ef5ed4a1b14c7514367a5a95e1d9c9e1f090 Mon Sep 17 00:00:00 2001 From: rsun3 Date: Fri, 13 Jan 2012 06:29:44 +0000 Subject: DuetPkg BootSector: fix bugs in .S files so that 32-bit and 64-bit DUET can boot to Shell with boot sector binaries built by GCC. There is also a bug in bs32.asm/bs32.S that the space between the code and the 0xAA55 ending signature is not enough to hold the 2 debug strings. It is fixed by shortening the strings. Signed-off-by: rsun3 Reviewed-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12930 6f19259b-4bc3-4df7-8a09-765794883524 --- DuetPkg/BootSector/bs32.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'DuetPkg/BootSector/bs32.asm') diff --git a/DuetPkg/BootSector/bs32.asm b/DuetPkg/BootSector/bs32.asm index f26668982e..d23ba071b2 100644 --- a/DuetPkg/BootSector/bs32.asm +++ b/DuetPkg/BootSector/bs32.asm @@ -1,6 +1,6 @@ ;------------------------------------------------------------------------------ ;* -;* Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.
+;* Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
;* This program and the accompanying materials ;* are licensed and made available under the terms and conditions of the BSD License ;* which accompanies this distribution. The full text of the license may be found at @@ -78,7 +78,7 @@ BootSectorEntryPoint: ; **************************************************************************** ; Start Print ; **************************************************************************** - lea si, cs:[StartString] + mov si, offset StartString call PrintString ; **************************************************************************** @@ -206,7 +206,7 @@ PrintString: mov es,ax mov ax, 07c0h mov ds, ax - mov cx, 7 + mov cx, 6 mov di, 160 rep movsw ret @@ -280,15 +280,15 @@ NotFoundAll: jne FoundEFILDR BadBootSector: DiskError: - lea si, cs:[ErrorString] + mov si, offset ErrorString call PrintString Halt: jmp Halt StartString: - db 'B', 0ch, 'S', 0ch, 't', 0ch, 'a', 0ch, 'r', 0ch, 't', 0ch, '!', 0ch + db 'B', 0ch, 'S', 0ch, 't', 0ch, 'a', 0ch, 'r', 0ch, 't', 0ch ErrorString: - db 'B', 0ch, 'E', 0ch, 'r', 0ch, 'r', 0ch, 'o', 0ch, 'r', 0ch, '!', 0ch + db 'B', 0ch, 'E', 0ch, 'r', 0ch, 'r', 0ch, 'o', 0ch, 'r', 0ch ; **************************************************************************** ; LBA Offset for BootSector, need patched by tool for HD boot. -- cgit v1.2.3