public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Integrator PCI base dilemma
       [not found]       ` <20130322103740.GW4977@n2100.arm.linux.org.uk>
@ 2013-03-22 19:22         ` Linus Walleij
  2013-03-22 20:05           ` Arnd Bergmann
  2013-03-22 21:13           ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Linus Walleij @ 2013-03-22 19:22 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 22, 2013 at 11:37 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> On Fri, Mar 22, 2013 at 09:48:27AM +0000, Arnd Bergmann wrote:
>> Yes, I was assuming that Linus would keep Integrator/AP working since that is
>> what he uses.
>
> It's entirely possible that Linus doesn't use a VGA card with Integrator/AP
> if Linus is not using MILO - because MILO was the only boot loader for
> that platform which had an x86 emulator built in to run the VGA BIOS to
> initialize the VGA card.

You are right, or, well, I have had an S3 VGA card plugged in and been
scratching my head wondering how I should get the damned thing to
work.

Now I *know* there is not really a way for me to make this work
with the kernel only.

> There are two boot loaders I'm aware of which are capable of doing this,
> and those are MILO and my boot loader for Footbridge platforms (which,
> incidentally, now runs ATA card BIOSes too complete with input support
> and can push out the VGA output via serial and accept keypresses via
> serial) - and that doesn't work on Integrator/AP.

I'm on U-boot for this thing, I wonder if that can do x86
emulation to initialize VGA card. I guess I'm about to learn.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Integrator PCI base dilemma
  2013-03-22 19:22         ` [U-Boot] Integrator PCI base dilemma Linus Walleij
@ 2013-03-22 20:05           ` Arnd Bergmann
  2013-03-22 21:13           ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2013-03-22 20:05 UTC (permalink / raw)
  To: u-boot

On Friday 22 March 2013, Linus Walleij wrote:
> > There are two boot loaders I'm aware of which are capable of doing this,
> > and those are MILO and my boot loader for Footbridge platforms (which,
> > incidentally, now runs ATA card BIOSes too complete with input support
> > and can push out the VGA output via serial and accept keypresses via
> > serial) - and that doesn't work on Integrator/AP.
> 
> I'm on U-boot for this thing, I wonder if that can do x86
> emulation to initialize VGA card. I guess I'm about to learn.

You should be able to do it from user space using Matthew Garrett's
vbetool[1]. If I understood it right, you can initialize the VGA
card with this, and then load vga16fb or vgacon.

If the card is VESA 2.0 compatible, you should also be able to use
it with uvesafb, which calls /sbin/v86d for x86 emulation.

	Arnd

[1] http://www.codon.org.uk/~mjg59/vbetool/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Integrator PCI base dilemma
  2013-03-22 19:22         ` [U-Boot] Integrator PCI base dilemma Linus Walleij
  2013-03-22 20:05           ` Arnd Bergmann
@ 2013-03-22 21:13           ` Wolfgang Denk
  2013-03-22 22:35             ` Linus Walleij
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2013-03-22 21:13 UTC (permalink / raw)
  To: u-boot

Dear Linus Walleij,

In message <CACRpkdb5Q+EtM0GGaLFNUj1A12zVrcyUxzRvfEOpcH4-pVuasA@mail.gmail.com> you wrote:
>
> I'm on U-boot for this thing, I wonder if that can do x86
> emulation to initialize VGA card. I guess I'm about to learn.

Guess what the code in  drivers/bios_emulator  might be good for...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
... The things love can drive a man to -- the  ecstasies,  the  mise-
ries,  the broken rules, the desperate chances, the glorious failures
and the glorious victories.
	-- McCoy, "Requiem for Methuselah", stardate 5843.7

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Integrator PCI base dilemma
  2013-03-22 21:13           ` Wolfgang Denk
@ 2013-03-22 22:35             ` Linus Walleij
  2013-03-22 23:48               ` Russell King - ARM Linux
  2013-03-23  0:19               ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Linus Walleij @ 2013-03-22 22:35 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 22, 2013 at 10:13 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Linus Walleij,
>
> In message <CACRpkdb5Q+EtM0GGaLFNUj1A12zVrcyUxzRvfEOpcH4-pVuasA@mail.gmail.com> you wrote:
>>
>> I'm on U-boot for this thing, I wonder if that can do x86
>> emulation to initialize VGA card. I guess I'm about to learn.
>
> Guess what the code in  drivers/bios_emulator  might be good for...

Thanks Wolfgang!

I hacked around a bit and actually got it to compile for ARM.

