Date: Tue, 10 Jan 2012 10:52:58 GMT From: Yaniv <ykamay@ccc.net.il> To: freebsd-gnats-submit@FreeBSD.org Subject: i386/163985: Incorrect operand size in boot0 Message-ID: <201201101052.q0AAqwbh037321@red.freebsd.org> Resent-Message-ID: <201201101100.q0AB0VS2000850@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 163985
>Category: i386
>Synopsis: Incorrect operand size in boot0
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-i386
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jan 10 11:00:31 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Yaniv
>Release: 8.2
>Organization:
>Environment:
>Description:
In boot0.S, decw instruction is used on the drive number that was received from the loader. boot0 push the loader dx value, at early stage, and restore it later into ax
popw %ax # Drive number
subb $0x80-0x1,%al # Does next
cmpb NHRDRV,%al # drive exist? (from BIOS?)
jb print_drive # Yes
/*
* If this is the only drive, don't display it as an option.
*/
decw %ax # Already drive 0?
jz print_prompt # Yes
According to my knowledge, dh is undefined during the jump to boot0-start so the result of "decw %ax" is undefined.
The result is that an incorrect boot option is displayed.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201101052.q0AAqwbh037321>
