Re: Re: Generic VESA framebuffer driver and Video card BOOT?
From: Kendall Bennett <hidden>
Date: 2004-10-20 17:22:25
Also in:
lkml
Pavel Machek [off-list ref] wrote:
BTW, does this look like right way to POST VGA BIOS from real
mode? It is what we currently use... and it works on some
machines...
movw $0xb800, %ax
movw %ax,%fs
movw $0x0e00 + 'L', %fs:(0x10)What is this for?
cli
cld
# setup data segment
movw %cs, %ax
movw %ax, %ds # Make ds:0 point to wakeup_start
movw %ax, %ss
mov $(wakeup_stack - wakeup_code), %sp # Private stack is needed for ASUS board
movw $0x0e00 + 'S', %fs:(0x12)We have never needed to set up a private stack. What ASUS board was it that you had problems with and needed to do this for?
pushl $0 # Kill any dangerous flags
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). Regards, --- Kendall Bennett Chief Executive Officer SciTech Software, Inc. Phone: (530) 894 8400 http://www.scitechsoft.com ~ SciTech SNAP - The future of device driver technology! ~ ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl