Re: [edk2] CSM and keyboard handling

2013-01-23 Thread Gerd Hoffmann
On 01/23/13 00:03, David Woodhouse wrote: > Without CSM support, I can reproduce the problem with the 'Press any key > to boot from CD or DVD...' message not being displayed, but *only* if I > start qemu with '-vga vmware'. With std, qxl or cirrus options, OVMF now > works fine. I think it has nati

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread Gerd Hoffmann
On 01/22/13 14:46, David Woodhouse wrote: > On Tue, 2013-01-22 at 09:51 +0100, Gerd Hoffmann wrote: >> >>> And we only invoke the iPXE ROM on the network card *after* the user has >>> seen the boot menu (without that option), so the user never gets to >>> choose that. >> >> You can build ipxe efi r

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread David Woodhouse
On Tue, 2013-01-22 at 17:29 +0100, Laszlo Ersek wrote: > > Does this mean the VGA BIOS / int 0x10 are available even to a UEFI OS > being booted directly from a UEFI boot option? > > If so, perhaps Jeff might want to retry installing windows 2008 R2sp1 on > OVMF (= a build that includes the SeaBI

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread David Woodhouse
On Tue, 2013-01-22 at 09:51 -0800, Andrew Fish wrote: > > So the history here is: ... > So some of the Intel Framework stuff did not make it into the PI > specification. Most notably all the CSM stuff. So that is why the edk2 > has the IntelFramworkPkg. > > So in general when I say EFI I mean t

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread Andrew Fish
On Jan 22, 2013, at 10:51 AM, David Woodhouse wrote: > On Tue, 2013-01-22 at 09:51 -0800, Andrew Fish wrote: >> Basically anything in generic EFI code that assumes a CSM (legacy >> BIOS) exists is a bug. > > Yes. But checking for the existence of it and using it *if* it's > available would not

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread David Woodhouse
On Tue, 2013-01-22 at 09:51 -0800, Andrew Fish wrote: > Basically anything in generic EFI code that assumes a CSM (legacy > BIOS) exists is a bug. Yes. But checking for the existence of it and using it *if* it's available would not be a bug. > Thus you would want to try an PXE boot EFI and if th

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread Andrew Fish
On Jan 22, 2013, at 5:46 AM, David Woodhouse wrote: > Thinking about netboot... sometimes I might be booting a legacy OS from > the network, and sometimes I might be booting an EFI-aware OS. Do I have > to use the *right* version of the PXE ROM, according to which OS it's > going to find on the

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread Laszlo Ersek
On 01/22/13 18:10, Andrew Fish wrote: >> Does this mean the VGA BIOS / int 0x10 are available even to a UEFI OS >> being booted directly from a UEFI boot option? >> > > NO! I fully agree that we should make no such promise (I vaguely recall one spec or another explicitly warning about this, ie.

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread David Woodhouse
On Tue, 2013-01-22 at 09:10 -0800, Andrew Fish wrote: > > Does this mean the VGA BIOS / int 0x10 are available even to a UEFI OS > > being booted directly from a UEFI boot option? > > > > NO! I think you're answering a different question to the one that was asked. We all know that a sane operat

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread David Woodhouse
On Tue, 2013-01-22 at 17:29 +0100, Laszlo Ersek wrote: > Does this mean the VGA BIOS / int 0x10 are available even to a UEFI OS > being booted directly from a UEFI boot option? I believe so, yes. OVMF even has a BiosVideo driver which will use the INT 10h services for display. > If so, perhaps Je

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread Andrew Fish
On Jan 22, 2013, at 8:29 AM, Laszlo Ersek wrote: > On 01/22/13 14:46, David Woodhouse wrote: > >> I have the CSM working reasonably well now for basic functionality. IDE >> disks and CDROMs show up in the EFI boot menu for booting in legacy >> mode, and if you choose them then SeaBIOS will boot

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread Laszlo Ersek
On 01/22/13 14:46, David Woodhouse wrote: > I have the CSM working reasonably well now for basic functionality. IDE > disks and CDROMs show up in the EFI boot menu for booting in legacy > mode, and if you choose them then SeaBIOS will boot what it's asked to > boot. Windows, Linux and Solaris 11

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread David Woodhouse
On Tue, 2013-01-22 at 09:51 +0100, Gerd Hoffmann wrote: > > > And we only invoke the iPXE ROM on the network card *after* the user has > > seen the boot menu (without that option), so the user never gets to > > choose that. > > You can build ipxe efi roms and use those, then netboot will show up

Re: [edk2] CSM and keyboard handling

2013-01-22 Thread Gerd Hoffmann
Hi, > And we only invoke the iPXE ROM on the network card *after* the user has > seen the boot menu (without that option), so the user never gets to > choose that. You can build ipxe efi roms and use those, then netboot will show up in the efi boot menu (although I didn't got that actually work

Re: [edk2] CSM and keyboard handling

2013-01-21 Thread Andrew Fish
On Jan 21, 2013, at 4:43 PM, David Woodhouse wrote: > On Tue, 2013-01-22 at 00:29 +, Li, Elvin wrote: >> You can make a try to implement such CSM16 to return back to EFI, >> GenericLegacyBoot() >> thus returns EFI_DEVICE_UNSUPPORTED, but it is BDS which initially >> calls "LegacyBios->Legacy

Re: [edk2] CSM and keyboard handling

2013-01-21 Thread David Woodhouse
On Tue, 2013-01-22 at 00:29 +, Li, Elvin wrote: > You can make a try to implement such CSM16 to return back to EFI, > GenericLegacyBoot() > thus returns EFI_DEVICE_UNSUPPORTED, but it is BDS which initially > calls "LegacyBios->LegacyBoot ()" to launch legacy boot, you can add > error handling

Re: [edk2] CSM and keyboard handling

2013-01-21 Thread Li, Elvin
I drivers and go to next boot options. Thanks Elvin -Original Message- From: David Woodhouse [mailto:dw...@infradead.org] Sent: Monday, January 21, 2013 12:00 PM To: Andrew Fish Cc: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] CSM and keyboard handling On Sun, 2013-01-20 a

Re: [edk2] CSM and keyboard handling

2013-01-20 Thread David Woodhouse
On Sun, 2013-01-20 at 19:54 -0800, Andrew Fish wrote: > The basic problem is as soon as the CSM calls something outside the > CSM code, then you don't know what kind of memory has been overwritten > or hardware written to. So the design was always it is not safe to > come back, as there is not a cl

Re: [edk2] CSM and keyboard handling

2013-01-20 Thread Andrew Fish
On Jan 20, 2013, at 5:53 PM, "Li, Elvin" wrote: > If it matters, bear in mind that most of my CSM calls for now are just > dummies that do almost nothing except return success. The only thing my > CSM really does is populate the interrupt vectors (INT 15h is needed > even to *return* from the Leg

Re: [edk2] CSM and keyboard handling

2013-01-20 Thread David Woodhouse
On Mon, 2013-01-21 at 01:53 +, Li, Elvin wrote: > [Li, Elvin] It is unlucky that CSM32 does not support returning back > from legacy boot at all. If legacy boot is failed, a full function of > CSM16 normally keep in legacy environment and INT19 handler indicates > “No bootable device -- insert

Re: [edk2] CSM and keyboard handling

2013-01-20 Thread Li, Elvin
David: Some comments are added below. Search [Li, Elvin]. Thanks Elvin -Original Message- From: David Woodhouse [mailto:dw...@infradead.org] Sent: Friday, January 18, 2013 8:44 PM To: Li, Elvin Cc: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] CSM and keyboard handling

Re: [edk2] CSM and keyboard handling

2013-01-18 Thread David Woodhouse
On Fri, 2013-01-18 at 02:59 +, Li, Elvin wrote: > Hi David: > CSM framework has mentioned the side effect that "all EFI > drivers are disconnected and must be reconnected for proper EFI > functioning". So if you call the legacy bios protocol interface > LegacyBiosShadowAllLegacyOproms w

Re: [edk2] CSM and keyboard handling

2013-01-17 Thread Li, Elvin
[edk2] CSM and keyboard handling In PciShadowRoms() in LegacyBiosDxe/LegacyPci.c we disconnect the EFI keyboard driver before attempting to invoke any option roms. After that point, what is supposed to provide keyboard service? There's a BiosKeyboard driver but that isn't enabled and

[edk2] CSM and keyboard handling

2013-01-17 Thread David Woodhouse
In PciShadowRoms() in LegacyBiosDxe/LegacyPci.c we disconnect the EFI keyboard driver before attempting to invoke any option roms. After that point, what is supposed to provide keyboard service? There's a BiosKeyboard driver but that isn't enabled and built in OVMF, even if CSM_ENABLE is defined.