From 785378237506234df48de5ec327e6d3ff9adb059 Mon Sep 17 00:00:00 2001 From: Kjell Wooding Date: Tue, 8 Jan 2002 23:14:52 +0000 Subject: Fix 16 vs. 32-bit mismatch. Solves the most common MBR hang. This is from Mickey's tree. I inadvertently committed it without his permission last time. ok mickey@ --- sys/arch/i386/stand/mbr/mbr.S | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/arch/i386/stand/mbr/mbr.S b/sys/arch/i386/stand/mbr/mbr.S index 1a805d297a4..42ebaad6ebe 100644 --- a/sys/arch/i386/stand/mbr/mbr.S +++ b/sys/arch/i386/stand/mbr/mbr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: mbr.S,v 1.15 2001/12/15 21:28:45 mickey Exp $ */ +/* $OpenBSD: mbr.S,v 1.16 2002/01/08 23:14:51 kjell Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff and Tobias Weingartner @@ -61,8 +61,9 @@ #define DBGMSG(msg) \ movb $msg, %al; \ - data32; \ - call chr + /* call Lchr */; \ + .byte 0xe8; \ + .word Lchr - . - 2 #else /* !DEBUG */ #define DBGMSG(msg) #endif /* !DEBUG */ @@ -293,14 +294,15 @@ Lmessage: lodsb # load a byte into %al testb %al, %al jz 1f - data32 - call chr + /* call Lchr */ + .byte 0xe8 + .word Lchr - . - 2 jmp 1b # -# chr: write the error message in %ds:%si to console +# Lchr: write the error message in %ds:%si to console # -chr: +Lchr: pushl %eax #ifndef SERIAL @@ -319,7 +321,6 @@ chr: popl %edx #endif 1: popl %eax - data32 ret /* Info messages */ -- cgit v1.2.3