Re: [SeaBIOS] [PATCH 0/2][RFC] Reduce mptable code dependencies
On Mon, Mar 18, 2013 at 08:38:59PM -0400, Kevin O'Connor wrote: > These two patches should make the mptable code easier to move out of > SeaBIOS and into QEMU. The first patch stops the mptable from > describing PCI-to-PCI bridges - I don't believe it was the goal (or a > requirement) of the mptable to describe bridges. The second patch > synchs the list of PCI irqs between the ACPI code and the mptable > code. This has only been lightly tested. > > Thoughts? > I wish I would remember why I added PCI bus enumeration code, but I think you are right. If there is more then one PCI domain then each one of them should be listed, but PCI-to-PCI bridges are part of the same bus. -- Gleb. ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VGA Option ROM not set up correctly when loaded by coreboot and not SeaBIOS
On Mon, 18 Mar 2013 15:13:32 +0100 Christian Gmeiner wrote: > 2013/3/18 Paul Menzel : > > Dear SeaBIOS, > > > > > > using the AMD/ATI based ASRock E350M1 [1] with coreboot and SeaBIOS > > 1.7.2.1 as a payload and GRUB 2 (1.99-27 from Debian Sid/unstable) > > on the hard drive, letting coreboot load the VGA Option ROM and > > disabling »Option ROMs« in the menu »BIOS interfaces« > > > > config OPTIONROMS > > bool "Option ROMS" > > default y # I set it to n. > > help > > Support finding and running option roms during > > POST. > > > > I only see »AMD Wrestler …« printed to the screen (from the VGA > > Option ROM loaded by coreboot I guess) and I neither see the > > SeaBIOS header(?) with version nor the bootmenu. GRUB 2 does not > > show its (terminal) menu either and just shows funny, colorful > > characters covering the whole screen. > > > > http://www.coreboot.org/SeaBIOS#coreboot - do not load the vga option > rom in coreboot - do it in seabios. Maybe it's an issue in coreboot instead? does it do the same thing with another payload? like grub2 directly for instance ? Denis. ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 0/2][RFC] Reduce mptable code dependencies
On Tue, Mar 19, 2013 at 02:09:05AM +0100, Peter Stuge wrote: > Kevin O'Connor wrote: > > Thoughts? > > I wish this effort could go into coreboot instead, so that it could > benefit more than only one machine. > The code is QEMU specific. What other machines are you talking about? -- Gleb. ___ 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-10四的 19:57 +0100,Vasilis Liaskovitis写道: > > > > > > IIRC q35 supports memory hotplug natively (picked up in some > > > discussion). Is that correct? > > > > > From previous discussion I also understand that q35 supports native > > hotplug. > > Sections 5.1 and 5.2 of the spec describe the MCH registers but the native > > memory hotplug specifics are not yet clear to me. Any pointers from the > > spec are welcome. > > Ping. Could anyone who's familiar with the q35 spec provide some pointers on > native memory hotplug details in the spec? I see pcie hotplug registers but > can't > find memory hotplug interface details. If I am not mistaken, the spec is here: > http://www.intel.com/design/chipsets/datashts/316966.htm > > Is the q35 memory hotplug support supposed to be an shpc-like interface geared > towards memory slots instead of pci slots? > seems there's no so-called q35-native support ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [RESEND PATCH v2] 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 --- src/optionroms.c |2 +- src/pciinit.c| 45 + src/util.h |1 + 3 files changed, 47 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..eb49a76 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -316,6 +316,49 @@ 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)); + +u16 cmd = pci_config_readw(pci->bdf, PCI_COMMAND); +cmd |= PCI_COMMAND_IO | PCI_COMMAND_MEMORY; +pci_config_writew(pci->bdf, PCI_COMMAND, cmd); + +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)); + +u8 ctrl = pci_config_readb(pci->bdf, PCI_BRIDGE_CONTROL); +ctrl |= PCI_BRIDGE_CTL_VGA; +pci_config_writeb(pci->bdf, PCI_BRIDGE_CONTROL, ctrl); + +u16 cmd = pci_config_readw(pci->bdf, PCI_COMMAND); +cmd |= PCI_COMMAND_IO | PCI_COMMAND_MEMORY; +pci_config_writew(pci->bdf, PCI_COMMAND, cmd); +} +} / * Platform device initialization @@ -804,4 +847,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] [PATCHv2] acpi: make default DSDT optional
Michael S. Tsirkin wrote: > Also, in qemu I don't think we want to carry around code we never use. I'm sure you know that the SeaBIOS world is a lot more than just QEMU, so probably it makes sense to not change whatever the default was before your change. I get the impression that you have. //Peter ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 0/2][RFC] Reduce mptable code dependencies
Kevin O'Connor wrote: > Thoughts? I wish this effort could go into coreboot instead, so that it could benefit more than only one machine. //Peter ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 0/2] Fix booting tcm_vhost + seabios
On Mon, Mar 18, 2013 at 02:26:14PM -0700, Nicholas A. Bellinger wrote: > On Fri, 2013-03-15 at 09:45 +0800, Asias He wrote: > > Asias He (2): > > virtio-scsi: Set _DRIVER_OK flag before scsi target scanning > > virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} > > > > src/virtio-scsi.c | 5 +++-- > > src/virtio-scsi.h | 4 ++-- > > 2 files changed, 5 insertions(+), 4 deletions(-) > > > > Hi Asias, > > Thanks for taking the initiative on this, and nice work tracking both of > these stubborn bugs down. > > So with these out of the way, we're good to go for an RFC of Paolo's > vhost-scsi-pci code for upstream QEMU, yes..? > > I'll have some extra bandwidth this week to spend time on the RFC if > you'd like, otherwise I'm happy with you making the upstream QEMU push > for Paolo's code. > > Whatever works best for you. :) Nice, Nicholas, go ahead. I have sent out the WIP V3 for you ;-) > Thank you, > > --nab > > > -- Asias ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH 2/2] mptable: Use same PCI irqs as ACPI code.
The ACPI code has a hardcoded list of PCI interrupts. Use that same list in the mptable code generation. This will ensure that both tables are in synch - it may also make the mptable easier to generate from QEMU. Also, move the irq0_override lookup outside of the irq loop. Signed-off-by: Kevin O'Connor --- src/acpi.c| 5 + src/config.h | 3 +++ src/mptable.c | 8 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/acpi.c b/src/acpi.c index 119d1c1..d1cb653 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -131,9 +131,6 @@ struct madt_io_apic * lines start */ } PACKED; -/* IRQs 5,9,10,11 */ -#define PCI_ISA_IRQ_MASK0x0e20 - struct madt_intsrcovr { ACPI_SUB_HEADER_DEF u8 bus; @@ -372,7 +369,7 @@ build_madt(void) intsrcovr++; } for (i = 1; i < 16; i++) { -if (!(PCI_ISA_IRQ_MASK & (1 << i))) +if (!(BUILD_PCI_IRQS & (1 << i))) /* No need for a INT source override structure. */ continue; memset(intsrcovr, 0, sizeof(*intsrcovr)); diff --git a/src/config.h b/src/config.h index 8b888b9..64e3c92 100644 --- a/src/config.h +++ b/src/config.h @@ -53,6 +53,9 @@ #define BUILD_HPET_ADDRESS0xfed0 #define BUILD_APIC_ADDR 0xfee0 +// PCI IRQS +#define BUILD_PCI_IRQS ((1<<5) | (1<<9) | (1<<10) | (1<<11)) + // Important real-mode segments #define SEG_IVT 0x #define SEG_BDA 0x0040 diff --git a/src/mptable.c b/src/mptable.c index de188ca..7d485eb 100644 --- a/src/mptable.c +++ b/src/mptable.c @@ -99,7 +99,7 @@ mptable_setup(void) /* irqs */ struct mpt_intsrc *intsrcs = (void*)&ioapic[1], *intsrc = intsrcs; int dev = -1; -unsigned short mask = 0, pinmask = 0; +unsigned short pinmask = 0; struct pci_device *pci; foreachpci(pci) { @@ -117,7 +117,6 @@ mptable_setup(void) if (pinmask & (1 << pin)) /* pin was seen already */ continue; pinmask |= (1 << pin); -mask |= (1 << irq); memset(intsrc, 0, sizeof(*intsrc)); intsrc->type = MPT_TYPE_INTSRC; intsrc->irqtype = 0; /* INT */ @@ -129,9 +128,10 @@ mptable_setup(void) intsrc++; } +int irq0_override = romfile_loadint("etc/irq0-override", 0); for (i = 0; i < 16; i++) { memset(intsrc, 0, sizeof(*intsrc)); -if (mask & (1 << i)) +if (BUILD_PCI_IRQS & (1 << i)) continue; intsrc->type = MPT_TYPE_INTSRC; intsrc->irqtype = 0; /* INT */ @@ -140,7 +140,7 @@ mptable_setup(void) intsrc->srcbusirq = i; intsrc->dstapic = ioapic_id; intsrc->dstirq = i; -if (romfile_loadint("etc/irq0-override", 0)) { +if (irq0_override) { /* Destination 2 is covered by irq0->inti2 override (i == 0). Source IRQ 2 is unused */ if (i == 0) -- 1.7.11.7 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH 1/2] mptable: Don't describe pci-to-pci bridges.
It should not be necessary to describe PCI-to-PCI bridges in the mptable. (The mptable was designed to fit in ROM, so it seems unlikely that it would be used for bridges that could be dynamically added.) Describing only the root bus should make it easier to port this content into QEMU. Signed-off-by: Kevin O'Connor --- src/mptable.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/mptable.c b/src/mptable.c index 0f2d756..de188ca 100644 --- a/src/mptable.c +++ b/src/mptable.c @@ -65,30 +65,25 @@ mptable_setup(void) } int entrycount = cpu - cpus; -// PCI buses +// PCI bus struct mpt_bus *buses = (void*)cpu, *bus = buses; -int lastbus = -1; -struct pci_device *pci; -foreachpci(pci) { -int curbus = pci_bdf_to_bus(pci->bdf); -if (curbus == lastbus) -continue; -lastbus = curbus; +if (PCIDevices) { memset(bus, 0, sizeof(*bus)); bus->type = MPT_TYPE_BUS; -bus->busid = curbus; +bus->busid = 0; memcpy(bus->bustype, "PCI ", sizeof(bus->bustype)); bus++; +entrycount++; } /* isa bus */ -int isabusid; +int isabusid = bus - buses; memset(bus, 0, sizeof(*bus)); bus->type = MPT_TYPE_BUS; -isabusid = bus->busid = lastbus + 1; +bus->busid = isabusid; memcpy(bus->bustype, "ISA ", sizeof(bus->bustype)); bus++; -entrycount += bus - buses; +entrycount++; /* ioapic */ u8 ioapic_id = BUILD_IOAPIC_ID; @@ -106,8 +101,11 @@ mptable_setup(void) int dev = -1; unsigned short mask = 0, pinmask = 0; +struct pci_device *pci; foreachpci(pci) { u16 bdf = pci->bdf; +if (pci_bdf_to_bus(bdf) != 0) +break; int pin = pci_config_readb(bdf, PCI_INTERRUPT_PIN); int irq = pci_config_readb(bdf, PCI_INTERRUPT_LINE); if (pin == 0) -- 1.7.11.7 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH 0/2][RFC] Reduce mptable code dependencies
These two patches should make the mptable code easier to move out of SeaBIOS and into QEMU. The first patch stops the mptable from describing PCI-to-PCI bridges - I don't believe it was the goal (or a requirement) of the mptable to describe bridges. The second patch synchs the list of PCI irqs between the ACPI code and the mptable code. This has only been lightly tested. Thoughts? -Kevin Kevin O'Connor (2): mptable: Don't describe pci-to-pci bridges. mptable: Use same PCI irqs as ACPI code. src/acpi.c| 5 + src/config.h | 3 +++ src/mptable.c | 30 ++ 3 files changed, 18 insertions(+), 20 deletions(-) -- 1.7.11.7 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH RFC dontapply] license: make acpi bits GPLv2 compatible
On Mon, Mar 18, 2013 at 04:14:27PM +0200, Michael S. Tsirkin wrote: > As an intermediate step in the process of moving acpi tables to qemu, we > need to make sure the code we'll be moving is GPLv2 compatible. > I think keeping the relevant files dual-license for a while is the best > way to do this, this way code and bufixes can be shared. > When everything moves to QEMU and if we drop commmon code from seabios, > dual license can go. > > The code was originally GPLv2 in bochs so these bits are OK. FYI - the BIOS code was LGPLv2 in Bochs. > When this RFC looks OK to maintainers I'll follow up with everyone who > contributed code to these files with a request to ack this patch. > > Add a copy of GPLv2 in source, make it clear it only > applies to specific files. > > QEMU generally prefers GPLv2 or later, but GPLv2 is also > accepted. I assumed 'or later' won't be acceptable to Kevin, > further, the DSDTs are currently explictly under GPLv2 so this is > consistent. I actually prefer "or later" - I don't recall why I didn't state that in the beginning. It didn't seem worthwhile to change it later on. As before, I'm okay with relicensing the ACPI files in your patch to GPLv2 (or LGPLv2, with or without "or later"). I don't think it makes sense to commit the GPLv2 license text to SeaBIOS in the interim - as that seems like it could cause confusion. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 0/2] Fix booting tcm_vhost + seabios
On Fri, 2013-03-15 at 09:45 +0800, Asias He wrote: > Asias He (2): > virtio-scsi: Set _DRIVER_OK flag before scsi target scanning > virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} > > src/virtio-scsi.c | 5 +++-- > src/virtio-scsi.h | 4 ++-- > 2 files changed, 5 insertions(+), 4 deletions(-) > Hi Asias, Thanks for taking the initiative on this, and nice work tracking both of these stubborn bugs down. So with these out of the way, we're good to go for an RFC of Paolo's vhost-scsi-pci code for upstream QEMU, yes..? I'll have some extra bandwidth this week to spend time on the RFC if you'd like, otherwise I'm happy with you making the upstream QEMU push for Paolo's code. Whatever works best for you. :) Thank you, --nab ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VGA Option ROM not set up correctly when loaded by coreboot and not SeaBIOS
Am Montag, den 18.03.2013, 15:13 +0100 schrieb Christian Gmeiner: > 2013/3/18 Paul Menzel : > > using the AMD/ATI based ASRock E350M1 [1] with coreboot and SeaBIOS > > 1.7.2.1 as a payload and GRUB 2 (1.99-27 from Debian Sid/unstable) on > > the hard drive, letting coreboot load the VGA Option ROM and disabling > > »Option ROMs« in the menu »BIOS interfaces« > > > > config OPTIONROMS > > bool "Option ROMS" > > default y # I set it to n. > > help > > Support finding and running option roms during POST. > > > > I only see »AMD Wrestler …« printed to the screen (from the VGA Option > > ROM loaded by coreboot I guess) and I neither see the SeaBIOS header(?) > > with version nor the bootmenu. GRUB 2 does not show its (terminal) menu > > either and just shows funny, colorful characters covering the whole > > screen. > > http://www.coreboot.org/SeaBIOS#coreboot - do not load the vga option rom in > coreboot - do it in seabios. Yes, thanks. Though I assumed »best results« would mean, that when using coreboot for loading the VGA Option ROM, that it might decrease performance or something like that and not that Linux does not find the ROM at all. If that is a known issue, a note should be added to the Kconfig description or if coreboot is chosen as a target, then the Option ROM option should be enabled automatically, right? If yes, please say so and I am going to try to come up with a patch. Thanks, 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] src/Kconfig: Spell »Option ROMs« uniformly as in Wikipedia [1]
Wikipedia titles start with a capital letter, hence it is "Option ROM" but in the article, most references are "option ROM" and probably all references should be "option ROM". option being lowercase because it is an English word, and ROM being uppercase because it is an acronym. On Mon, Mar 18, 2013 at 2:44 PM, Paul Menzel < paulepan...@users.sourceforge.net> wrote: > Date: Mon, 18 Mar 2013 14:42:12 +0100 > > [1] http://en.wikipedia.org/wiki/Option_ROM > > Signed-off-by: Paul Menzel > --- > src/Kconfig | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/src/Kconfig b/src/Kconfig > index 3141069..5816cb4 100644 > --- a/src/Kconfig > +++ b/src/Kconfig > @@ -48,14 +48,14 @@ endchoice > Support running hardware initialization in parallel. > config THREAD_OPTIONROMS > depends on THREADS && !CSM > -bool "Hardware init during option ROM execution" > +bool "Hardware init during Option ROM execution" > default n > help > -Allow hardware init to run in parallel with optionrom > execution. > +Allow hardware init to run in parallel with Option ROM > execution. > > This can reduce boot time, but can cause some timing > -variations during option ROM code execution. It is not > -known if all option ROMs will behave properly with this > +variations during Option ROM code execution. It is not > +known if all Option ROMs will behave properly with this > option. > > config RELOCATE_INIT > @@ -304,16 +304,16 @@ menu "BIOS interfaces" > help > Support PnP BIOS entry point. > config OPTIONROMS > -bool "Option ROMS" > +bool "Option ROMs" > default y > help > -Support finding and running option roms during POST. > +Support finding and running Option ROMs during POST. > config OPTIONROMS_DEPLOYED > depends on OPTIONROMS && QEMU > -bool "Option roms are already at 0xc-0xf" > +bool "Option ROMs are already at 0xc-0xf" > default n > help > -Select this if option ROMs are already copied to > +Select this if Option ROMs are already copied to > 0xc-0xf. This must only be selected when using > Bochs or QEMU versions older than 0.12. > config PMM > -- > 1.7.10.4 > > ___ > SeaBIOS mailing list > SeaBIOS@seabios.org > http://www.seabios.org/mailman/listinfo/seabios > > ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCHv3] acpi: make default DSDT optional
Am Montag, den 18.03.2013, 16:17 +0200 schrieb Michael S. Tsirkin: > On Mon, Mar 18, 2013 at 02:22:53PM +0100, Paul Menzel wrote: > > Am Montag, den 18.03.2013, 08:57 -0400 schrieb Kevin O'Connor: > > > On Mon, Mar 18, 2013 at 01:00:42PM +0200, Michael S. Tsirkin wrote: > > > > Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its > > > > Michael, thank you for putting this in. As commit hashes are hard to > > memorize adding the summary to is useful in my opinion. For example for > > this commit like this. > > > > Since commit »acpi: autoload dsdt« (f7e4dd6c) [1] … > > > > […] > > > > [1] > > http://git.qemu.org/?p=qemu.git;a=commit;h=f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 > > > > […] > > URLs are best avoided as servers come and go and git history is > immutable. Not sure what does the summary add - I think > the main thing you would want to do is check whether your > history includes a specific hash. Ok. In this case the version is good enough. But if you backport, cherry-pick or do something different the hash changes too. So in my opinion it is best to have both. > You do it like this: > git log |grep f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 $ git branch --contains f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 > > > > --- a/src/Kconfig > > > > +++ b/src/Kconfig > > > > @@ -387,6 +387,12 @@ menu "BIOS Tables" > > > > default y > > > > help > > > > Support generation of ACPI tables. > > > > +config ACPI_DSDT > > > > +bool "Include default ACPI DSDT" > > > > +default y > > > > +depends on ACPI > > > > +help > > > > +Include default DSDT ACPI table in BIOS. > > > > > > As Paul points out, it would really help if the help stated which > > > released version of QEMU is needed to turn this off. > > > > I just meant the commit message, but it is useful in Kconfig too. Kevin, > > good suggestion. > > OK I put in the QEMU release version in Kconfig, that should be best I think? Yes. Awesome! […] Thanks, 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] [PATCHv3] acpi: make default DSDT optional
On Mon, Mar 18, 2013 at 02:22:53PM +0100, Paul Menzel wrote: > Am Montag, den 18.03.2013, 08:57 -0400 schrieb Kevin O'Connor: > > On Mon, Mar 18, 2013 at 01:00:42PM +0200, Michael S. Tsirkin wrote: > > > Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its > > Michael, thank you for putting this in. As commit hashes are hard to > memorize adding the summary to is useful in my opinion. For example for > this commit like this. > > Since commit »acpi: autoload dsdt« (f7e4dd6c) [1] … > > […] > > [1] > http://git.qemu.org/?p=qemu.git;a=commit;h=f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 > > […] URLs are best avoided as servers come and go and git history is immutable. Not sure what does the summary add - I think the main thing you would want to do is check whether your history includes a specific hash. You do it like this: git log |grep f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 > > > --- a/src/Kconfig > > > +++ b/src/Kconfig > > > @@ -387,6 +387,12 @@ menu "BIOS Tables" > > > default y > > > help > > > Support generation of ACPI tables. > > > +config ACPI_DSDT > > > +bool "Include default ACPI DSDT" > > > +default y > > > +depends on ACPI > > > +help > > > +Include default DSDT ACPI table in BIOS. > > > > As Paul points out, it would really help if the help stated which > > released version of QEMU is needed to turn this off. > > I just meant the commit message, but it is useful in Kconfig too. Kevin, > good suggestion. OK I put in the QEMU release version in Kconfig, that should be best I think? > > > --- a/src/acpi.c > > > +++ b/src/acpi.c > > > @@ -202,7 +202,11 @@ struct srat_memory_affinity > > > u32reserved3[2]; > > > } PACKED; > > > > > > +#ifdef CONFIG_ACPI_DSDT > > > #include "acpi-dsdt.hex" > > > +#else > > > +static u8 AmlCode[1]; > > > +#endif > > > > As Paul points out, the #ifdef doesn't make sense as the symbol is > > always defined. However, lets avoid #ifs and let the build weed this > > out. > > That was Laszlo and not me. ;-) > > > > -if (fadt && !fadt->dsdt) { > > > + > > > +if (fadt && !fadt->dsdt && CONFIG_ACPI_DSDT) { > > > > It would be preferable to make the CONFIG_X be first in the if. > > > Thanks, > > Paul ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VGA Option ROM not set up correctly when loaded by coreboot and not SeaBIOS
2013/3/18 Paul Menzel : > Dear SeaBIOS, > > > using the AMD/ATI based ASRock E350M1 [1] with coreboot and SeaBIOS > 1.7.2.1 as a payload and GRUB 2 (1.99-27 from Debian Sid/unstable) on > the hard drive, letting coreboot load the VGA Option ROM and disabling > »Option ROMs« in the menu »BIOS interfaces« > > config OPTIONROMS > bool "Option ROMS" > default y # I set it to n. > help > Support finding and running option roms during POST. > > I only see »AMD Wrestler …« printed to the screen (from the VGA Option > ROM loaded by coreboot I guess) and I neither see the SeaBIOS header(?) > with version nor the bootmenu. GRUB 2 does not show its (terminal) menu > either and just shows funny, colorful characters covering the whole > screen. > http://www.coreboot.org/SeaBIOS#coreboot - do not load the vga option rom in coreboot - do it in seabios. -- Christian Gmeiner, MSc ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH RFC dontapply] license: make acpi bits GPLv2 compatible
As an intermediate step in the process of moving acpi tables to qemu, we need to make sure the code we'll be moving is GPLv2 compatible. I think keeping the relevant files dual-license for a while is the best way to do this, this way code and bufixes can be shared. When everything moves to QEMU and if we drop commmon code from seabios, dual license can go. The code was originally GPLv2 in bochs so these bits are OK. When this RFC looks OK to maintainers I'll follow up with everyone who contributed code to these files with a request to ack this patch. Add a copy of GPLv2 in source, make it clear it only applies to specific files. QEMU generally prefers GPLv2 or later, but GPLv2 is also accepted. I assumed 'or later' won't be acceptable to Kevin, further, the DSDTs are currently explictly under GPLv2 so this is consistent. Signed-off-by: Michael S. Tsirkin --- COPYINGv2 | 345 ++ src/acpi-dsdt-cpu-hotplug.dsl | 10 ++ src/acpi-dsdt-dbug.dsl| 10 ++ src/acpi-dsdt-hpet.dsl| 10 ++ src/acpi-dsdt-isa.dsl | 10 ++ src/acpi-dsdt-pci-crs.dsl | 10 ++ src/acpi.c| 5 + src/ssdt-misc.dsl | 10 ++ src/ssdt-pcihp.dsl| 10 ++ src/ssdt-proc.dsl | 10 ++ 10 files changed, 430 insertions(+) create mode 100644 COPYINGv2 diff --git a/COPYINGv2 b/COPYINGv2 new file mode 100644 index 000..c239700 --- /dev/null +++ b/COPYINGv2 @@ -0,0 +1,345 @@ +The following license only applies to portions of the program +which explictly mention GPLv2 in their source code. + +-- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program
[SeaBIOS] [PATCH] src/Kconfig: Spell »Option ROMs« uniformly as in Wikipedia [1]
Date: Mon, 18 Mar 2013 14:42:12 +0100 [1] http://en.wikipedia.org/wiki/Option_ROM Signed-off-by: Paul Menzel --- src/Kconfig | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Kconfig b/src/Kconfig index 3141069..5816cb4 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -48,14 +48,14 @@ endchoice Support running hardware initialization in parallel. config THREAD_OPTIONROMS depends on THREADS && !CSM -bool "Hardware init during option ROM execution" +bool "Hardware init during Option ROM execution" default n help -Allow hardware init to run in parallel with optionrom execution. +Allow hardware init to run in parallel with Option ROM execution. This can reduce boot time, but can cause some timing -variations during option ROM code execution. It is not -known if all option ROMs will behave properly with this +variations during Option ROM code execution. It is not +known if all Option ROMs will behave properly with this option. config RELOCATE_INIT @@ -304,16 +304,16 @@ menu "BIOS interfaces" help Support PnP BIOS entry point. config OPTIONROMS -bool "Option ROMS" +bool "Option ROMs" default y help -Support finding and running option roms during POST. +Support finding and running Option ROMs during POST. config OPTIONROMS_DEPLOYED depends on OPTIONROMS && QEMU -bool "Option roms are already at 0xc-0xf" +bool "Option ROMs are already at 0xc-0xf" default n help -Select this if option ROMs are already copied to +Select this if Option ROMs are already copied to 0xc-0xf. This must only be selected when using Bochs or QEMU versions older than 0.12. config PMM -- 1.7.10.4 signature.asc Description: This is a digitally signed message part ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] VGA Option ROM not set up correctly when loaded by coreboot and not SeaBIOS
Dear SeaBIOS, using the AMD/ATI based ASRock E350M1 [1] with coreboot and SeaBIOS 1.7.2.1 as a payload and GRUB 2 (1.99-27 from Debian Sid/unstable) on the hard drive, letting coreboot load the VGA Option ROM and disabling »Option ROMs« in the menu »BIOS interfaces« config OPTIONROMS bool "Option ROMS" default y # I set it to n. help Support finding and running option roms during POST. I only see »AMD Wrestler …« printed to the screen (from the VGA Option ROM loaded by coreboot I guess) and I neither see the SeaBIOS header(?) with version nor the bootmenu. GRUB 2 does not show its (terminal) menu either and just shows funny, colorful characters covering the whole screen. Linux is able to print something to the screen, but Linux’ Radeon driver complains too that it does not find the BIOS ROM and kernel mode setting (KMS) is disabled. [0.00] Linux version 3.2.0-4-686-pae (debian-ker...@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-15) ) #1 SMP Debian 3.2.39-2 [0.00] BIOS-provided physical RAM map: [0.00] BIOS-e820: - 0009fc00 (usable) [0.00] BIOS-e820: 0009fc00 - 000a (reserved) [0.00] BIOS-e820: 000f - 0010 (reserved) [0.00] BIOS-e820: 0010 - c7fe (usable) [0.00] BIOS-e820: c7fe - e000 (reserved) [0.00] BIOS-e820: f800 - f900 (reserved) [0.00] BIOS-e820: 0001 - 00021efffc00 (usable) […] [ 23.180795] calling radeon_init+0x0/0x1000 [radeon] @ 496 [ 23.180809] [drm] radeon kernel modesetting enabled. [ 23.190273] calling patch_realtek_init+0x0/0x1000 [snd_hda_codec_realtek] @ 685 [ 23.190292] initcall patch_realtek_init+0x0/0x1000 [snd_hda_codec_realtek] returned 0 after 1 usecs [ 23.190780] hda_codec: ALC892: SKU not ready 0x0100 [ 23.194435] input: HDA Digital PCBeep as /devices/pci:00/:00:14.2/input/input5 [ 23.203623] input: HDA ATI SB Headphone as /devices/pci:00/:00:14.2/sound/card1/input6 [ 23.204868] initcall alsa_card_azx_init+0x0/0x1000 [snd_hda_intel] returned 0 after 240511 usecs [ 23.215517] radeon :00:01.0: setting latency timer to 64 [ 23.215535] [drm] initializing kernel modesetting (PALM 0x1002:0x9802 0x1002:0x9802). [ 23.215606] [drm] register mmio base: 0xF000 [ 23.215609] [drm] register mmio size: 262144 [ 23.215689] radeon :00:01.0: Invalid ROM contents [ 23.215887] [drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM [ 23.216062] radeon :00:01.0: Fatal error during GPU init [ 23.216187] [drm] radeon: finishing device. [ 23.216191] [TTM] Memory type 2 has not been initialized [ 23.217253] radeon :00:01.0: no bo for sa manager [ 23.217382] vga_switcheroo: disabled [ 23.217781] radeon: probe of :00:01.0 failed with error -22 [ 23.218165] initcall radeon_init+0x0/0x1000 [radeon] returned 0 after 36383 usecs […] Thanks, Paul [1] http://www.coreboot.org/ASRock_E350M1 [2] http://www.coreboot.org/SeaBIOS 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] [PATCHv3] acpi: make default DSDT optional
Am Montag, den 18.03.2013, 08:57 -0400 schrieb Kevin O'Connor: > On Mon, Mar 18, 2013 at 01:00:42PM +0200, Michael S. Tsirkin wrote: > > Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its Michael, thank you for putting this in. As commit hashes are hard to memorize adding the summary to is useful in my opinion. For example for this commit like this. Since commit »acpi: autoload dsdt« (f7e4dd6c) [1] … […] [1] http://git.qemu.org/?p=qemu.git;a=commit;h=f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 […] > > --- a/src/Kconfig > > +++ b/src/Kconfig > > @@ -387,6 +387,12 @@ menu "BIOS Tables" > > default y > > help > > Support generation of ACPI tables. > > +config ACPI_DSDT > > +bool "Include default ACPI DSDT" > > +default y > > +depends on ACPI > > +help > > +Include default DSDT ACPI table in BIOS. > > As Paul points out, it would really help if the help stated which > released version of QEMU is needed to turn this off. I just meant the commit message, but it is useful in Kconfig too. Kevin, good suggestion. > > --- a/src/acpi.c > > +++ b/src/acpi.c > > @@ -202,7 +202,11 @@ struct srat_memory_affinity > > u32reserved3[2]; > > } PACKED; > > > > +#ifdef CONFIG_ACPI_DSDT > > #include "acpi-dsdt.hex" > > +#else > > +static u8 AmlCode[1]; > > +#endif > > As Paul points out, the #ifdef doesn't make sense as the symbol is > always defined. However, lets avoid #ifs and let the build weed this > out. That was Laszlo and not me. ;-) > > -if (fadt && !fadt->dsdt) { > > + > > +if (fadt && !fadt->dsdt && CONFIG_ACPI_DSDT) { > > It would be preferable to make the CONFIG_X be first in the if. Thanks, Paul signature.asc Description: This is a digitally signed message part ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCHv4] acpi: make default DSDT optional
Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its own copy of DSDT, so let's not build in PIIX. This makes building in the DSDT an option, default to on (built-in). If no one complains for a while, we'll be able to switch it off and then maybe remove altogether. With CONFIG_ACPI_DSDT = y Total size: 127348 Fixed: 58892 Free: 3724 (used 97.2% of 128KiB rom) With CONFIG_ACPI_DSDT = n Total size: 122844 Fixed: 58884 Free: 8228 (used 93.7% of 128KiB rom) Signed-off-by: Michael S. Tsirkin --- Changes from v3: - More changes suggested by Laszlo and Kevin, missed in v2. Better document the new option as suggested by Paul and Kevin. Changes from v2: - fixed and extended the commit log addressing comments by Gerd, Laszlo, Paul. No functional changes. Changes from v1: - default the new option to y to reduce disruption to existing users src/Kconfig | 10 ++ src/acpi.c | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Kconfig b/src/Kconfig index 3141069..5796173 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -387,6 +387,16 @@ menu "BIOS Tables" default y help Support generation of ACPI tables. +config ACPI_DSDT +bool "Include default ACPI DSDT" +default y +depends on ACPI +help +Include default DSDT ACPI table in BIOS. +Required for QEMU 1.3 and older. +This option can be disabled for QEMU 1.4 and newer +to save some space in the ROM file. +If unsure, say Y. endmenu source vgasrc/Kconfig diff --git a/src/acpi.c b/src/acpi.c index 119d1c1..88abc09 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -826,7 +826,8 @@ acpi_setup(void) break; } } -if (fadt && !fadt->dsdt) { + +if (CONFIG_ACPI_DSDT && fadt && !fadt->dsdt) { /* default DSDT */ void *dsdt = malloc_high(sizeof(AmlCode)); if (!dsdt) { -- MST ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCHv3] acpi: make default DSDT optional
On Mon, Mar 18, 2013 at 02:03:42PM +0100, Laszlo Ersek wrote: > On 03/18/13 12:00, Michael S. Tsirkin wrote: > > Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its > > own copy of DSDT, so let's not build in PIIX. This makes building in > > the DSDT an option, default to on (built-in). > > For the builds bundled with qemu (where we _know_ qemu is > > new enougth that it actually works) we can flip the switch to 'n' (via > > roms/config.seabios). This way we save some space in the rom file and make > > it easy to avoid shipping dead code in qemu. At some point we might > > be able to switch it off by default and then maybe remove altogether. > > > > With CONFIG_ACPI_DSDT = y > > Total size: 127348 Fixed: 58892 Free: 3724 (used 97.2% of 128KiB rom) > > With CONFIG_ACPI_DSDT = n > > Total size: 122844 Fixed: 58884 Free: 8228 (used 93.7% of 128KiB rom) > > > > Signed-off-by: Michael S. Tsirkin > > --- > > > > Changes from v2: > >- fixed and extended the commit log addressing comments by Gerd, > > Laszlo, Paul. No functional changes. > > Did you ignore my v2 comment below on purpose, or just miss it? I missed it, sorry. > > diff --git a/src/acpi.c b/src/acpi.c > > index 119d1c1..69dd3aa 100644 > > --- a/src/acpi.c > > +++ b/src/acpi.c > > @@ -202,7 +202,11 @@ struct srat_memory_affinity > > u32reserved3[2]; > > } PACKED; > > > > +#ifdef CONFIG_ACPI_DSDT > > #include "acpi-dsdt.hex" > > +#else > > +static u8 AmlCode[1]; > > +#endif > > On 03/18/13 11:41, Laszlo Ersek wrote: > > The macro CONFIG_ACPI_DSDT is always defined (you use it just below > > in a controlling expression); its value is what varies. > > In other words, "#ifdef CONFIG_ACPI_DSDT" always evaluates to true, > independently of how the new config option is set. The space is probably > saved only because gcc sees (with -fwhole-program) that there are no > accesses to AmlCode[]. Ultimately the effect matches your high-level > intent, but the above #ifdef code doesn't do what you expect it to do. > > I think you should write > > #if CONFIG_ACPI_DSDT == 1 > > CONFIG_ macros are not used in preprocessing directives very > frequently, but see > > $ git grep CONFIG_ | grep '# *if' > > [...] > src/pirtable.c:#if CONFIG_PIRTABLE > src/pmm.c:#if CONFIG_PMM > src/pnpbios.c:#if CONFIG_PNPBIOS > src/romlayout.S:#if CONFIG_DISABLE_A20 > src/romlayout.S:#if CONFIG_PCIBIOS > src/romlayout.S:#if CONFIG_ENTRY_EXTRASTACK > [...] > vgasrc/vgaentry.S:#if CONFIG_VGA_PCI == 1 > > "#if" and "#ifdef" are different. > > Laszlo Right. Thanks for the correction. ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCHv3] acpi: make default DSDT optional
On 03/18/13 12:00, Michael S. Tsirkin wrote: > Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its > own copy of DSDT, so let's not build in PIIX. This makes building in > the DSDT an option, default to on (built-in). > For the builds bundled with qemu (where we _know_ qemu is > new enougth that it actually works) we can flip the switch to 'n' (via > roms/config.seabios). This way we save some space in the rom file and make > it easy to avoid shipping dead code in qemu. At some point we might > be able to switch it off by default and then maybe remove altogether. > > With CONFIG_ACPI_DSDT = y > Total size: 127348 Fixed: 58892 Free: 3724 (used 97.2% of 128KiB rom) > With CONFIG_ACPI_DSDT = n > Total size: 122844 Fixed: 58884 Free: 8228 (used 93.7% of 128KiB rom) > > Signed-off-by: Michael S. Tsirkin > --- > > Changes from v2: >- fixed and extended the commit log addressing comments by Gerd, > Laszlo, Paul. No functional changes. Did you ignore my v2 comment below on purpose, or just miss it? > diff --git a/src/acpi.c b/src/acpi.c > index 119d1c1..69dd3aa 100644 > --- a/src/acpi.c > +++ b/src/acpi.c > @@ -202,7 +202,11 @@ struct srat_memory_affinity > u32reserved3[2]; > } PACKED; > > +#ifdef CONFIG_ACPI_DSDT > #include "acpi-dsdt.hex" > +#else > +static u8 AmlCode[1]; > +#endif On 03/18/13 11:41, Laszlo Ersek wrote: > The macro CONFIG_ACPI_DSDT is always defined (you use it just below > in a controlling expression); its value is what varies. In other words, "#ifdef CONFIG_ACPI_DSDT" always evaluates to true, independently of how the new config option is set. The space is probably saved only because gcc sees (with -fwhole-program) that there are no accesses to AmlCode[]. Ultimately the effect matches your high-level intent, but the above #ifdef code doesn't do what you expect it to do. I think you should write #if CONFIG_ACPI_DSDT == 1 CONFIG_ macros are not used in preprocessing directives very frequently, but see $ git grep CONFIG_ | grep '# *if' [...] src/pirtable.c:#if CONFIG_PIRTABLE src/pmm.c:#if CONFIG_PMM src/pnpbios.c:#if CONFIG_PNPBIOS src/romlayout.S:#if CONFIG_DISABLE_A20 src/romlayout.S:#if CONFIG_PCIBIOS src/romlayout.S:#if CONFIG_ENTRY_EXTRASTACK [...] vgasrc/vgaentry.S:#if CONFIG_VGA_PCI == 1 "#if" and "#ifdef" are different. Laszlo ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCHv3] acpi: make default DSDT optional
On Mon, Mar 18, 2013 at 01:00:42PM +0200, Michael S. Tsirkin wrote: > Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its > own copy of DSDT, so let's not build in PIIX. This makes building in > the DSDT an option, default to on (built-in). > For the builds bundled with qemu (where we _know_ qemu is > new enougth that it actually works) we can flip the switch to 'n' (via > roms/config.seabios). This way we save some space in the rom file and make > it easy to avoid shipping dead code in qemu. At some point we might > be able to switch it off by default and then maybe remove altogether. > > With CONFIG_ACPI_DSDT = y > Total size: 127348 Fixed: 58892 Free: 3724 (used 97.2% of 128KiB rom) > With CONFIG_ACPI_DSDT = n > Total size: 122844 Fixed: 58884 Free: 8228 (used 93.7% of 128KiB rom) Okay. > --- a/src/Kconfig > +++ b/src/Kconfig > @@ -387,6 +387,12 @@ menu "BIOS Tables" > default y > help > Support generation of ACPI tables. > +config ACPI_DSDT > +bool "Include default ACPI DSDT" > +default y > +depends on ACPI > +help > +Include default DSDT ACPI table in BIOS. As Paul points out, it would really help if the help stated which released version of QEMU is needed to turn this off. > --- a/src/acpi.c > +++ b/src/acpi.c > @@ -202,7 +202,11 @@ struct srat_memory_affinity > u32reserved3[2]; > } PACKED; > > +#ifdef CONFIG_ACPI_DSDT > #include "acpi-dsdt.hex" > +#else > +static u8 AmlCode[1]; > +#endif As Paul points out, the #ifdef doesn't make sense as the symbol is always defined. However, lets avoid #ifs and let the build weed this out. > -if (fadt && !fadt->dsdt) { > + > +if (fadt && !fadt->dsdt && CONFIG_ACPI_DSDT) { It would be preferable to make the CONFIG_X be first in the if. Thanks. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VM won't start since 76e58028d28e78431f9de3cee0b3c88d807fa39d
On Mon, Mar 18, 2013 at 11:48:57AM +0100, Gerd Hoffmann wrote: > On 03/17/13 19:27, Michael S. Tsirkin wrote: > > With seabios built from source, and latest qemu, VMs hang during boot > > for me. Bisect points at this commit: > > 76e58028d28e78431f9de3cee0b3c88d807fa39d > > > > Reverting this helps. Guest is stuck quite late, after > > 'switching root' message, so this could be just an OS > > visible change that it can't handle. > > Didn't try debugging more yet. > > Make sure dsdt + seabios are in sync. latest bios.bin + dsdt from qemu > tree isn't going to work. Yes, this was the issue. Thanks! > With qemu/master (4524051c32190c1dc13ec2ccd122fd120dbed736+) you can > simply use 'qemu -L /path/to/seabios/out' and qemu will pick up both > bios.bin and dsdt tables from the seabios build output dir (and > everything it doesn't find there such as vgabios blobs from the default > paths). > > cheers, > Gerd ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VM won't start since 76e58028d28e78431f9de3cee0b3c88d807fa39d
Hi, >> The values for the pci i/o windows are passed in a different way now. >> It used to be a reference to seabios-allocated memory (BDAT) with the >> location of that memory being added to the ssdt. Now that indirection >> is gone and seabios generates ssdt fields directly. The later makes it >> easier to generate the ssdt tables in qemu instead. >> >> cheers, >> Gerd >> > > Ah so dsdt in qemu and ssdt in seabios conflict? dsdt + ssdt must match, and when using the qemu prebuild dsdt (older than commit 76e58028d28e78431f9de3cee0b3c88d807fa39d, thus expecting a old-style ssdt) and a fresh seabios build (newer than 76e58028d28e78431f9de3cee0b3c88d807fa39d, thus generating a new-style ssdt) via -bios then you'll end up with a mismatch and things don't work. cheers, Gerd ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VM won't start since 76e58028d28e78431f9de3cee0b3c88d807fa39d
On Mon, Mar 18, 2013 at 12:07:49PM +0100, Gerd Hoffmann wrote: > On 03/18/13 11:56, Michael S. Tsirkin wrote: > > On Mon, Mar 18, 2013 at 11:48:57AM +0100, Gerd Hoffmann wrote: > >> On 03/17/13 19:27, Michael S. Tsirkin wrote: > >>> With seabios built from source, and latest qemu, VMs hang during boot > >>> for me. Bisect points at this commit: > >>> 76e58028d28e78431f9de3cee0b3c88d807fa39d > >>> > >>> Reverting this helps. Guest is stuck quite late, after > >>> 'switching root' message, so this could be just an OS > >>> visible change that it can't handle. > >>> Didn't try debugging more yet. > >> > >> Make sure dsdt + seabios are in sync. latest bios.bin + dsdt from qemu > >> tree isn't going to work. > >> > >> With qemu/master (4524051c32190c1dc13ec2ccd122fd120dbed736+) you can > >> simply use 'qemu -L /path/to/seabios/out' and qemu will pick up both > >> bios.bin and dsdt tables from the seabios build output dir (and > >> everything it doesn't find there such as vgabios blobs from the default > >> paths). > >> > >> cheers, > >> Gerd > > > > Will try. What's the source of the incompatibility? > > The values for the pci i/o windows are passed in a different way now. > It used to be a reference to seabios-allocated memory (BDAT) with the > location of that memory being added to the ssdt. Now that indirection > is gone and seabios generates ssdt fields directly. The later makes it > easier to generate the ssdt tables in qemu instead. > > cheers, > Gerd > Ah so dsdt in qemu and ssdt in seabios conflict? -- MST ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VM won't start since 76e58028d28e78431f9de3cee0b3c88d807fa39d
On 03/18/13 11:56, Michael S. Tsirkin wrote: > On Mon, Mar 18, 2013 at 11:48:57AM +0100, Gerd Hoffmann wrote: >> On 03/17/13 19:27, Michael S. Tsirkin wrote: >>> With seabios built from source, and latest qemu, VMs hang during boot >>> for me. Bisect points at this commit: >>> 76e58028d28e78431f9de3cee0b3c88d807fa39d >>> >>> Reverting this helps. Guest is stuck quite late, after >>> 'switching root' message, so this could be just an OS >>> visible change that it can't handle. >>> Didn't try debugging more yet. >> >> Make sure dsdt + seabios are in sync. latest bios.bin + dsdt from qemu >> tree isn't going to work. >> >> With qemu/master (4524051c32190c1dc13ec2ccd122fd120dbed736+) you can >> simply use 'qemu -L /path/to/seabios/out' and qemu will pick up both >> bios.bin and dsdt tables from the seabios build output dir (and >> everything it doesn't find there such as vgabios blobs from the default >> paths). >> >> cheers, >> Gerd > > Will try. What's the source of the incompatibility? The values for the pci i/o windows are passed in a different way now. It used to be a reference to seabios-allocated memory (BDAT) with the location of that memory being added to the ssdt. Now that indirection is gone and seabios generates ssdt fields directly. The later makes it easier to generate the ssdt tables in qemu instead. cheers, Gerd ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCHv3] acpi: make default DSDT optional
Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its own copy of DSDT, so let's not build in PIIX. This makes building in the DSDT an option, default to on (built-in). For the builds bundled with qemu (where we _know_ qemu is new enougth that it actually works) we can flip the switch to 'n' (via roms/config.seabios). This way we save some space in the rom file and make it easy to avoid shipping dead code in qemu. At some point we might be able to switch it off by default and then maybe remove altogether. With CONFIG_ACPI_DSDT = y Total size: 127348 Fixed: 58892 Free: 3724 (used 97.2% of 128KiB rom) With CONFIG_ACPI_DSDT = n Total size: 122844 Fixed: 58884 Free: 8228 (used 93.7% of 128KiB rom) Signed-off-by: Michael S. Tsirkin --- Changes from v2: - fixed and extended the commit log addressing comments by Gerd, Laszlo, Paul. No functional changes. Changes from v1: - default the new option to y to reduce disruption to existing users src/Kconfig | 6 ++ src/acpi.c | 7 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Kconfig b/src/Kconfig index 3141069..655ab1c 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -387,6 +387,12 @@ menu "BIOS Tables" default y help Support generation of ACPI tables. +config ACPI_DSDT +bool "Include default ACPI DSDT" +default y +depends on ACPI +help +Include default DSDT ACPI table in BIOS. endmenu source vgasrc/Kconfig diff --git a/src/acpi.c b/src/acpi.c index 119d1c1..69dd3aa 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -202,7 +202,11 @@ struct srat_memory_affinity u32reserved3[2]; } PACKED; +#ifdef CONFIG_ACPI_DSDT #include "acpi-dsdt.hex" +#else +static u8 AmlCode[1]; +#endif static void build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev) @@ -826,7 +830,8 @@ acpi_setup(void) break; } } -if (fadt && !fadt->dsdt) { + +if (fadt && !fadt->dsdt && CONFIG_ACPI_DSDT) { /* default DSDT */ void *dsdt = malloc_high(sizeof(AmlCode)); if (!dsdt) { -- MST ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] Does SeaBIOS uses the BIOS interfaces itself?
Dear SeaBIOS folks, looking at $ more src/Kconfig […] config AHCI depends on DRIVES bool "AHCI controllers" default y help Support for AHCI disk code. […] disabling the »Drive interface« (which sets(?) `DRIVES`) in the menu BIOS interfaces, support for booting from an AHCI device is disabled too. So for my understanding, in the current implementation SeaBIOS uses its own BIOS interfaces although strictly it would not be necessary. Is that correct? Thanks, 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] VM won't start since 76e58028d28e78431f9de3cee0b3c88d807fa39d
On Mon, Mar 18, 2013 at 11:48:57AM +0100, Gerd Hoffmann wrote: > On 03/17/13 19:27, Michael S. Tsirkin wrote: > > With seabios built from source, and latest qemu, VMs hang during boot > > for me. Bisect points at this commit: > > 76e58028d28e78431f9de3cee0b3c88d807fa39d > > > > Reverting this helps. Guest is stuck quite late, after > > 'switching root' message, so this could be just an OS > > visible change that it can't handle. > > Didn't try debugging more yet. > > Make sure dsdt + seabios are in sync. latest bios.bin + dsdt from qemu > tree isn't going to work. > > With qemu/master (4524051c32190c1dc13ec2ccd122fd120dbed736+) you can > simply use 'qemu -L /path/to/seabios/out' and qemu will pick up both > bios.bin and dsdt tables from the seabios build output dir (and > everything it doesn't find there such as vgabios blobs from the default > paths). > > cheers, > Gerd Will try. What's the source of the incompatibility? ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VM won't start since 76e58028d28e78431f9de3cee0b3c88d807fa39d
On 03/17/13 19:27, Michael S. Tsirkin wrote: > With seabios built from source, and latest qemu, VMs hang during boot > for me. Bisect points at this commit: > 76e58028d28e78431f9de3cee0b3c88d807fa39d > > Reverting this helps. Guest is stuck quite late, after > 'switching root' message, so this could be just an OS > visible change that it can't handle. > Didn't try debugging more yet. Make sure dsdt + seabios are in sync. latest bios.bin + dsdt from qemu tree isn't going to work. With qemu/master (4524051c32190c1dc13ec2ccd122fd120dbed736+) you can simply use 'qemu -L /path/to/seabios/out' and qemu will pick up both bios.bin and dsdt tables from the seabios build output dir (and everything it doesn't find there such as vgabios blobs from the default paths). cheers, Gerd ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCHv2] acpi: make default DSDT optional
On Mon, Mar 18, 2013 at 11:41:44AM +0100, Laszlo Ersek wrote: > comments in-line > > On 03/18/13 11:12, Michael S. Tsirkin wrote: > > QEMU now loads its own copy of DSDT, so let's not build in PIIX. > > This leaves building in the DSDT an option, default to off. > > If no one complains for a while, we'll be able to > > remove this altogether. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > > > Changes from v1: > > - default the new option to y to reduce > > disruption to existing users > > > > src/Kconfig | 6 ++ > > src/acpi.c | 7 ++- > > 2 files changed, 12 insertions(+), 1 deletion(-) > > The acpi_setup() function already picks the qemu-exported DSDT if there > is one: fill_dsdt() links it into the FADT, and then we won't > malloc_high() an area for our own copy. > > What is the purpose of this patch? Is it to save space? I assume the > static AmlCode array from "acpi-dsdt.hex" only occupies RAM as long as > we don't start the boot loader / OS, so it is not important for runtime. > Do we want to save space in the binary? Yes. Waste not, need not. With default = y Total size: 127348 Fixed: 58892 Free: 3724 (used 97.2% of 128KiB rom) With default = n Total size: 122844 Fixed: 58884 Free: 8228 (used 93.7% of 128KiB rom) So we get some breathing space here. Increasing rom size is problematic, is affects things like migration. Also, in qemu I don't think we want to carry around code we never use. It just results in confusion. At least, it confuses me. > > diff --git a/src/Kconfig b/src/Kconfig > > index 3141069..655ab1c 100644 > > --- a/src/Kconfig > > +++ b/src/Kconfig > > @@ -387,6 +387,12 @@ menu "BIOS Tables" > > default y > > help > > Support generation of ACPI tables. > > +config ACPI_DSDT > > +bool "Include default ACPI DSDT" > > +default y > > + depends on ACPI > > +help > > +Include default DSDT ACPI table in BIOS. > > endmenu > > > > source vgasrc/Kconfig > > I think if ACPI_DSDT is off, then the Makefile could elect not to build > "acpi-dsdt.hex" at all. (The "$(OUT)acpi.o" target should not depend on > "acpi-dsdt.hex" in that case.) Anyway extra work is not a bug of course. > (Plus I'm not sure how we could pass in the config value for ifeq.) > > > diff --git a/src/acpi.c b/src/acpi.c > > index 119d1c1..69dd3aa 100644 > > --- a/src/acpi.c > > +++ b/src/acpi.c > > @@ -202,7 +202,11 @@ struct srat_memory_affinity > > u32reserved3[2]; > > } PACKED; > > > > +#ifdef CONFIG_ACPI_DSDT > > The macro CONFIG_ACPI_DSDT is always defined (you use it just below in a > controlling expression); its value is what varies. > > > #include "acpi-dsdt.hex" > > +#else > > +static u8 AmlCode[1]; > > +#endif > > > > static void > > build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev) > > @@ -826,7 +830,8 @@ acpi_setup(void) > > break; > > } > > } > > -if (fadt && !fadt->dsdt) { > > + > > +if (fadt && !fadt->dsdt && CONFIG_ACPI_DSDT) { > > /* default DSDT */ > > void *dsdt = malloc_high(sizeof(AmlCode)); > > if (!dsdt) { > > > > For short-circuiting hygiene I'd put the config option first. > > Laszlo ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] Minimal config for booting GRUB2 from SATA drive
Am Samstag, den 16.03.2013, 03:06 -0400 schrieb Kevin O'Connor: > On Fri, Mar 15, 2013 at 06:03:07PM +0100, Paul Menzel wrote: > > Am Donnerstag, den 14.03.2013, 19:35 -0400 schrieb Kevin O'Connor: > > > On Thu, Mar 14, 2013 at 03:57:00PM +0100, Paul Menzel wrote: > > > > > > I am using coreboot on the ASRock E350M1 [1] with a SATA hard drive, I > > > > want to boot from using the GRUB2 bootloader. For now I’d like to use > > > > SeaBIOS 1.7.2.1 for jumping to the hard drive and execute(?) GRUB2. > > > > > > > > Using the default config file created by `make menuconfig` and selecting > > > > a coreboot build and serial debug, everything works fine. > > > > > > > > As I am using Debian GNU/Linux I do not need any BIOS calls provided by > > > > SeaBIOS and want to disable as much as possible too. So I disabled most > > > > stuff, but could not boot from the hard drive. > > > > > > Can you up the debug level to 8 on the failed boot case and report the > > > results? > > > > The pasted log is with `CONFIG_PCIBIOS` and `CONFIG_PNPBIOS` set to true > > too. > > You've enabled CONFIG_BOOTMENU while CONFIG_KEYBOARD is disabled - > that doesn't make much sense. (The menu isn't of much use if one > can't control it.) True. As it is outputting the information what bootable medias are found, it could be considered useful. But you are right. I am going to disable it. > SeaBIOS shouldn't have hung - see patch below It worked indeed! Thanks a lot! > - but even with this fixed, grub (or whatever boot loader you plan to > use) will likely crash without BIOS keyboard support. It's fine to > disable CONFIG_USB_KEYBOARD and CONFIG_PS2PORT, but to disable the > keyboard API is likely going to cause havoc. There is no havoc besides that I could not use the USB keyboard (not tested PS/2) as GRUB2 (in the current config (?)) does not enable it. Additionally disabling most of the BIOS interfaces and using the graphical menu of GRUB2, it is not shown but only funny colors. I am going to open a separate thread for this though. […] Thanks, 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] [PATCHv2] acpi: make default DSDT optional
comments in-line On 03/18/13 11:12, Michael S. Tsirkin wrote: > QEMU now loads its own copy of DSDT, so let's not build in PIIX. > This leaves building in the DSDT an option, default to off. > If no one complains for a while, we'll be able to > remove this altogether. > > Signed-off-by: Michael S. Tsirkin > --- > > Changes from v1: > - default the new option to y to reduce > disruption to existing users > > src/Kconfig | 6 ++ > src/acpi.c | 7 ++- > 2 files changed, 12 insertions(+), 1 deletion(-) The acpi_setup() function already picks the qemu-exported DSDT if there is one: fill_dsdt() links it into the FADT, and then we won't malloc_high() an area for our own copy. What is the purpose of this patch? Is it to save space? I assume the static AmlCode array from "acpi-dsdt.hex" only occupies RAM as long as we don't start the boot loader / OS, so it is not important for runtime. Do we want to save space in the binary? > diff --git a/src/Kconfig b/src/Kconfig > index 3141069..655ab1c 100644 > --- a/src/Kconfig > +++ b/src/Kconfig > @@ -387,6 +387,12 @@ menu "BIOS Tables" > default y > help > Support generation of ACPI tables. > +config ACPI_DSDT > +bool "Include default ACPI DSDT" > +default y > + depends on ACPI > +help > +Include default DSDT ACPI table in BIOS. > endmenu > > source vgasrc/Kconfig I think if ACPI_DSDT is off, then the Makefile could elect not to build "acpi-dsdt.hex" at all. (The "$(OUT)acpi.o" target should not depend on "acpi-dsdt.hex" in that case.) Anyway extra work is not a bug of course. (Plus I'm not sure how we could pass in the config value for ifeq.) > diff --git a/src/acpi.c b/src/acpi.c > index 119d1c1..69dd3aa 100644 > --- a/src/acpi.c > +++ b/src/acpi.c > @@ -202,7 +202,11 @@ struct srat_memory_affinity > u32reserved3[2]; > } PACKED; > > +#ifdef CONFIG_ACPI_DSDT The macro CONFIG_ACPI_DSDT is always defined (you use it just below in a controlling expression); its value is what varies. > #include "acpi-dsdt.hex" > +#else > +static u8 AmlCode[1]; > +#endif > > static void > build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev) > @@ -826,7 +830,8 @@ acpi_setup(void) > break; > } > } > -if (fadt && !fadt->dsdt) { > + > +if (fadt && !fadt->dsdt && CONFIG_ACPI_DSDT) { > /* default DSDT */ > void *dsdt = malloc_high(sizeof(AmlCode)); > if (!dsdt) { > For short-circuiting hygiene I'd put the config option first. Laszlo ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCHv2] acpi: make default DSDT optional
Dear Michael, Am Montag, den 18.03.2013, 12:12 +0200 schrieb Michael S. Tsirkin: > QEMU now loads its own copy of DSDT, so let's not build in PIIX. for non-QEMU developers could you please add a version string or commit so it is known since when QEMU supports this? > This leaves building in the DSDT an option, default to off. > If no one complains for a while, we'll be able to > remove this altogether. > > Signed-off-by: Michael S. Tsirkin > --- > > Changes from v1: > - default the new option to y to reduce > disruption to existing users > > src/Kconfig | 6 ++ > src/acpi.c | 7 ++- > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/src/Kconfig b/src/Kconfig > index 3141069..655ab1c 100644 > --- a/src/Kconfig > +++ b/src/Kconfig > @@ -387,6 +387,12 @@ menu "BIOS Tables" > default y > help > Support generation of ACPI tables. > +config ACPI_DSDT > +bool "Include default ACPI DSDT" > +default y > + depends on ACPI Whitespace? Everything else seems to use spaces. > +help > +Include default DSDT ACPI table in BIOS. > endmenu > > source vgasrc/Kconfig > diff --git a/src/acpi.c b/src/acpi.c > index 119d1c1..69dd3aa 100644 > --- a/src/acpi.c > +++ b/src/acpi.c > @@ -202,7 +202,11 @@ struct srat_memory_affinity > u32reserved3[2]; > } PACKED; > > +#ifdef CONFIG_ACPI_DSDT > #include "acpi-dsdt.hex" > +#else > +static u8 AmlCode[1]; > +#endif > > static void > build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev) > @@ -826,7 +830,8 @@ acpi_setup(void) > break; > } > } > -if (fadt && !fadt->dsdt) { > + > +if (fadt && !fadt->dsdt && CONFIG_ACPI_DSDT) { > /* default DSDT */ > void *dsdt = malloc_high(sizeof(AmlCode)); > if (!dsdt) { Thanks, 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] [PATCHv2] acpi: make default DSDT optional
On 03/18/13 11:12, Michael S. Tsirkin wrote: > QEMU now loads its own copy of DSDT, so let's not build in PIIX. > This leaves building in the DSDT an option, default to off. > If no one complains for a while, we'll be able to > remove this altogether. > > Signed-off-by: Michael S. Tsirkin > --- > > Changes from v1: > - default the new option to y to reduce > disruption to existing users Commit message still says "default off". Other than that it looks good to me. cheers, Gerd ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCHv2] acpi: make default DSDT optional
QEMU now loads its own copy of DSDT, so let's not build in PIIX. This leaves building in the DSDT an option, default to off. If no one complains for a while, we'll be able to remove this altogether. Signed-off-by: Michael S. Tsirkin --- Changes from v1: - default the new option to y to reduce disruption to existing users src/Kconfig | 6 ++ src/acpi.c | 7 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Kconfig b/src/Kconfig index 3141069..655ab1c 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -387,6 +387,12 @@ menu "BIOS Tables" default y help Support generation of ACPI tables. +config ACPI_DSDT +bool "Include default ACPI DSDT" +default y + depends on ACPI +help +Include default DSDT ACPI table in BIOS. endmenu source vgasrc/Kconfig diff --git a/src/acpi.c b/src/acpi.c index 119d1c1..69dd3aa 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -202,7 +202,11 @@ struct srat_memory_affinity u32reserved3[2]; } PACKED; +#ifdef CONFIG_ACPI_DSDT #include "acpi-dsdt.hex" +#else +static u8 AmlCode[1]; +#endif static void build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev) @@ -826,7 +830,8 @@ acpi_setup(void) break; } } -if (fadt && !fadt->dsdt) { + +if (fadt && !fadt->dsdt && CONFIG_ACPI_DSDT) { /* default DSDT */ void *dsdt = malloc_high(sizeof(AmlCode)); if (!dsdt) { -- MST ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] acpi: make default DSDT optional
On 03/18/13 09:23, Michael S. Tsirkin wrote: > On Sun, Mar 17, 2013 at 10:23:21PM -0400, Kevin O'Connor wrote: >> On Sun, Mar 17, 2013 at 08:32:34PM +0200, Michael S. Tsirkin wrote: >>> QEMU now loads its own copy of DSDT, so let's not build in PIIX. >>> This leaves building in the DSDT an option, default to off. >>> If no one complains for a while, we'll be able to >>> remove this altogether. >> >> Thanks. I don't think it will be that easy to remove support for this >> as older versions of QEMU (and all versions of Bochs) wont work >> properly if the DSDT is not present. Ultimately, we want to move all >> of the acpi stuff to qemu - I think we should wait for that before >> enabling the ability to remove the support in SeaBIOS. >> >> -Kevin > > This is exactly what I am working on actually. There's lost of activity > related to acpi so keeping this work on a branch until is complete will > be hard. > Surely a config option does no harm? > Maybe you can merge it if I change the default to y? I think defaulting to 'y' for compatibility with older qemu versions is a good idea. For the builds bundled with qemu (where we _know_ qemu is new enougth that it actually works) we can flip the switch to 'n' (via roms/config.seabios). cheers, Gerd ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VM won't start since 76e58028d28e78431f9de3cee0b3c88d807fa39d
On 03/18/13 09:24, Michael S. Tsirkin wrote: > On Sun, Mar 17, 2013 at 10:19:45PM -0400, Kevin O'Connor wrote: >> On Sun, Mar 17, 2013 at 08:27:36PM +0200, Michael S. Tsirkin wrote: >>> With seabios built from source, and latest qemu, VMs hang during boot >>> for me. Bisect points at this commit: >>> 76e58028d28e78431f9de3cee0b3c88d807fa39d >>> >>> Reverting this helps. Guest is stuck quite late, after >>> 'switching root' message, so this could be just an OS >>> visible change that it can't handle. >>> Didn't try debugging more yet. >> >> What OS didn't boot? >> >> -Kevin > > Sorry. It's a rhel6 image. Apologies for not trying this myself, but I can't very easily do it today. If you have everything handy, could you try booting with pci=nocrs on the guest kernel cmdline? If it boots, can you compare without with 76e58028 76e58028but also pci=nocrs guest dmesg (ignore_loglevel) acpidump & iasl -d the DSDT and SSDT I suspect that the "late" hang (ie. after switching root) occurs when the efifb driver (or some such...) tries to use the window(s) retrieved from ACPI. Parsing itself should happen much earlier. Again, sorry for not doing this myself! Laszlo ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] VM won't start since 76e58028d28e78431f9de3cee0b3c88d807fa39d
On Sun, Mar 17, 2013 at 10:19:45PM -0400, Kevin O'Connor wrote: > On Sun, Mar 17, 2013 at 08:27:36PM +0200, Michael S. Tsirkin wrote: > > With seabios built from source, and latest qemu, VMs hang during boot > > for me. Bisect points at this commit: > > 76e58028d28e78431f9de3cee0b3c88d807fa39d > > > > Reverting this helps. Guest is stuck quite late, after > > 'switching root' message, so this could be just an OS > > visible change that it can't handle. > > Didn't try debugging more yet. > > What OS didn't boot? > > -Kevin Sorry. It's a rhel6 image. -- MST ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] acpi: make default DSDT optional
On Sun, Mar 17, 2013 at 10:23:21PM -0400, Kevin O'Connor wrote: > On Sun, Mar 17, 2013 at 08:32:34PM +0200, Michael S. Tsirkin wrote: > > QEMU now loads its own copy of DSDT, so let's not build in PIIX. > > This leaves building in the DSDT an option, default to off. > > If no one complains for a while, we'll be able to > > remove this altogether. > > Thanks. I don't think it will be that easy to remove support for this > as older versions of QEMU (and all versions of Bochs) wont work > properly if the DSDT is not present. Ultimately, we want to move all > of the acpi stuff to qemu - I think we should wait for that before > enabling the ability to remove the support in SeaBIOS. > > -Kevin This is exactly what I am working on actually. There's lost of activity related to acpi so keeping this work on a branch until is complete will be hard. Surely a config option does no harm? Maybe you can merge it if I change the default to y? -- MST ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios