Kevin O'Connor | 4 Jul 2010 14:55

[PATCH v2 0/8] seabios: pci: multi pci bus support

On Tue, Jun 22, 2010 at 05:57:45PM +0900, Isaku Yamahata wrote:
> Changes v1 -> v2:
> - simplified foreachpci_in_bus()
> - add overlap check during pci bar assignemnt.
> - use c99 initialization.
> 
> Patch description:
> 
> This patch set allows seabios to initialize multi pci bus and 64bit BAR.
> 
> Currently seabios is able to initialize only pci root bus.
> However multi pci bus support is wanted because
>   - more pci bus is wanted in qemu for many slots
>   - pci express support is commin in qemu which requires multi pci bus.
> those patches on Qemu part are under way, though.

Thanks.  I've committed this series.

-Kevin

Kevin O'Connor | 4 Jul 2010 14:57

[coreboot] [PATCH] Bootsplash for SeaBIOS

On Sat, Jun 19, 2010 at 12:31:03PM -0400, Kevin O'Connor wrote:
> On Mon, Jun 14, 2010 at 12:15:45PM +0200, Stefan Reinauer wrote:
> > This version of the bootsplash patch should have all urgent issues
> > resolved.
> > Especially the license issue has been clarified. Michael Schroeder
> > relicensed the code to the GPL compatible 3 clause BSD license; I
> > updated the headers accordingly.
> > 
> > It still requires 18k of BSS for the JPEG code, but that's good for a
> > later patch.
> > 
> > Stefan
> 
> I think it needs a couple of minor changes.  How about the attached?

FYI - the modified patch was committed (commit afbed1bd).

-Kevin

Kevin O'Connor | 4 Jul 2010 19:38

[PATCH] KVM vcpu hotplug seabios infrastructure

On Sun, Jun 27, 2010 at 01:28:52PM +0800, Liu, Jinsong wrote:
> > Attached is updated patch:

I've been looking at this patch.

I've had a hard time understanding how the SSDT code works.  It looks
like the OS calls the \_GPE._L02 method, which reads ioport
0xaf00-0xaf20, determines which processors have changed state, updates
the madt tables, and then calls Notify(Cxx,).

Why is the madt table read/written?

I've also noticed this patch increases the seabios build size by 18K.
This isn't great because it is 18K that then can't be used by option
roms, and it brings seabios very close to its current 128K limit (124K
when full debugging enabled).

-Kevin

Isaku Yamahata | 5 Jul 2010 04:22
Picon
Favicon

[PATCH 0/2] seabios: pci: pci initialization clean up

This patch series cleans up pci device initialization by introducing
a helper function.
This makes it easier to add more device initialization code cleanly
as preparation for q35 chipset.

Isaku Yamahata (2):
  seabios: pci: introduce helper function to initialize a given device.
  seabios: pciinit: use pci device initializer helper function.

 Makefile      |    2 +-
 src/i440fx.c  |   52 ++++++++++++++++++
 src/i440fx.h  |   17 ++++++
 src/pci.c     |   20 +++++++
 src/pci.h     |   34 ++++++++++++
 src/pciinit.c |  160 ++++++++++++++++++++++++++-------------------------------
 6 files changed, 197 insertions(+), 88 deletions(-)
 create mode 100644 src/i440fx.c
 create mode 100644 src/i440fx.h

Isaku Yamahata | 5 Jul 2010 04:22
Picon
Favicon

[PATCH 1/2] seabios: pci: introduce helper function to initialize a given device.

introduce helper function to initialize a given device,
This will be used later.

Signed-off-by: Isaku Yamahata <yamahata at valinux.co.jp>
---
 src/pci.c |   20 ++++++++++++++++++++
 src/pci.h |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/src/pci.c b/src/pci.c
index 1ab3c2c..c54b084 100644
--- a/src/pci.c
+++ b/src/pci.c
 <at>  <at>  -183,3 +183,23  <at>  <at>  pci_find_class(u16 classid)
     }
     return -1;
 }
