RE: [Linux-fbdev-devel] Re: Generic VESA framebuffer driver and Video card BOOT?
flat view
From: Pallipadi, Venkatesh <hidden>
Date: 2004-10-21 22:36:46
Also in:
lkml
-----Original Message----- From: linux-kernel-owner@vger.kernel.orgquoted
pushl $0# Kill any dangerous flagsquoted
popfl movl real_magic - wakeup_code, %eax cmpl $0x12345678, %eax jne bogus_real_magic testl $1, video_flags - wakeup_code jz 1f lcall $0xc000,$3The call to 0xC000:0x0003 is the entry point to POST the card. However for PCI cards you need to make sure that AX is loaded with the bus, slot and function for the card that is being POST'ed. It will pass this value to the PCI BIOS Int 0x1A functions in order to find itself, so if this is not set many BIOS'es will not work. The rest of the code you have above seems superfluous to me as we have never needed to do that. Then again we boot the card using the BIOS emulator, which is different because it runs within a protected machine state. Have you taken a look at the X.org code? They have code in there to POST the video card also (either using vm86() or the BIOS emulator).
I have done some experiments with this video post stuff. I think this should be done using x86 emulator rather than doing in real mode. The reason being, with an userlevel emulator we can call it at different times during resume. The current real mode videopost does it before the driver has restored the PCI config space. Some systems (mostly the ones with Radeon card) requires this to be done after PCI config space is restored. With a userspace emulator, we can call it at various places during the driver restore. I have seen the SciTech's x86 emulator in X.org. I could seperate it out from X into a stand alone application that does x86 emulation. I use it to get the video back on my laptop (which has radeon card), by calling this user level emulator using usermodehelper call. I hope we will have x86 emulator sitting in a standard place in userspace. That way we can use it in driver restore and solve the S3 video restore problem in a more generic way. Thanks, Venki