Skip to content

Commit

Permalink
[x86 setup] The current display page is returned in %bh, not %bl
Browse files Browse the repository at this point in the history
The current display page is an 8-bit number, even though struct
screen_info gives it a 16-bit number.  The number is returned in %bh,
so it needs to be >> 8 before storing.

Special thanks to Jeff Chua for detailed bug reporting.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
H. Peter Anvin committed Aug 14, 2007
1 parent 28e8351 commit 362cea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/i386/boot/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static void store_video_mode(void)

/* Not all BIOSes are clean with respect to the top bit */
boot_params.screen_info.orig_video_mode = ax & 0x7f;
boot_params.screen_info.orig_video_page = page;
boot_params.screen_info.orig_video_page = page >> 8;
}

/*
Expand Down

0 comments on commit 362cea3

Please sign in to comment.