+
+int pci_init_device(const struct pci_device_id *ids, u16 bdf, void *arg)
+{
+    u16 vendor_id = pci_config_readw(bdf, PCI_VENDOR_ID);
+    u16 device_id = pci_config_readw(bdf, PCI_DEVICE_ID);
+    u16 class = pci_config_readw(bdf, PCI_CLASS_DEVICE);
+
+    while (ids->vendid || ids->class_mask) {
+        if ((ids->vendid == PCI_ANY_ID || ids->vendid == vendor_id) &&
+            (ids->devid == PCI_ANY_ID || ids->devid == device_id) &&
+            !((ids->class ^ class) & ids->class_mask)) {
+            if (ids->func) {
+                ids->func(bdf, arg);
(Continue reading)

Isaku Yamahata | 5 Jul 2010 04:22
Picon
Favicon

[PATCH 2/2] seabios: pciinit: use pci device initializer helper function.

This patch makes use of pci device initialization helper function
to convert if/switch clause to table driven.
So this makes it easier to add q35 initialization code.

Signed-off-by: Isaku Yamahata <yamahata at valinux.co.jp>
---
 Makefile      |    2 +-
 src/i440fx.c  |   52 ++++++++++++++++++
 src/i440fx.h  |   17 ++++++
 src/pciinit.c |  160 ++++++++++++++++++++++++++-------------------------------
 4 files changed, 143 insertions(+), 88 deletions(-)
 create mode 100644 src/i440fx.c
 create mode 100644 src/i440fx.h

diff --git a/Makefile b/Makefile
index 3798ca6..23ea990 100644
--- a/Makefile
+++ b/Makefile
 <at>  <at>  -19,7 +19,7  <at>  <at>  SRCBOTH=misc.c pmm.c stacks.c output.c util.c block.c floppy.c ata.c mouse.c \
 SRC16=$(SRCBOTH) system.c disk.c apm.c font.c
 SRC32FLAT=$(SRCBOTH) post.c shadow.c memmap.c coreboot.c boot.c \
       acpi.c smm.c mptable.c smbios.c pciinit.c optionroms.c mtrr.c \
-      lzmadecode.c bootsplash.c jpeg.c usb-hub.c paravirt.c
+      lzmadecode.c bootsplash.c jpeg.c usb-hub.c paravirt.c i440fx.c
 SRC32SEG=util.c output.c pci.c pcibios.c apm.c stacks.c

 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
diff --git a/src/i440fx.c b/src/i440fx.c
new file mode 100644
index 0000000..f61b4eb
(Continue reading)

Kevin O'Connor | 6 Jul 2010 06:46

[PATCH] smbios: Allow all fields to be set via qemu_cfg_smbios_load_field()

On Mon, Jun 21, 2010 at 10:29:06PM -0600, Alex Williamson wrote:
> On Tue, 2010-06-22 at 00:03 -0400, Kevin O'Connor wrote:
> > Thanks.  Do you know if we're likely to see additional types (ie,
> > something other than 0,1,3,4,16,17,32)?
> 
> We already supply a pretty good set of the basic types.  I won't rule
> out adding new ones, but it doesn't seem likely.

Thanks.  If there are no further comments, I'll commit this in the
next couple of days.

-Kevin

Kevin O'Connor | 7 Jul 2010 04:27

[PATCH 2/2] seabios: pciinit: use pci device initializer helper function.

On Mon, Jul 05, 2010 at 11:22:29AM +0900, Isaku Yamahata wrote:
> This patch makes use of pci device initialization helper function
> to convert if/switch clause to table driven.
> So this makes it easier to add q35 initialization code.

Looks okay to me.  A couple of minor comments..

>  SRC32FLAT=$(SRCBOTH) post.c shadow.c memmap.c coreboot.c boot.c \
>        acpi.c smm.c mptable.c smbios.c pciinit.c optionroms.c mtrr.c \
> -      lzmadecode.c bootsplash.c jpeg.c usb-hub.c paravirt.c
> +      lzmadecode.c bootsplash.c jpeg.c usb-hub.c paravirt.c i440fx.c

The "i440fx.c" is a bit cryptic for someone unfamiliar with the hardware.
Maybe "dev-i440fx.c" or something similar?

> +++ b/src/i440fx.h
>  <at>  <at>  -0,0 +1,17  <at>  <at> 
> +// initialization function which are specific to i440fx chipset
> +//
> +// Copyright (C) 2008  Kevin O'Connor <kevin at koconnor.net>
> +// Copyright (C) 2006 Fabrice Bellard
> +//
> +// Copyright (C) 2010 Isaku Yamahata <yamahata at valinux co jp>
> +// Split out from pciinit.c
> +//
> +// This file may be distributed under the terms of the GNU LGPLv3 license.
> +#ifndef __I440FX_H
> +#define __I440FX_H
> +
> +void piix_isa_bridge_init(u16 bdf, void *arg);
(Continue reading)

Isaku Yamahata | 7 Jul 2010 05:14
Picon
Favicon

[PATCH v2 0/2] seabios: pci: pci initialization clean up

Changes from v1 -> v2
- renamed files i440fx -> dev->i440fx.
- dropped copyright notice from dev-i440fx.h

This patch series cleans up pci device initialization by introducing
a helper function.
This makes it easier to add more device initialization code cleanly
as preparation for q35 chipset.

Isaku Yamahata (2):
  seabios: pci: introduce helper function to initialize a given device.
  seabios: pciinit: use pci device initializer helper function.

 Makefile         |    2 +-
 src/dev-i440fx.c |   52 ++++++++++++++++++
 src/dev-i440fx.h |    8 +++
 src/pci.c        |   20 +++++++
 src/pci.h        |   34 ++++++++++++
 src/pciinit.c    |  160 +++++++++++++++++++++++++-----------------------------
 6 files changed, 188 insertions(+), 88 deletions(-)
 create mode 100644 src/dev-i440fx.c
 create mode 100644 src/dev-i440fx.h

Isaku Yamahata | 7 Jul 2010 05:14
Picon
Favicon

[PATCH v2 1/2] seabios: pci: introduce helper function to initialize a given device.

introduce helper function to initialize a given device,
This will be used later.

Signed-off-by: Isaku Yamahata <yamahata at valinux.co.jp>
---
 src/pci.c |   20 ++++++++++++++++++++
 src/pci.h |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/src/pci.c b/src/pci.c
index 1ab3c2c..c54b084 100644
--- a/src/pci.c
+++ b/src/pci.c
 <at>  <at>  -183,3 +183,23  <at>  <at>  pci_find_class(u16 classid)
     }
     return -1;
 }
+
+int pci_init_device(const struct pci_device_id *ids, u16 bdf, void *arg)
+{
+    u16 vendor_id = pci_config_readw(bdf, PCI_VENDOR_ID);
+    u16 device_id = pci_config_readw(bdf, PCI_DEVICE_ID);
+    u16 class = pci_config_readw(bdf, PCI_CLASS_DEVICE);
+
+    while (ids->vendid || ids->class_mask) {
+        if ((ids->vendid == PCI_ANY_ID || ids->vendid == vendor_id) &&
+            (ids->devid == PCI_ANY_ID || ids->devid == device_id) &&
+            !((ids->class ^ class) & ids->class_mask)) {
+            if (ids->func) {
+                ids->func(bdf, arg);
(Continue reading)


Gmane