Re: [SeaBIOS] [Qemu-devel] [RFC PATCH v4 07/30] Add SIZE type to qdev properties
在 2012-12-18二的 13:41 +0100,Vasilis Liaskovitis写道: This patch adds a 'SIZE' type property to qdev. It will make dimm description more convenient by allowing sizes to be specified with K,M,G,T prefixes instead of number of bytes e.g.: -device dimm,id=mem0,size=2G,bus=membus.0 Credits go to Ian Molton for original patch. See: http://patchwork.ozlabs.org/patch/38835/ Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hw/qdev-properties.c | 60 ++ hw/qdev-properties.h |3 ++ qemu-option.c|2 +- qemu-option.h|2 + 4 files changed, 66 insertions(+), 1 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 81d901c..a77f760 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -1279,3 +1279,63 @@ void qemu_add_globals(void) { qemu_opts_foreach(qemu_find_opts(global), qdev_add_one_global, NULL, 0); } + +/* --- 64bit unsigned int 'size' type --- */ + +static void get_size(Object *obj, Visitor *v, void *opaque, + const char *name, Error **errp) +{ +DeviceState *dev = DEVICE(obj); +Property *prop = opaque; +uint64_t *ptr = qdev_get_prop_ptr(dev, prop); + +visit_type_size(v, ptr, name, errp); +} + +static void set_size(Object *obj, Visitor *v, void *opaque, + const char *name, Error **errp) +{ +DeviceState *dev = DEVICE(obj); +Property *prop = opaque; +uint64_t *ptr = qdev_get_prop_ptr(dev, prop); + +if (dev-state != DEV_STATE_CREATED) { +error_set(errp, QERR_PERMISSION_DENIED); +return; +} + +visit_type_size(v, ptr, name, errp); +} + +static int parse_size(DeviceState *dev, Property *prop, const char *str) +{ +uint64_t *ptr = qdev_get_prop_ptr(dev, prop); +Error *errp = NULL; + +if (str != NULL) { +parse_option_size(prop-name, str, ptr, errp); +} +assert_no_error(errp); +return 0; +} + +static int print_size(DeviceState *dev, Property *prop, char *dest, size_t len) +{ +uint64_t *ptr = qdev_get_prop_ptr(dev, prop); +char suffixes[] = {'T', 'G', 'M', 'K', 'B'}; +int i = 0; +uint64_t div; + +for (div = (long int)1 40; !(*ptr / div) ; div = 10) { +i++; +} +return snprintf(dest, len, %0.03f%c, (double)*ptr/div, suffixes[i]); ^^ ^^^ +} + IMHO, you may need (double)(*ptr/div), for type cast is right associated. +PropertyInfo qdev_prop_size = { +.name = size, +.parse = parse_size, +.print = print_size, +.get = get_size, +.set = set_size, +}; diff --git a/hw/qdev-properties.h b/hw/qdev-properties.h index 5b046ab..0182bef 100644 --- a/hw/qdev-properties.h +++ b/hw/qdev-properties.h @@ -14,6 +14,7 @@ extern PropertyInfo qdev_prop_uint64; extern PropertyInfo qdev_prop_hex8; extern PropertyInfo qdev_prop_hex32; extern PropertyInfo qdev_prop_hex64; +extern PropertyInfo qdev_prop_size; extern PropertyInfo qdev_prop_string; extern PropertyInfo qdev_prop_chr; extern PropertyInfo qdev_prop_ptr; @@ -67,6 +68,8 @@ extern PropertyInfo qdev_prop_pci_host_devaddr; DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_hex32, uint32_t) #define DEFINE_PROP_HEX64(_n, _s, _f, _d) \ DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_hex64, uint64_t) +#define DEFINE_PROP_SIZE(_n, _s, _f, _d) \ +DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_size, uint64_t) #define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d) \ DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_pci_devfn, int32_t) diff --git a/qemu-option.c b/qemu-option.c index 27891e7..38e0a11 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -203,7 +203,7 @@ static void parse_option_number(const char *name, const char *value, } } -static void parse_option_size(const char *name, const char *value, +void parse_option_size(const char *name, const char *value, uint64_t *ret, Error **errp) { char *postfix; diff --git a/qemu-option.h b/qemu-option.h index ca72986..b8ee5b3 100644 --- a/qemu-option.h +++ b/qemu-option.h @@ -152,5 +152,7 @@ typedef int (*qemu_opts_loopfunc)(QemuOpts *opts, void *opaque); int qemu_opts_print(QemuOpts *opts, void *dummy); int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func, void *opaque, int abort_on_failure); +void parse_option_size(const char *name, const char *value, + uint64_t *ret, Error **errp); #endif ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [Qemu-devel] [RFC PATCH v4 00/30] ACPI memory hotplug
在 2013-01-09三的 01:08 +0100,Andreas Färber写道: Am 18.12.2012 13:41, schrieb Vasilis Liaskovitis: Because dimm layout needs to be configured on machine-boot, all dimm devices need to be specified on startup command line (either with populated=on or with populated=off). The dimm information is stored in dimm configuration structures. After machine startup, dimms are hot-added or removed with normal device_add and device_del operations e.g.: Hot-add syntax: device_add dimm,id=mydimm0,bus=membus.0 Hot-remove syntax: device_del dimm,id=mydimm0 This sounds contradictory: Either all devices need to be specified on the command line, or they can be hot-added via monitor. Assuming a fixed layout at startup, I wonder if there is another clever way to model this... For CPU hotplug Anthony had suggested to have a fixed set of linkSocket properties that get set to a CPU socket as needed. Might a similar strategy work for memory, i.e. a startup-configured amount of linkDIMMs on /machine/dimm[n] that point to a QOM DIMM object or NULL if unpopulated? Hot(un)plug would then simply work via QMP qom-set command. (CC'ing some people) Sorry, what's link, did it adopted by cpu-QOM? can you give some hints? Thanks! ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [Qemu-devel] [RESEND PATCH v2] pciinit: Enable default VGA device
Hi, Turns out it's this: commit 76e58028d28e78431f9de3cee0b3c88d807fa39d Author: Kevin O'Connor ke...@koconnor.net Date: Wed Mar 6 21:50:09 2013 -0500 acpi: Eliminate BDAT parameter passing to DSDT code. The BDAT construct is the only ACPI mechanism that relies on SeaBIOS reserved memory. Replace it with the SSDT based template system. Signed-off-by: Kevin O'Connor ke...@koconnor.net That is most likely dsdt + bios.bin not being in sync. Simply using 'qemu -bios /path/to/seabios/out/bios.bin' doesn't fly due to qemu using a non-matching dsdt then. With qemu/master you can just use 'qemu -L /path/to/seabios/out' instead and qemu will pick up both bios.bin and dsdt from the fresh seabios build directory then (and anything else it doesn't find there from the default locations). HTH, Gerd ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] src/Kconfig: Add note that boot interface is needed
Am Dienstag, den 19.03.2013, 22:18 -0400 schrieb Kevin O'Connor: On Wed, Mar 20, 2013 at 12:59:53AM +0100, Paul Menzel wrote: Am Dienstag, den 19.03.2013, 19:05 -0400 schrieb Kevin O'Connor: Basically everything under the BIOS interfaces menu is low-level and should not be changed without understanding the implications. (If one disables the boot interface, it should not be surprising that the machine can not boot.) Again as in the other thread this probably stems from the fact that I have the (wrong(?)) assumption that BIOS interfaces are not needed for GRUB or Linux. Both grub and Linux can invoke BIOS calls. Grub 1 will certainly require bios calls; it may be possible to compile grub 2 so that it doesn't require bios calls, but that's not going to be anything out of the box. Reading »The Master Boot Record (MBR) and Why it is Necessary?« [1] to see what INT 19 is doing, it looks like in my setup (coreboot → SeaBIOS (payload) → GRUB 2 on hard drive) no BIOS *boot* interface is needed. Looking at SeaBIOS‘ debug message written to serial 07.765: Add to e820 map: c7fd 0001 1 07.765: Returned 65536 bytes of ZoneHigh 07.765: e820 map has 7 items: 07.765: 0: - 0009fc00 = 1 RAM 07.765: 1: 0009fc00 - 000a = 2 RESERVED 07.765: 2: 000f - 0010 = 2 RESERVED 07.765: 3: 0010 - c7fe = 1 RAM 07.765: 4: c7fe - e000 = 2 RESERVED 07.765: 5: f800 - f900 = 2 RESERVED 07.765: 6: 0001 - 00021efffc00 = 1 RAM 07.765: Jump to int19 07.765: enter handle_19: 07.765: NULL 07.765: Boot support not compiled in. and looking at the code, it looks like this is indeed GRUB 2 independent and maybe the Kconfig option for BIOS boot interface should be renamed to for example Boot support and moved under the General menu. Maybe if you explain what it is you're trying to accomplish then some direction could be given. I want to make the SeaBIOS payload for coreboot as small as possible and still want to boot from my AHCI hard drive (SATA) using GRUB 2 from Debian Sid/unstable (with working graphics, that means loading the option ROM for AMD/ATI wrestler. If you want a smaller payload - use lzma compression. With compression the SeaBIOS payload uses ~50K of rom space. I am under 64 KB without compression when taking out the BIOS boot interface. ;-) If your using the onboard VGA - be sure to lzma compress the vga option ROM as well. Good idea. Especially as I still have to wait for the hard drive to spin up. If for some reason 50K is still too big then it is possible to disable unneeded drivers under the Hardware Support menu. Already did that. I have just AHCI support and some USB support enabled. However, I'd be curious to why 50K is too big on the ASRock - that should have a plenty large rom. Yes, currently it has a 4 MB flash chip. Later I want to put an initramfs image on there too (I have a LUKS encrypted drive), so every bit is going to count. ;-) For space reductions, you'd almost certainly find bigger wins slimming down coreboot than trying to cut features out of seabios. That is probably true. Nevertheless it would be nice if it is clear for noobs like me, what certain option do and what effects they have. Thanks, Paul [1] http://www.dewassoc.com/kbase/hard_drives/master_boot_record.htm signature.asc Description: This is a digitally signed message part ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] src/Kconfig: Add note that boot interface is needed
Paul Menzel wrote: it would be nice if it is clear for noobs like me, what certain option do and what effects they have. The good way to fix that is for you to send patches for the Kconfig help messages. *After* you have researched what the options do. //Peter pgptDFHdnLwQL.pgp Description: PGP signature ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [Qemu-devel] [RFC PATCH v4 07/30] Add SIZE type to qdev properties
On 03/20/2013 12:06 AM, li guang wrote: +return snprintf(dest, len, %0.03f%c, (double)*ptr/div, suffixes[i]); ^^ ^^^ +} + IMHO, you may need (double)(*ptr/div), for type cast is right associated. No, the code as written is correct, and your proposal would be wrong. As written, it is evaluated as: ((double)*ptr) / div which promotes the division to floating point. Your proposal would do the division (*ptr/div) as an integral (truncating) division, and only then cast the result to double. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. For example: Acked-by: Michael S. Tsirkin m...@redhat.com Thanks! Signed-off-by: Michael S. Tsirkin m...@redhat.com diff --git a/src/acpi-dsdt-cpu-hotplug.dsl b/src/acpi-dsdt-cpu-hotplug.dsl index 0f3e83b..c96ac42 100644 --- a/src/acpi-dsdt-cpu-hotplug.dsl +++ b/src/acpi-dsdt-cpu-hotplug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * CPU hotplug / diff --git a/src/acpi-dsdt-dbug.dsl b/src/acpi-dsdt-dbug.dsl index 276321f..86230f7 100644 --- a/src/acpi-dsdt-dbug.dsl +++ b/src/acpi-dsdt-dbug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * Debugging / diff --git a/src/acpi-dsdt-hpet.dsl b/src/acpi-dsdt-hpet.dsl index f33e527..dfde174 100644 --- a/src/acpi-dsdt-hpet.dsl +++ b/src/acpi-dsdt-hpet.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * HPET / diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..89caa16 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { diff --git a/src/acpi-dsdt-pci-crs.dsl b/src/acpi-dsdt-pci-crs.dsl index d421891..b375a19 100644 --- a/src/acpi-dsdt-pci-crs.dsl +++ b/src/acpi-dsdt-pci-crs.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it
Re: [SeaBIOS] [Qemu-devel] [RESEND PATCH v2] pciinit: Enable default VGA device
On Wed, 2013-03-20 at 08:17 +0100, Gerd Hoffmann wrote: Hi, Turns out it's this: commit 76e58028d28e78431f9de3cee0b3c88d807fa39d Author: Kevin O'Connor ke...@koconnor.net Date: Wed Mar 6 21:50:09 2013 -0500 acpi: Eliminate BDAT parameter passing to DSDT code. The BDAT construct is the only ACPI mechanism that relies on SeaBIOS reserved memory. Replace it with the SSDT based template system. Signed-off-by: Kevin O'Connor ke...@koconnor.net That is most likely dsdt + bios.bin not being in sync. Simply using 'qemu -bios /path/to/seabios/out/bios.bin' doesn't fly due to qemu using a non-matching dsdt then. With qemu/master you can just use 'qemu -L /path/to/seabios/out' instead and qemu will pick up both bios.bin and dsdt from the fresh seabios build directory then (and anything else it doesn't find there from the default locations). Thanks, yes that's it. QEMU only seems to look in the -L path or the current directory for the missing files, so it's a bit messy but works. I'll just go ahead and roll a v3 of the VGA patch that converts to wmask since I'm muddied the waters on v2 here. Thanks, Alex ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
On 2013-03-20 16:57, Michael S. Tsirkin wrote: You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. For example: Acked-by: Michael S. Tsirkin m...@redhat.com Thanks! Signed-off-by: Michael S. Tsirkin m...@redhat.com diff --git a/src/acpi-dsdt-cpu-hotplug.dsl b/src/acpi-dsdt-cpu-hotplug.dsl index 0f3e83b..c96ac42 100644 --- a/src/acpi-dsdt-cpu-hotplug.dsl +++ b/src/acpi-dsdt-cpu-hotplug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * CPU hotplug / diff --git a/src/acpi-dsdt-dbug.dsl b/src/acpi-dsdt-dbug.dsl index 276321f..86230f7 100644 --- a/src/acpi-dsdt-dbug.dsl +++ b/src/acpi-dsdt-dbug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * Debugging / diff --git a/src/acpi-dsdt-hpet.dsl b/src/acpi-dsdt-hpet.dsl index f33e527..dfde174 100644 --- a/src/acpi-dsdt-hpet.dsl +++ b/src/acpi-dsdt-hpet.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * HPET / diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..89caa16 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { diff --git a/src/acpi-dsdt-pci-crs.dsl b/src/acpi-dsdt-pci-crs.dsl index
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
On Wed, Mar 20, 2013 at 05:57:53PM +0200, Michael S. Tsirkin wrote: You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. For example: Acked-by: Michael S. Tsirkin m...@redhat.com Thanks! Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Gleb Natapov g...@redhat.com -- Gleb. ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [Qemu-devel] [RESEND PATCH v2] pciinit: Enable default VGA device
Hi, With qemu/master you can just use 'qemu -L /path/to/seabios/out' instead and qemu will pick up both bios.bin and dsdt from the fresh seabios build directory then (and anything else it doesn't find there from the default locations). Thanks, yes that's it. QEMU only seems to look in the -L path or the current directory for the missing files, so it's a bit messy but works. You can specify -L multiple times now (master only, not in 1.4.0) and create a search path that way. HTH, Gerd ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [Qemu-devel] [RESEND PATCH v2] pciinit: Enable default VGA device
On Wed, 2013-03-20 at 17:46 +0100, Gerd Hoffmann wrote: Hi, With qemu/master you can just use 'qemu -L /path/to/seabios/out' instead and qemu will pick up both bios.bin and dsdt from the fresh seabios build directory then (and anything else it doesn't find there from the default locations). Thanks, yes that's it. QEMU only seems to look in the -L path or the current directory for the missing files, so it's a bit messy but works. You can specify -L multiple times now (master only, not in 1.4.0) and create a search path that way. Awesome. Thanks ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH v3] pciinit: Enable default VGA device
As QEMU gains PCI bridge and PCIe root port support, we won't always find the VGA device on the root bus. We therefore need to add support to find and enable a VGA device and the path to it through the VGA Enable support in the PCI bridge control register. Signed-off-by: Alex Williamson alex.william...@redhat.com --- v3: use pci_config_maskw() to trim out some code v2: move to qemu specific pciinit.c src/optionroms.c |2 +- src/pciinit.c| 40 src/util.h |1 + 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/optionroms.c b/src/optionroms.c index caa2151..ac92613 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -213,7 +213,7 @@ run_file_roms(const char *prefix, int isvga, u64 *sources) / // Verify device is a vga device with legacy address decoding enabled. -static int +int is_pci_vga(struct pci_device *pci) { if (pci-class != PCI_CLASS_DISPLAY_VGA) diff --git a/src/pciinit.c b/src/pciinit.c index ce0a4cc..bb9355f 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -316,6 +316,44 @@ static void pci_bios_init_devices(void) } } +static void pci_enable_default_vga(void) +{ +struct pci_device *pci; + +foreachpci(pci) { +if (is_pci_vga(pci)) { +dprintf(1, PCI: Using %02x:%02x.%x for primary VGA\n, +pci_bdf_to_bus(pci-bdf), pci_bdf_to_dev(pci-bdf), +pci_bdf_to_fn(pci-bdf)); +return; +} +} + +pci = pci_find_class(PCI_CLASS_DISPLAY_VGA); +if (!pci) { +dprintf(1, PCI: No VGA devices found\n); +return; +} + +dprintf(1, PCI: Enabling %02x:%02x.%x for primary VGA\n, +pci_bdf_to_bus(pci-bdf), pci_bdf_to_dev(pci-bdf), +pci_bdf_to_fn(pci-bdf)); + +pci_config_maskw(pci-bdf, PCI_COMMAND, 0, + PCI_COMMAND_IO | PCI_COMMAND_MEMORY); + +while (pci-parent) { +pci = pci-parent; + +dprintf(1, PCI: Setting VGA enable on bridge %02x:%02x.%x\n, +pci_bdf_to_bus(pci-bdf), pci_bdf_to_dev(pci-bdf), +pci_bdf_to_fn(pci-bdf)); + +pci_config_maskw(pci-bdf, PCI_BRIDGE_CONTROL, 0, PCI_BRIDGE_CTL_VGA); +pci_config_maskw(pci-bdf, PCI_COMMAND, 0, + PCI_COMMAND_IO | PCI_COMMAND_MEMORY); +} +} / * Platform device initialization @@ -804,4 +842,6 @@ pci_setup(void) pci_bios_init_devices(); free(busses); + +pci_enable_default_vga(); } diff --git a/src/util.h b/src/util.h index af029fc..99aff78 100644 --- a/src/util.h +++ b/src/util.h @@ -344,6 +344,7 @@ void vgahook_setup(struct pci_device *pci); // optionroms.c void call_bcv(u16 seg, u16 ip); +int is_pci_vga(struct pci_device *pci); void optionrom_setup(void); void vgarom_setup(void); void s3_resume_vga(void); ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH v3] pciinit: Enable default VGA device
Dear Alex, Am Mittwoch, den 20.03.2013, 10:58 -0600 schrieb Alex Williamson: As QEMU gains PCI bridge and PCIe root port support, could you give a commit or version for QEMU please. we won't always find the VGA device on the root bus. We therefore need to add support to find and enable a VGA device and the path to it through the VGA Enable support in the PCI bridge control register. Just to be sure, did you test this with older QEMU too? Signed-off-by: Alex Williamson alex.william...@redhat.com --- v3: use pci_config_maskw() to trim out some code v2: move to qemu specific pciinit.c src/optionroms.c |2 +- src/pciinit.c| 40 src/util.h |1 + 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/optionroms.c b/src/optionroms.c index caa2151..ac92613 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -213,7 +213,7 @@ run_file_roms(const char *prefix, int isvga, u64 *sources) / // Verify device is a vga device with legacy address decoding enabled. -static int +int is_pci_vga(struct pci_device *pci) { if (pci-class != PCI_CLASS_DISPLAY_VGA) diff --git a/src/pciinit.c b/src/pciinit.c index ce0a4cc..bb9355f 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -316,6 +316,44 @@ static void pci_bios_init_devices(void) } } +static void pci_enable_default_vga(void) +{ +struct pci_device *pci; + +foreachpci(pci) { +if (is_pci_vga(pci)) { +dprintf(1, PCI: Using %02x:%02x.%x for primary VGA\n, +pci_bdf_to_bus(pci-bdf), pci_bdf_to_dev(pci-bdf), +pci_bdf_to_fn(pci-bdf)); As this is used several times, a function returning a string with %02x:% 02x.%x would be handy. +return; +} +} […] Acked-by: Paul Menzel paulepan...@users.sourceforge.net Thahks, Paul signature.asc Description: This is a digitally signed message part ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH v3] pciinit: Enable default VGA device
On Wed, 2013-03-20 at 19:05 +0100, Paul Menzel wrote: Dear Alex, Am Mittwoch, den 20.03.2013, 10:58 -0600 schrieb Alex Williamson: As QEMU gains PCI bridge and PCIe root port support, could you give a commit or version for QEMU please. This would be targeted towards QEMU 1.5. Michael recently sent a pull request with this patch to enable VGA routing in bridges: https://git.kernel.org/cgit/virt/kvm/mst/qemu.git/commit/?h=pciid=e475aeac3e2e7f6632c3ea7e83f4431c0ba3a467 It's difficult to make use of without an assigned VGA device, which I plan to start posting soon. we won't always find the VGA device on the root bus. We therefore need to add support to find and enable a VGA device and the path to it through the VGA Enable support in the PCI bridge control register. Just to be sure, did you test this with older QEMU too? Yes, it works with the QEMU 1.2.x shipped in F18. Any existing QEMU configuration is going to have the VGA device on the host bridge and therefore bail out on the first loop, having done nothing other than add a debug print. Signed-off-by: Alex Williamson alex.william...@redhat.com --- v3: use pci_config_maskw() to trim out some code v2: move to qemu specific pciinit.c src/optionroms.c |2 +- src/pciinit.c| 40 src/util.h |1 + 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/optionroms.c b/src/optionroms.c index caa2151..ac92613 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -213,7 +213,7 @@ run_file_roms(const char *prefix, int isvga, u64 *sources) / // Verify device is a vga device with legacy address decoding enabled. -static int +int is_pci_vga(struct pci_device *pci) { if (pci-class != PCI_CLASS_DISPLAY_VGA) diff --git a/src/pciinit.c b/src/pciinit.c index ce0a4cc..bb9355f 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -316,6 +316,44 @@ static void pci_bios_init_devices(void) } } +static void pci_enable_default_vga(void) +{ +struct pci_device *pci; + +foreachpci(pci) { +if (is_pci_vga(pci)) { +dprintf(1, PCI: Using %02x:%02x.%x for primary VGA\n, +pci_bdf_to_bus(pci-bdf), pci_bdf_to_dev(pci-bdf), +pci_bdf_to_fn(pci-bdf)); As this is used several times, a function returning a string with %02x:% 02x.%x would be handy. +return; +} +} […] Acked-by: Paul Menzel paulepan...@users.sourceforge.net Thanks! Alex ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
On Wed, Mar 20, 2013 at 05:57:53PM +0200, Michael S. Tsirkin wrote: You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. For example: Acked-by: Michael S. Tsirkin m...@redhat.com Thanks! Signed-off-by: Michael S. Tsirkin m...@redhat.com diff --git a/src/acpi-dsdt-cpu-hotplug.dsl b/src/acpi-dsdt-cpu-hotplug.dsl index 0f3e83b..c96ac42 100644 --- a/src/acpi-dsdt-cpu-hotplug.dsl +++ b/src/acpi-dsdt-cpu-hotplug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * CPU hotplug / diff --git a/src/acpi-dsdt-dbug.dsl b/src/acpi-dsdt-dbug.dsl index 276321f..86230f7 100644 --- a/src/acpi-dsdt-dbug.dsl +++ b/src/acpi-dsdt-dbug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * Debugging / diff --git a/src/acpi-dsdt-hpet.dsl b/src/acpi-dsdt-hpet.dsl index f33e527..dfde174 100644 --- a/src/acpi-dsdt-hpet.dsl +++ b/src/acpi-dsdt-hpet.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * HPET / diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..89caa16 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { diff --git a/src/acpi-dsdt-pci-crs.dsl
[SeaBIOS] [PATCH 2/2] accept MADT over fw_cfg
Signed-off-by: Laszlo Ersek ler...@redhat.com --- src/acpi.c | 19 --- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/acpi.c b/src/acpi.c index 8bbc92b..611553e 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -797,13 +797,13 @@ acpi_setup(void) struct fadt_descriptor_rev1 *fadt = build_fadt(pci); ACPI_INIT_TABLE(fadt); ACPI_INIT_TABLE(build_ssdt()); -ACPI_INIT_TABLE(build_madt()); ACPI_INIT_TABLE(build_hpet()); ACPI_INIT_TABLE(build_srat()); if (pci-device == PCI_DEVICE_ID_INTEL_ICH9_LPC) ACPI_INIT_TABLE(build_mcfg_q35()); struct romfile_s *file = NULL; +int madt_found = 0; for (;;) { file = romfile_findprefix(acpi/, file); if (!file) @@ -816,13 +816,19 @@ acpi_setup(void) int ret = file-copy(file, table, file-size); if (ret = sizeof(*table)) continue; -if (table-signature == DSDT_SIGNATURE) { +switch (table-signature) { +case DSDT_SIGNATURE: if (fadt) { fill_dsdt(fadt, table); } -} else { +break; +case APIC_SIGNATURE: +madt_found = 1; +/* fall through */ +default: ACPI_INIT_TABLE(table); } + if (tbl_idx == MAX_ACPI_TABLES) { warn_noalloc(); break; @@ -838,6 +844,13 @@ acpi_setup(void) memcpy(dsdt, AmlCode, sizeof(AmlCode)); fill_dsdt(fadt, dsdt); } +if (!madt_found) { +if (tbl_idx == MAX_ACPI_TABLES) { +warn_noalloc(); +return; +} +ACPI_INIT_TABLE(build_madt()); +} // Build final rsdt table struct rsdt_descriptor_rev1 *rsdt; -- 1.7.1 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH 1/2] build_madt(): fix intsrcovr-{gsi, flags} and local_nmi-flags byte order
These fields are wider than a single byte; stick to cpu_to_leXX() for consistency with other field settings in this function. Signed-off-by: Laszlo Ersek ler...@redhat.com --- src/acpi.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/acpi.c b/src/acpi.c index 119d1c1..8bbc92b 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -367,8 +367,9 @@ build_madt(void) intsrcovr-type = APIC_XRUPT_OVERRIDE; intsrcovr-length = sizeof(*intsrcovr); intsrcovr-source = 0; -intsrcovr-gsi= 2; -intsrcovr-flags = 0; /* conforms to bus specifications */ +intsrcovr-gsi= cpu_to_le32(2); +intsrcovr-flags = cpu_to_le16(0); +/* conforms to bus specifications */ intsrcovr++; } for (i = 1; i 16; i++) { @@ -379,8 +380,9 @@ build_madt(void) intsrcovr-type = APIC_XRUPT_OVERRIDE; intsrcovr-length = sizeof(*intsrcovr); intsrcovr-source = i; -intsrcovr-gsi= i; -intsrcovr-flags = 0xd; /* active high, level triggered */ +intsrcovr-gsi= cpu_to_le32(i); +intsrcovr-flags = cpu_to_le16(0xd); +/* active high, level triggered */ intsrcovr++; } @@ -388,7 +390,7 @@ build_madt(void) local_nmi-type = APIC_LOCAL_NMI; local_nmi-length = sizeof(*local_nmi); local_nmi-processor_id = 0xff; /* all processors */ -local_nmi-flags= 0; +local_nmi-flags= cpu_to_le16(0); local_nmi-lint = 1; /* LINT1 */ local_nmi++; -- 1.7.1 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH 0/2] accept MADT over fw_cfg
The first patch cleans up some field assignments in build_madt(). The second one handles the case when MADT is provided by qemu over fw_cfg. I'll soon post the qemu-side series as well. I cross-tested {patched, unpatched} qemu with {patched, unpatched} seabios. Inside a RHEL-6 guest I dumped the RSDT, DSDT, and APIC (MADT) in all four cases, and compared the results. Patched qemu with unpatched seabios don't play nicely together (two APIC (MADT) tables present). Otherwise everything seemed fine to me. The CPU topology was set with -smp 3,maxcpus=16,sockets=2,cores=4,threads=2 The table dumps / disassemblies are too big to include here, please find them at http://people.redhat.com/~lersek/acpi_move/madt_tests.tar.gz. Laszlo Ersek (2): build_madt(): fix intsrcovr-{gsi,flags} and local_nmi-flags byte order accept MADT over fw_cfg src/acpi.c | 31 +++ 1 files changed, 23 insertions(+), 8 deletions(-) ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
Il 20/03/2013 16:57, Michael S. Tsirkin ha scritto: You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. For example: Acked-by: Michael S. Tsirkin m...@redhat.com Thanks! Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Paolo Bonzini pbonz...@redhat.com Paolo diff --git a/src/acpi-dsdt-cpu-hotplug.dsl b/src/acpi-dsdt-cpu-hotplug.dsl index 0f3e83b..c96ac42 100644 --- a/src/acpi-dsdt-cpu-hotplug.dsl +++ b/src/acpi-dsdt-cpu-hotplug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * CPU hotplug / diff --git a/src/acpi-dsdt-dbug.dsl b/src/acpi-dsdt-dbug.dsl index 276321f..86230f7 100644 --- a/src/acpi-dsdt-dbug.dsl +++ b/src/acpi-dsdt-dbug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * Debugging / diff --git a/src/acpi-dsdt-hpet.dsl b/src/acpi-dsdt-hpet.dsl index f33e527..dfde174 100644 --- a/src/acpi-dsdt-hpet.dsl +++ b/src/acpi-dsdt-hpet.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * HPET / diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..89caa16 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { diff --git
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
On 03/20/2013 11:57 AM, Michael S. Tsirkin wrote: You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. Acked-by: Jason Baron jba...@akamai.com Thanks, -Jason ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
On Wed, Mar 20, 2013 at 05:57:53PM +0200, Michael S. Tsirkin wrote: You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Kevin O'Connor ke...@koconnor.net -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 1/2] build_madt(): fix intsrcovr-{gsi, flags} and local_nmi-flags byte order
On Wed, Mar 20, 2013 at 10:53:04PM +0100, Laszlo Ersek wrote: These fields are wider than a single byte; stick to cpu_to_leXX() for consistency with other field settings in this function. Thanks. We can do this to improve documentation. Please ack that you are okay with licensing under GPLv2+. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
On 03/20/13 16:57, Michael S. Tsirkin wrote: You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. For example: Acked-by: Michael S. Tsirkin m...@redhat.com Thanks! Signed-off-by: Michael S. Tsirkin m...@redhat.com src/acpi-dsdt-cpu-hotplug.dsl| 15 +++ src/acpi-dsdt-dbug.dsl | 15 +++ src/acpi-dsdt-hpet.dsl | 15 +++ src/acpi-dsdt-isa.dsl| 15 +++ src/acpi-dsdt-pci-crs.dsl| 15 +++ src/acpi.c | 14 +- src/acpi.h | 14 ++ src/ssdt-misc.dsl| 15 +++ src/ssdt-pcihp.dsl | 15 +++ src/ssdt-proc.dsl| 15 +++ tools/acpi_extract.py| 13 - tools/acpi_extract_preprocess.py | 13 - 12 files changed, 171 insertions(+), 3 deletions(-) Just a note: for my recent series to qemu-devel http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg03575.html, I didn't copy code from seabios to qemu (file-wise, clipboard-wise, hand-eye-coordination-wise, or otherwise). For me read, understand, write new code seems to work best. (I obviously *did* consult (= read) src/acpi.* (hence the patch for build_madt() too). That activity probably didn't require this patch (= the permissions of the copyright holders), but I agree that the patch builds a safer ground even for my approach.) Laszlo ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 1/2] build_madt(): fix intsrcovr-{gsi, flags} and local_nmi-flags byte order
On 03/21/13 00:52, Kevin O'Connor wrote: On Wed, Mar 20, 2013 at 10:53:04PM +0100, Laszlo Ersek wrote: These fields are wider than a single byte; stick to cpu_to_leXX() for consistency with other field settings in this function. Thanks. We can do this to improve documentation. Please ack that you are okay with licensing under GPLv2+. Surprisingly, my patch has just moved me into the target audience of Michael's patch. Will ACK. Thanks Laszlo ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
On 03/20/13 16:57, Michael S. Tsirkin wrote: You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. For example: Acked-by: Michael S. Tsirkin m...@redhat.com Thanks! Signed-off-by: Michael S. Tsirkin m...@redhat.com diff --git a/src/acpi.c b/src/acpi.c index 88abc09..4ed5b11 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -3,7 +3,19 @@ // Copyright (C) 2008-2010 Kevin O'Connor ke...@koconnor.net // Copyright (C) 2006 Fabrice Bellard // -// This file may be distributed under the terms of the GNU LGPLv3 license. +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this program; if not, see http://www.gnu.org/licenses/. + #include acpi.h // struct rsdp_descriptor #include util.h // memcpy With reference to http://www.seabios.org/pipermail/seabios/2013-March/005960.html: Acked-by: Laszlo Ersek ler...@redhat.com ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
Acked-by: Kenji Kaneshige kaneshige.ke...@jp.fujitsu.com Regards, Kenji Kaneshige -Original Message- From: Michael S. Tsirkin [mailto:m...@redhat.com] Sent: Thursday, March 21, 2013 12:58 AM To: seabios@seabios.org Cc: David Woodhouse; Eduardo Habkost; Gerd Hoffmann; Gleb Natapov; Isaku Yamahata; Jan Kiszka; Jason Baron; Kaneshige, Kenji/金重 憲治; Kevin O'Connor; Magnus Christensson; Marcelo Tosatti; Paolo Bonzini Subject: [PATCH please reply] make acpi bits GPLv2 compatible You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. For example: Acked-by: Michael S. Tsirkin m...@redhat.com Thanks! Signed-off-by: Michael S. Tsirkin m...@redhat.com diff --git a/src/acpi-dsdt-cpu-hotplug.dsl b/src/acpi-dsdt-cpu-hotplug.dsl index 0f3e83b..c96ac42 100644 --- a/src/acpi-dsdt-cpu-hotplug.dsl +++ b/src/acpi-dsdt-cpu-hotplug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * CPU hotplug / diff --git a/src/acpi-dsdt-dbug.dsl b/src/acpi-dsdt-dbug.dsl index 276321f..86230f7 100644 --- a/src/acpi-dsdt-dbug.dsl +++ b/src/acpi-dsdt-dbug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * Debugging / diff --git a/src/acpi-dsdt-hpet.dsl b/src/acpi-dsdt-hpet.dsl index f33e527..dfde174 100644 --- a/src/acpi-dsdt-hpet.dsl +++ b/src/acpi-dsdt-hpet.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * HPET / diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..89caa16 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY;
Re: [SeaBIOS] [PATCH please reply] make acpi bits GPLv2 compatible
Acked-by: Isaku Yamahata yamah...@valinux.co.jp thanks, On Wed, Mar 20, 2013 at 05:57:53PM +0200, Michael S. Tsirkin wrote: You are getting this mail because you might have contributed code to one of the files in seabios that we want to reuse in QEMU, when this file was under GPLv3 or LGPLv3. QEMU is GPLv2 at the moment, so as a step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. The code was originally LGPLv2 in bochs so these bits are OK. QEMU generally prefers GPLv2 or later, so this is what this patch does. The plan is therefore: - collect acks from everyone - copy code to QEMU and apply this patch to QEMU copy only If you allow the use of your contribution in QEMU under the terms of GPLv2 or later as proposed by this patch, please respond to this mail including the line: Acked-by: Name email address in the message body. For example: Acked-by: Michael S. Tsirkin m...@redhat.com Thanks! Signed-off-by: Michael S. Tsirkin m...@redhat.com diff --git a/src/acpi-dsdt-cpu-hotplug.dsl b/src/acpi-dsdt-cpu-hotplug.dsl index 0f3e83b..c96ac42 100644 --- a/src/acpi-dsdt-cpu-hotplug.dsl +++ b/src/acpi-dsdt-cpu-hotplug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * CPU hotplug / diff --git a/src/acpi-dsdt-dbug.dsl b/src/acpi-dsdt-dbug.dsl index 276321f..86230f7 100644 --- a/src/acpi-dsdt-dbug.dsl +++ b/src/acpi-dsdt-dbug.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * Debugging / diff --git a/src/acpi-dsdt-hpet.dsl b/src/acpi-dsdt-hpet.dsl index f33e527..dfde174 100644 --- a/src/acpi-dsdt-hpet.dsl +++ b/src/acpi-dsdt-hpet.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + / * HPET / diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..89caa16 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -1,3 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see http://www.gnu.org/licenses/. + */ + /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) {