linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kendall Bennett" <KendallB@scitechsoft.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org, linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [Linux-fbdev-devel] Re: Generic VESA framebuffer driver and Video card BOOT?
Date: Wed, 20 Oct 2004 11:44:51 -0700	[thread overview]
Message-ID: <41764FB3.29782.1B9A13F4@localhost> (raw)
In-Reply-To: <20041020173102.GB19940@elf.ucw.cz>

Pavel Machek <pavel@ucw.cz> 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?
> 
> Debugging.

Ok ;-)

> > >         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?
> 
> This is running at system resume, so it is not normal boot. Some
> ASUS Athlon 900MHz machine needed this; I'm no longer using this
> one. 

Ok. For the BIOS emulator the code always has it's own local stack anyway 
so I assume the problme you had may have been that the BIOS on the board 
was using too much stack space, so setting up a local stack that is big 
enough is probably a good idea.

> > >         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,$3
> > 
> > The 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.
> 
> Ok, this one is bad... ... In case of just one vga adapter, we
> should be able to store its parameters in some well-known place.
> For more than one adapter, we'll definitely need to run BIOS in
> emulator. 

Yes. If you are running this in real mode you don't have any option but 
to use the BIOS emulator. If you are running in protected mode and using 
vm86() style service, the 0xC0000 memory is just memory and can be re-
written. For instance on Linux you can map 0xC0000 into your process 
address space as copy on write, which then allows you to re-write the 
BIOS image for a secondary controller and then restore it when you are 
done.

But you will also need to make sure you can hook the Int 0x1A interrupt 
to hide any other graphics cards on the bus as some BIOS'es are pretty 
stupid and will find the first card on the bus that matches their 
Vendor/Device ID's. So if you have two of the same card, it will find th 
wrong one ;-)

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! ~



  reply	other threads:[~2004-10-21  9:11 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14 19:02 Generic VESA framebuffer driver and Video card BOOT? Kendall Bennett
2004-10-15  0:27 ` [Linux-fbdev-devel] " Antonino A. Daplas
2004-10-15 18:36   ` Kendall Bennett
2004-10-15 21:51     ` Antonino A. Daplas
2004-10-15 23:20       ` Jon Smirl
2004-10-15 23:51         ` Kendall Bennett
2004-10-15 23:58           ` Jon Smirl
2004-10-19 21:15           ` Pavel Machek
2004-10-16  1:50         ` Antonino A. Daplas
2004-10-16  2:03           ` Jon Smirl
2004-10-18 19:34             ` Kendall Bennett
2004-10-18 20:34               ` Richard Smith
2004-10-18 20:47                 ` Kendall Bennett
2004-10-18 21:04                   ` Richard Smith
2004-10-18 21:16                 ` Jon Smirl
2004-10-18 22:34                   ` Richard Smith
2004-10-18 23:28                     ` Jon Smirl
2004-10-19  0:18                       ` Richard Smith
2004-10-19  0:55                     ` Kendall Bennett
2004-10-19  1:39                       ` Richard Smith
2004-10-19 17:54                         ` Kendall Bennett
2004-10-19 21:48                       ` Pavel Machek
2004-10-20 17:01                         ` Kendall Bennett
2004-10-20 19:08                           ` Pavel Machek
2004-10-21 19:36                             ` Kendall Bennett
2004-10-19 21:42                   ` Pavel Machek
2004-10-15 12:05 ` Gerd Knorr
2004-10-15 12:38   ` Geert Uytterhoeven
2004-10-15 12:45     ` Alan Cox
2004-10-19 21:54       ` Pavel Machek
2004-10-15 13:13     ` Gerd Knorr
2004-10-17 12:07       ` Martin Waitz
2004-10-18  8:36         ` Gerd Knorr
2004-10-18 11:39           ` Martin Waitz
2004-10-18 12:10             ` Gerd Knorr
2004-10-18 20:21               ` Helge Hafting
2004-10-18 20:42                 ` Oliver Neukum
2004-10-19 16:57                   ` Martin Waitz
2004-10-15 18:29     ` Venkatesh Pallipadi
2004-10-16  9:01       ` Nigel Cunningham
2004-10-15 18:36   ` Kendall Bennett
2004-10-15 13:48 ` Helge Hafting
2004-10-15 18:36   ` Kendall Bennett
2004-10-15 21:44     ` Helge Hafting
2004-10-15 22:12       ` Kendall Bennett
2004-10-16  0:41         ` [Linux-fbdev-devel] " Antonino A. Daplas
2004-10-26 11:14           ` Paulo Marques
2004-10-27  1:58             ` Kendall Bennett
2004-10-27 11:11               ` Paulo Marques
2004-10-27 19:52                 ` Kendall Bennett
2004-10-15 21:51     ` Antonino A. Daplas
2004-10-16 17:44 ` Jon Smirl
2004-10-18 19:34   ` [Linux-fbdev-devel] " Kendall Bennett
2004-10-19 21:00 ` Pavel Machek
2004-10-19 21:11 ` Pavel Machek
2004-10-20 17:01   ` [Linux-fbdev-devel] " Kendall Bennett
2004-10-20 17:31     ` Pavel Machek
2004-10-20 18:44       ` Kendall Bennett [this message]
2004-10-20 19:10         ` Pavel Machek
2004-10-21 19:36           ` Kendall Bennett
2004-10-21 20:47             ` Richard Smith
  -- strict thread matches above, loose matches on Subject: below --
2004-10-21 22:28 Pallipadi, Venkatesh
2004-10-21 23:00 ` Pavel Machek
2004-10-22 17:10 ` Kendall Bennett
2004-10-21 23:10 Pallipadi, Venkatesh
2004-10-21 23:23 ` Pavel Machek
2004-10-21 23:44 Pallipadi, Venkatesh
2004-10-22  1:39 ` Matthew Garrett
2004-10-22 12:57 ` Stefan Dösinger
2004-10-22 16:36 Pallipadi, Venkatesh
2004-10-22 17:19 ` Jon Smirl
2004-10-22 17:31 ` Stefan Dösinger
2004-10-22 17:16 Pallipadi, Venkatesh
2004-10-22 18:04 Pallipadi, Venkatesh

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=41764FB3.29782.1B9A13F4@localhost \
    --to=kendallb@scitechsoft.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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;
as well as URLs for NNTP newsgroup(s).