From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO1d1-0000GL-TR for qemu-devel@nongnu.org; Fri, 15 Jul 2016 07:50:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO1cx-0000uV-TW for qemu-devel@nongnu.org; Fri, 15 Jul 2016 07:49:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO1cx-0000u0-Nd for qemu-devel@nongnu.org; Fri, 15 Jul 2016 07:49:55 -0400 Message-ID: <1468583389.22036.40.camel@redhat.com> From: Gerd Hoffmann Date: Fri, 15 Jul 2016 13:49:49 +0200 In-Reply-To: <20160714161529.GA28523@morn.lan> References: <1468486382-21609-1-git-send-email-kraxel@redhat.com> <1468486382-21609-6-git-send-email-kraxel@redhat.com> <20160714161529.GA28523@morn.lan> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH 5/5] [wip] sercon: initial split-output implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: seabios@seabios.org, qemu-devel@nongnu.org Hi, > I'm okay with the cut-and-paste. But, another option would be to use > the iretw at the end of the existing irqentry_extrastack to implement > the ljmpw into the main vgabios. Something like (totally untested): >=20 > entry_10_hooked: > pushfw // Setup for iretw in irqentry_ar= g > pushl %cs:sercon_int10_hook_resume >=20 > pushl $handle_10 > #if CONFIG_ENTRY_EXTRASTACK > jmp irqentry_arg_extrastack > #else > jmp irqentry_arg > #endif Good idea, I'll try it. > Separately, have you considered choosing a separate entry point for > entry_10_hooked. That is, changing the above pushl to > $handle_sercon_hooked and introducing that function in sercon.c. It > seems it would reduce a number of "if (!sercon_splitmode())" checks in > the main code, as handle_sercon_hooked() could just use a smaller > switch statement and ignore requests it doesn't need to support. Makes sense indeed. All functions which only return information are not needed in the splitmode case. > Finally, one high level observation is that we know there are a number > of quirks in various vgabios emulators. For example, we know some > emulators don't handle certain 32bit instructions when in 16bit mode > (hence scripts/vgafixup.py), we know some versions of Windows use an > emulator that doesn't like some stack relative instructions (hence the > vgabios is compiled without -fomit-frame-pointer), and we know Windows > Vista doesn't like the extra stack in high ram (the skifree bug). Any > thoughts on what happens with these quirks if the main seabios code > hooks int10? Good question. Do the emulators (both win, xorg) use the int10 vector set by seabios in the first place? Or go they load the vgabios and run it, including the initialization, and use whatever entry point the init code sets up? I suspect it is the latter. But needs investigation and testing. /me places the item on the todo list. Also a serial console for windows guests isn't that useful, so I wouldn't worry too much about windows emulator issues. cheers, Gerd