From: Etienne Lorrain <etienne_lorrain@yahoo.fr>
To: "H. Peter Anvin" <hpa@zytor.com>, Chuck Ebbert <cebbert@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: x86 setup code rewrite in C - revised
Date: Mon, 16 Jul 2007 15:31:44 +0200 (CEST) [thread overview]
Message-ID: <739046.56993.qm@web26915.mail.ukl.yahoo.com> (raw)
In-Reply-To: <4697FB6D.9060700@zytor.com>
--- "H. Peter Anvin" <hpa@zytor.com> wrote:
> >> - The VGA recalc has the same bug as the assembly version where a VGA
> >> write protected register is written (Overflow register) without setting
> >> the enable bit (see VGA docs).
>
> I dug into this, and it turns out you're incorrect. Both the assembly
> code and the C code are, in fact, 100% correct:
>
> The only instance of writing the vertical overflow register is this code
> in vga_set_480_scanlines():
>
> out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */
> out_idx(0x0b, crtc, 0x06); /* Vertical total */
> out_idx(0x3e, crtc, 0x07); /* Vertical overflow */
> out_idx(0xea, crtc, 0x10); /* Vertical sync start */
> out_idx(end, crtc, 0x12); /* Vertical display end */
> out_idx(0xe7, crtc, 0x15); /* Vertical blank start */
> out_idx(0x04, crtc, 0x16); /* Vertical blank end */
>
> Register 0x11 has the Protect (not enable!) bit in it, it is bit 7. As
> you can see, it is cleared (meaning writable) at the beginning of this
> sequence, and the fact that it's being done is even documented.
The only time I ever needed this "end line recalculation" was when the heigh in
graphic lines was not a multiple of the character heigh - i.e. 640x350 with 8x16
or 8x8 chars - some VGA adapters do not hide the bottom graphic lines.
The function vga_set_480_scanlines() is not called, and the protect bit is never
cleared - the video BIOS leaving those low index register protected.
The function vga_recalc_vertical() (or its assembler equivalent) is probably
perfectly called but because the protect bit is never cleared, the few graphic
line are displayed during the whole Linux text session...
I have myself never seen any other problems when the graphic heigh is a multiple
of the character heigh - tested on ~40 video boards.
Etienne.
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
next prev parent reply other threads:[~2007-07-16 13:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-13 14:25 Etienne Lorrain
2007-07-13 16:35 ` Chuck Ebbert
2007-07-13 16:51 ` H. Peter Anvin
2007-07-13 20:10 ` RE : " Etienne Lorrain
2007-07-13 21:19 ` H. Peter Anvin
2007-07-16 9:02 ` RE : " Etienne Lorrain
2007-07-16 9:15 ` H. Peter Anvin
2007-07-16 10:21 ` Etienne Lorrain
2007-07-13 23:09 ` RE : " Linus Torvalds
2007-07-13 22:23 ` H. Peter Anvin
2007-07-16 13:31 ` Etienne Lorrain [this message]
2007-07-16 17:35 ` H. Peter Anvin
-- strict thread matches above, loose matches on Subject: below --
2007-07-13 14:42 Etienne Lorrain
2007-07-12 13:18 Etienne Lorrain
2007-07-11 19:18 H. Peter Anvin
2007-07-11 20:08 ` Jeff Garzik
2007-07-11 20:29 ` H. Peter Anvin
2007-07-12 17:24 ` Linus Torvalds
2007-07-12 17:30 ` Andrew Morton
2007-07-12 17:49 ` Linus Torvalds
2007-07-12 19:38 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=739046.56993.qm@web26915.mail.ukl.yahoo.com \
--to=etienne_lorrain@yahoo.fr \
--cc=cebbert@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®