Now I just need to write an S3 driver or find an ATI Radeon
card since that seems to be supported already.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Integrator PCI base dilemma
  2013-03-22 22:35             ` Linus Walleij
@ 2013-03-22 23:48               ` Russell King - ARM Linux
  2013-03-23  0:19               ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2013-03-22 23:48 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 22, 2013 at 11:35:54PM +0100, Linus Walleij wrote:
> On Fri, Mar 22, 2013 at 10:13 PM, Wolfgang Denk <wd@denx.de> wrote:
> > Dear Linus Walleij,
> >
> > In message <CACRpkdb5Q+EtM0GGaLFNUj1A12zVrcyUxzRvfEOpcH4-pVuasA@mail.gmail.com> you wrote:
> >>
> >> I'm on U-boot for this thing, I wonder if that can do x86
> >> emulation to initialize VGA card. I guess I'm about to learn.
> >
> > Guess what the code in  drivers/bios_emulator  might be good for...
> 
> Thanks Wolfgang!
> 
> I hacked around a bit and actually got it to compile for ARM.
> 
> Now I just need to write an S3 driver or find an ATI Radeon
> card since that seems to be supported already.

Okay, what follows is based on my latest version of the Footbridge
"bios" boot loader - which is tested to run the VGA BIOS on several
VGA cards, and the ATA RAID BIOS on an IT8212 card - including the
config stuff on that ATA RAID BIOS card.

You shouldn't need an "S3" driver.  The way I do it on Footbridge, and
the way I made the Integrator Milo do it was to basically setup the PCI
bus, find if there was a VGA card there, load the VGA BIOS into the
x86 emulation address 0xc0000 - where it would be loaded on a PC.

Beware though - the S3 BIOS will try to access the i8253 timer which
needs to be emulated, address 0x61 which can be simply discarded, maybe
the PCI config IO addresses 0xcf8..0xcff (which need to generate real
PCI config cycles), read from IO port 0x80 (which can simply return 0).

It will also want to access PCI IO addresses in addition to the normal
VGA IO address range of 0x3b0..0x3e0:
 0x8180-0x8200 (Streams processor), 0xff00-0xff44 (LPB bus),
 0x100, 0x[489abe][268ae]e8

And it will want PCI memory addresses 0xa0000-0xbffff to be accessible
at that x86 emulation offset.

As I said previously, different VGA BIOS prod different bits of PC
hardware in random ways, so I don't guarantee that the above will work
for your S3 BIOS.  Mine is a S3 Trio64 V2 card:

00:09.0 VGA compatible controller: S3 Inc. 86c775/86c785 [Trio 64V2/DX or /GX] (rev 16) (prog-if 00 [VGA])
which has IDs 5333:8901.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Integrator PCI base dilemma
  2013-03-22 22:35             ` Linus Walleij
  2013-03-22 23:48               ` Russell King - ARM Linux
@ 2013-03-23  0:19               ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2013-03-23  0:19 UTC (permalink / raw)
  To: u-boot

Dear Linus,

In message <CACRpkdY_qj7VBKBSCsK3mnx=V5DURY-g1fHGVwDBz2WUheB=Nw@mail.gmail.com> you wrote:
>
> >> I'm on U-boot for this thing, I wonder if that can do x86
> >> emulation to initialize VGA card. I guess I'm about to learn.
> >
> > Guess what the code in  drivers/bios_emulator  might be good for...
> 
> Thanks Wolfgang!
> 
> I hacked around a bit and actually got it to compile for ARM.

If you have any patches, I'd appreciate if you could share these with
us.

Thanks in advance.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It's when they say 2 + 2 = 5 that I begin to argue."    - Eric Pepke

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-23  0:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CACRpkdaOjFhWR21w5x_rR_60ffQF3Ym_MQd2svNyzm0guwOUoQ@mail.gmail.com>
     [not found] ` <201303211302.19058.arnd@arndb.de>
     [not found]   ` <20130321234004.GV4977@n2100.arm.linux.org.uk>
     [not found]     ` <201303220948.28092.arnd@arndb.de>
     [not found]       ` <20130322103740.GW4977@n2100.arm.linux.org.uk>
2013-03-22 19:22         ` [U-Boot] Integrator PCI base dilemma Linus Walleij
2013-03-22 20:05           ` Arnd Bergmann
2013-03-22 21:13           ` Wolfgang Denk
2013-03-22 22:35             ` Linus Walleij
2013-03-22 23:48               ` Russell King - ARM Linux
2013-03-23  0:19               ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox