Re: [SeaBIOS] (no subject)

2012-09-16 Thread Gerd Hoffmann
  Hi,

>>> +*(addr->pcimem_start) = s;
>>> +*(addr->pcimem_end) = e;
>>> +}
>>
>> This must be adapted too to not hard-code things.
>>
> 
> Is it reasonable to pull these out of the dsdt acpi table?

It's a solved problem ;)

acpi.c builds a ssdt BDAT entry, then places the pcimem addresses there.
 The DSDT table has AML code to pick up the values and stick them into a
RessourceTemplate, so the guest OS can see it just fine (you'll see it
show up in /proc/iomem in linux guests).

You can basically just copy \_SB.PCI0._CRS logic from the piix dtst.
Maybe it is a good idea to separate out common stuff into a include file
while being at it.

cheers,
  Gerd

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2012-09-14 Thread Jason Baron
On Fri, Sep 14, 2012 at 10:08:19AM +0200, Gerd Hoffmann wrote:
> On 09/13/12 22:12, Jason Baron wrote:
> > jan.kis...@siemens.com, juzh...@redhat.com, ag...@suse.de, 
> > yamah...@valinux.co.jp, mklet...@redhat.com, afaer...@suse.de, 
> > arm...@redhat.com, lcapitul...@redhat.com, alex.william...@redhat.com
> > Message-Id: 
> > <491ff0e77a2359c098540aa24fbbfeec573bea91.1347565443.git.jba...@redhat.com>
> > In-Reply-To: 
> > References: 
> > Subject: [PATCH 9/9] seabios: q35: add basic hotplug support
> > 
> > Add support for acpi hotplug to q35. Copied from the piix acpi table.
> 
> Do we really wanna bring that in?
> 
> q35 has pcie slots which are hot-pluggable.
> 
> qemu also has a pci-pci bridge which supports hotplug for all devices
> behind it.
> 
> It's not like we can't hotplug pci devices at all like it used to be
> back in the days when acpi hotplug was added to piix4.
> 
> cheers,
>   Gerd
> 

So I was trying to get q35 to be on feature parity with piix, with the
least amount of work :) I'm not sure how hard pcie hotplug would be to
implement, Michael, do you have any idea?

Thanks,

-Jason

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2012-09-14 Thread Jason Baron
On Fri, Sep 14, 2012 at 09:52:24AM +0200, Gerd Hoffmann wrote:
> On 09/13/12 22:12, Jason Baron wrote:
> > +void mch_mem_addr_init(struct pci_device *dev, void *arg)
> > +{
> > +struct pci_mem_addr *addr = arg;
> > +u64 s, e;
> > +
> > +#if BUILD_MAX_HIGHMEM != 0xe000
> > +# error "please adjust memory mapping area"
> > +#endif
> > +
> > +/*
> > + * BUILD_MAX_HIGHMEM == 0xe000
> > + * [0xe000 , 0xf000 ) for MCFG
> > + *  4GB - 512MB, 4GB - 256MB
> > + * [0xf000 , 0xfec0 ) for DMI interface(subtractive decode)
> > + *  4GB - 256MB, 4GB - 20MB
> > + */
> > +s = BUILD_MAX_HIGHMEM + 256 * 1024 * 1024;
> > +e = s + 128 * 1024 * 1024 - 1;
> > +*(addr->pcimem_start) = s;
> > +*(addr->pcimem_end) = e;
> > +}
> 
> This must be adapted too to not hard-code things.
> 

Is it reasonable to pull these out of the dsdt acpi table?

Thanks,

-Jason

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2012-09-14 Thread Michael S. Tsirkin
On Fri, Sep 14, 2012 at 10:00:46AM +0200, Gerd Hoffmann wrote:
> Guess we want CONFIG_QEMU_PIIX and CONFIG_QEMU_Q35 to build the two bios
> variants[1].  Or include both acpi tables, then select at runtime.

I think two binaries is better to save on memory.

-- 
MST

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2012-09-14 Thread Gerd Hoffmann
On 09/13/12 22:12, Jason Baron wrote:
> jan.kis...@siemens.com, juzh...@redhat.com, ag...@suse.de, 
> yamah...@valinux.co.jp, mklet...@redhat.com, afaer...@suse.de, 
> arm...@redhat.com, lcapitul...@redhat.com, alex.william...@redhat.com
> Message-Id: 
> <491ff0e77a2359c098540aa24fbbfeec573bea91.1347565443.git.jba...@redhat.com>
> In-Reply-To: 
> References: 
> Subject: [PATCH 9/9] seabios: q35: add basic hotplug support
> 
> Add support for acpi hotplug to q35. Copied from the piix acpi table.

Do we really wanna bring that in?

q35 has pcie slots which are hot-pluggable.

qemu also has a pci-pci bridge which supports hotplug for all devices
behind it.

It's not like we can't hotplug pci devices at all like it used to be
back in the days when acpi hotplug was added to piix4.

cheers,
  Gerd


___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2012-09-14 Thread Gerd Hoffmann
On 09/13/12 22:12, Jason Baron wrote:
> add dsdt for q35 chipset of qemu.

Not used anywhere.

We probaby want build it into the seabios binary so we don't depend on
qemu passing it to us.  Or we just make qemu pass the dsdt to seabios
unconditionally.  Not sure if that is possible given the dsdt patching
we do.

Guess we want CONFIG_QEMU_PIIX and CONFIG_QEMU_Q35 to build the two bios
variants[1].  Or include both acpi tables, then select at runtime.

cheers,
  Gerd

[1] And while being at it also CONFIG_QEMU so we can replace the
slightly irritating "if (!CONFIG_COREBOOT)" with "if (CONFIG_QEMU)"

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2012-09-14 Thread Gerd Hoffmann
On 09/13/12 22:12, Jason Baron wrote:
> +void mch_mem_addr_init(struct pci_device *dev, void *arg)
> +{
> +struct pci_mem_addr *addr = arg;
> +u64 s, e;
> +
> +#if BUILD_MAX_HIGHMEM != 0xe000
> +# error "please adjust memory mapping area"
> +#endif
> +
> +/*
> + * BUILD_MAX_HIGHMEM == 0xe000
> + * [0xe000 , 0xf000 ) for MCFG
> + *  4GB - 512MB, 4GB - 256MB
> + * [0xf000 , 0xfec0 ) for DMI interface(subtractive decode)
> + *  4GB - 256MB, 4GB - 20MB
> + */
> +s = BUILD_MAX_HIGHMEM + 256 * 1024 * 1024;
> +e = s + 128 * 1024 * 1024 - 1;
> +*(addr->pcimem_start) = s;
> +*(addr->pcimem_end) = e;
> +}

This must be adapted too to not hard-code things.

cheers,
  Gerd

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2012-09-14 Thread Gerd Hoffmann
On 09/13/12 22:12, Jason Baron wrote:
> jan.kis...@siemens.com, juzh...@redhat.com, ag...@suse.de, 
> yamah...@valinux.co.jp, mklet...@redhat.com, afaer...@suse.de, 
> arm...@redhat.com, lcapitul...@redhat.com, alex.william...@redhat.com
> Message-Id: 
> 
> In-Reply-To: 
> References: 
> Subject: [PATCH 2/9] seabios: pciinit: initialize pcimem_start and pcimem_end 
> depending on chipset.
> 
> From: Isaku Yamahata 
> 
> initialize pcimem_start and pcimem_end based on chipset.

Should not be needed.  There is no hard-coded range any more.  PCI
address space starts above lowmem (see pcimem_start assignment in
pci_bios_map_devices()).  Probably the q35 dsdt table must be updated to
handle this (see \_SB.PCI0._CRS).  Probably you also want to grab some
address space for mmconfig, i.e. place mmconfig above lowmem and
set pcimem_start to the end of mmconfig space.

cheers,
  Gerd


___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2011-12-13 Thread Fred .
On Tue, Dec 13, 2011 at 1:34 AM, Peter Stuge  wrote:
> Fred . wrote:
>> A BIOS password would add an additional line of defense and protect
>> against booting from a removable device such as CD or USB.
>
> Compile out those drivers.

But those drivers and functionality are great.
I would like _ME_ to be able to boot from CD and USB.
I just don't want other people to be able to boot from CD and USB.

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2011-12-12 Thread Peter Stuge
Fred . wrote:
> A BIOS password would add an additional line of defense and protect
> against booting from a removable device such as CD or USB.

Compile out those drivers.


//Peter

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2011-12-12 Thread Peter Stuge
Fred . wrote:
> Since we already have support for 32-bit PCI, then it would be great
> if 64-bit PCI support could be added if it perhaps only require a
> slight modification to the existing code.

You have misunderstood. The release notes refer to 32bit PCI BIOS,
in this case the CPU mode, and has nothing to do with bus width.


//Peter

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2011-12-12 Thread Fred .
On Mon, Dec 12, 2011 at 11:53 PM, David Hendricks  wrote:
> On Sun, Dec 11, 2011 at 8:47 AM, Fred .  wrote:
>>
>> > The ability for SeaBIOS to launch a "setup program" is already present
>> > - it just requires the creation of this setup program.  Several
>> > coreboot payloads already have some menu drawing code, so this
>> > shouldn't be too difficult.  Frankly though, there isn't much to
>> > configure (and that is a good thing).
>> >
>> >> * Competition have password protection. SeaBIOS does not.
>> >
>> > Again - this is part of the "setup program" - there is nothing in
>> > SeaBIOS to protect.
>> The BIOS of the competition have two types of passwords.
>> One to boot the system and one to access the setup screen.
>> Password for bootup has nothing todo with the "setup program".
>> Since there is currently no such setup program, the initial
>> implementation for a bootup password could use a password configured
>> at compile-time.
>
>
> I think it's useful to step back and look at it in a different light. The
> "competition" follows a very different usage model than coreboot and
> SeaBIOS; Many commercial BIOS products are essentially OSes in themselves,
> which has historically been considered a bad thing in the coreboot community
> and by extension the SeaBIOS community.
Much of the competition and also SeaBIOS is modular.
So you can enable/disable features and modules to make it
heavier/lighter depending on needs through configuration at
compile-time.


> From that perspective, it doesn't make much sense for SeaBIOS to have a boot
> password when every modern OS has a robust authentication mechanism already.
>
> (you have some good ideas, but keep in mind many people simply want SeaBIOS
> to do its job and get out of the way)
A BIOS password would add an additional line of defense and protect
against booting from a removable device such as CD or USB. An OS
password would not protect against booting from removable media.
Adding password support would probably be pretty trivial.


>
>> >
>> >> * SeaBIOS supports 32-bit PCI. It should support 64-bit PCI.
>> >
>> > I'm not sure what you mean here.
>> I've read that SeaBIOS supports 32-bit PCI.
>> http://www.seabios.org/Releases#SeaBIOS_0.5.1
>> PCI also have 64-bit.
>> http://en.wikipedia.org/wiki/Conventional_PCI#64-bit_PCI
>
>
> 64-bit PCI is actually obsolete. It was used for a period in server
> platforms, but has been supplanted by PCI Express.
>
> David Hendricks (dhendrix)
> Systems Software Engineer, Google Inc.
Indeed.
But 32-bit PCI is also obsolete, yet it is implemented in SeaBIOS.
So 64-bit PCI should be added to a not-yet-implemented list or a
low-priority list and then if anyone wants to work on it, they may do
so.
Since we already have support for 32-bit PCI, then it would be great
if 64-bit PCI support could be added if it perhaps only require a
slight modification to the existing code.

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2011-12-12 Thread David Hendricks
On Sun, Dec 11, 2011 at 8:47 AM, Fred .  wrote:

> > The ability for SeaBIOS to launch a "setup program" is already present
> > - it just requires the creation of this setup program.  Several
> > coreboot payloads already have some menu drawing code, so this
> > shouldn't be too difficult.  Frankly though, there isn't much to
> > configure (and that is a good thing).
> >
> >> * Competition have password protection. SeaBIOS does not.
> >
> > Again - this is part of the "setup program" - there is nothing in
> > SeaBIOS to protect.
> The BIOS of the competition have two types of passwords.
> One to boot the system and one to access the setup screen.
> Password for bootup has nothing todo with the "setup program".
> Since there is currently no such setup program, the initial
> implementation for a bootup password could use a password configured
> at compile-time.
>

I think it's useful to step back and look at it in a different light. The
"competition" follows a very different usage model than coreboot and
SeaBIOS; Many commercial BIOS products are essentially OSes in themselves,
which has historically been considered a bad thing in the coreboot
community and by extension the SeaBIOS community.

>From that perspective, it doesn't make much sense for SeaBIOS to have a
boot password when every modern OS has a robust authentication mechanism
already.

(you have some good ideas, but keep in mind many people simply want SeaBIOS
to do its job and get out of the way)

>
> >> * SeaBIOS supports 32-bit PCI. It should support 64-bit PCI.
> >
> > I'm not sure what you mean here.
> I've read that SeaBIOS supports 32-bit PCI.
> http://www.seabios.org/Releases#SeaBIOS_0.5.1
> PCI also have 64-bit.
> http://en.wikipedia.org/wiki/Conventional_PCI#64-bit_PCI


64-bit PCI is actually obsolete. It was used for a period in server
platforms, but has been supplanted by PCI Express.

David Hendricks (dhendrix)
Systems Software Engineer, Google Inc.
___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] (no subject)

2011-12-11 Thread Fred .
On Sat, Dec 10, 2011 at 8:20 PM, Kevin O'Connor  wrote:
> On Sat, Dec 10, 2011 at 07:30:19PM +0100, Fred . wrote:
>> Analyze of the current state and proposed future path for SeaBIOS.
>>
>> == Website ==
>> The current SeaBIOS website lacks information and is very basic.
>> SeaBIOS needs a more informative website with documentation and information.
>
> It would be a good thing to expand the website.  I've wanted to add
> more technical information to the website, but I have not been able to
> set aside the time to do it.
If accounts were given someone else could improve it.
Currently the website uses a wiki, but is not runned as a wiki, so in
the long-term we might want to move to something else, such as a CMS,
perhaps Drupal.
What content would need to be added?
* A feature page
* Page with contact email for press, ISV, IHV, IBV, etc
* Compile/build guide
* TODO list
* Guide for integration with coreboot, qemu, kvm, etc
* A roadmap?
What else?

>
>> == Logo ==
>> SeaBIOS have no logo.
>> Award/Phoenix, AMI, Insyde, etc have a logo.
>> Perhaps SeaBIOS should have a logo too?
>
> If someone is willing to put together a logo, I will consider using
> it.  I have no talent in that area myself.  :-)
Anyone on the mailling list have the skillset?
We should put a request on the website.
Perhaps put a request for voluntary contributions on some art community.
Logo should be in a scaleable graphics format (such as SVG), and
should look good in print. Should look good on black background
(system boot) and white background (paper print).

>
>> == Features & Standards ==
>> In many aspects SeaBIOS is behind the competition.
>>
>> * Award/Phoenix, AMI, Inside have setup screen. SeaBIOS does not.
>> SeaBIOS _needs_ a setup menu in order to win the minds of enthusiasts,
>> geeks and non-embedded systems.
>
> This may be a semantic distinction, but I believe SeaBIOS should
> launch an application for system setup and SeaBIOS should not itself
> have a menu system.
Yes having it as a separate application might be a good idea.
At least as a separate module that can be configured whether or not it
should be included in compile-time.

>
> The ability for SeaBIOS to launch a "setup program" is already present
> - it just requires the creation of this setup program.  Several
> coreboot payloads already have some menu drawing code, so this
> shouldn't be too difficult.  Frankly though, there isn't much to
> configure (and that is a good thing).
>
>> * Competition have password protection. SeaBIOS does not.
>
> Again - this is part of the "setup program" - there is nothing in
> SeaBIOS to protect.
The BIOS of the competition have two types of passwords.
One to boot the system and one to access the setup screen.
Password for bootup has nothing todo with the "setup program".
Since there is currently no such setup program, the initial
implementation for a bootup password could use a password configured
at compile-time.

>
>> * SeaBIOS is behind in standards. SeaBIOS supports SMBIOS 2.4, while
>> the competition is ahead, and the recent standard is SMBIOS 2.7.1.
>>
>> * SeaBIOS does not support ESCD. The competition supports this.
>
> There are a plethora of old "standards" for PC machines.  Supporting
> all of these "standards" would take eons and provide little
> appreciable gain.  The SeaBIOS approach (inherited from Bochs BIOS) is
> to support those standards which common operating systems use.  I
> think this is the right approach.
I was not aware that there is a plethora of standards for PC BIOS.
Which are the most essential parts that are needed but not implemented yet?

>
>> * SeaBIOS does not support (GUID Partition Table) GPT. It seems the
>> competition does not either. However it is possible to implement GPT
>> support in BIOS. Doing so would give SeaBIOS a competitive advantage
>> over the competition.
>
> This is a common misconception - a standard BIOS has nothing to do
> with the partition table.  The BIOS doesn't do partition tables - it's
> the task of the bootloader and OS to support them.
>
>> * SeaBIOS supports USB UHCI and OHCI. It should support the latest xHCI.
>
> Agreed.
This needs to be added to the TODO list, and also added on the website.
Perhaps something for GSoC students?

>
>> * SeaBIOS supports 32-bit PCI. It should support 64-bit PCI.
>
> I'm not sure what you mean here.
I've read that SeaBIOS supports 32-bit PCI.
http://www.seabios.org/Releases#SeaBIOS_0.5.1
PCI also have 64-bit.
http://en.wikipedia.org/wiki/Conventional_PCI#64-bit_PCI

>
>> * Competition supports small logos in the corners. SeaBIOS only
>> supports fullscreen logos.
>>
>> What features are under development?
>> What features & standards are not supported yet?
>> What features would we like to have?
>> What features are planned?
>> We need to document this.
>>
>> == Unimportant features ==
>> * SeaBIOS does not support the PNG format which is superior to
>> currently BMP and JPG.
>> * SeaBIOS uses LZMA compression. The successor L

Re: [SeaBIOS] (no subject)

2011-12-10 Thread Kevin O'Connor
On Sat, Dec 10, 2011 at 07:30:19PM +0100, Fred . wrote:
> Analyze of the current state and proposed future path for SeaBIOS.
> 
> == Website ==
> The current SeaBIOS website lacks information and is very basic.
> SeaBIOS needs a more informative website with documentation and information.

It would be a good thing to expand the website.  I've wanted to add
more technical information to the website, but I have not been able to
set aside the time to do it.

> == Logo ==
> SeaBIOS have no logo.
> Award/Phoenix, AMI, Insyde, etc have a logo.
> Perhaps SeaBIOS should have a logo too?

If someone is willing to put together a logo, I will consider using
it.  I have no talent in that area myself.  :-)

> == Features & Standards ==
> In many aspects SeaBIOS is behind the competition.
> 
> * Award/Phoenix, AMI, Inside have setup screen. SeaBIOS does not.
> SeaBIOS _needs_ a setup menu in order to win the minds of enthusiasts,
> geeks and non-embedded systems.

This may be a semantic distinction, but I believe SeaBIOS should
launch an application for system setup and SeaBIOS should not itself
have a menu system.

The ability for SeaBIOS to launch a "setup program" is already present
- it just requires the creation of this setup program.  Several
coreboot payloads already have some menu drawing code, so this
shouldn't be too difficult.  Frankly though, there isn't much to
configure (and that is a good thing).

> * Competition have password protection. SeaBIOS does not.

Again - this is part of the "setup program" - there is nothing in
SeaBIOS to protect.

> * SeaBIOS is behind in standards. SeaBIOS supports SMBIOS 2.4, while
> the competition is ahead, and the recent standard is SMBIOS 2.7.1.
> 
> * SeaBIOS does not support ESCD. The competition supports this.

There are a plethora of old "standards" for PC machines.  Supporting
all of these "standards" would take eons and provide little
appreciable gain.  The SeaBIOS approach (inherited from Bochs BIOS) is
to support those standards which common operating systems use.  I
think this is the right approach.

> * SeaBIOS does not support (GUID Partition Table) GPT. It seems the
> competition does not either. However it is possible to implement GPT
> support in BIOS. Doing so would give SeaBIOS a competitive advantage
> over the competition.

This is a common misconception - a standard BIOS has nothing to do
with the partition table.  The BIOS doesn't do partition tables - it's
the task of the bootloader and OS to support them.

> * SeaBIOS supports USB UHCI and OHCI. It should support the latest xHCI.

Agreed.

> * SeaBIOS supports 32-bit PCI. It should support 64-bit PCI.

I'm not sure what you mean here.

> * Competition supports small logos in the corners. SeaBIOS only
> supports fullscreen logos.
> 
> What features are under development?
> What features & standards are not supported yet?
> What features would we like to have?
> What features are planned?
> We need to document this.
> 
> == Unimportant features ==
> * SeaBIOS does not support the PNG format which is superior to
> currently BMP and JPG.
> * SeaBIOS uses LZMA compression. The successor LZMA2 is out.
> * Linux and Windows have animated splash screens on bootup. It would
> be cool if SeaBIOS could have animated flash, via APNG or MNG.

SeaBIOS boots fast - there's no time to show a splash screen.  That's
its real advantage.  Should someone wish to see a pretty picture
during boot, they can easily add it to the bootloader (eg, as winldr
and grub do).

That said, should someone wish to add new splash screen support, I
don't see it as an issue.

> == Usage & Community ==
> SeaBIOS is used by coreboot, KVM, QEMU and Bochs.

Bochs doesn't use SeaBIOS (at least by default).  Xen is in the
process of using SeaBIOS as well.

> SeaBIOS should be used more widely on platforms and platform virtual machines.
> SeaBIOS should be supported by VirtualBox and VMware, can this be
> accomplished? how?

I believe VirtualBox uses (or at least used to use) Bochs BIOS, and it
should be possible to migrate to SeaBIOS.  It would be up to VMware if
they wished to change BIOS.

> What other platform virtual machines can SeaBIOS be supported/integrated with?
> The different communities needs to work tighter together to commonly
> develop SeaBIOS into a tier one BIOS.

-Kevin

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios