On Sun, Feb 21, 2010 at 04:18:38PM -0700, Brandon Bennett wrote:
> > On Sat, Feb 20, 2010 at 9:05 PM, Kevin O'Connor <kevin(a)koconnor.net> wrote:
> >> Should a kernel fail during boot, I'd suspect it doesn't like one of
> >> the apm/pcibios callbacks, or it doesn't like one of the
> >> smbios/mptable/acpi tables. You could try compiling the SeaBIOS code
> >> (see http://seabios.org/Download ) and increasing the debugging by
> >> modifying src/config.h. Specifically, you could increase
> >> CONFIG_DEBUG_LEVEL, and set DEBUG_HDL_pcibios32 and DEBUG_HDL_apm to
> >> 1. Also, you could try disabling some of the features to see if that
> >> prevents the fault (eg, disabling CONFIG_ACPI / CONFIG_SMBIOS /
> >> CONFIG_MPTABLE).
> >
>
> I have narrowed it down to SMBIOS. If I disable CONFIG_SMBIOS the
> image boots up fine.
Gleb, have you seen this thread?
Some of the recent changes to smbios that look like possible culprits
are:
Make SMBIOS table pass MS SVVP test
Use MaxCountCPUs during building of per cpu tables.
Add malloc_high/fseg() and rework bios table creation to use them.
There were other changes, but the comments indicate they were only
ports of changes already in bochs. I suppose it's also possible the
lack of smbios is turning off some other feature in the guest (eg,
acpi) that's the real culprit.
-Kevin
Changes v1 -> v2:
- simplified foreachpci_in_bus()
- add overlap check during pci bar assignemnt.
- use c99 initialization.
Patch description:
This patch set allows seabios to initialize multi pci bus and 64bit BAR.
Currently seabios is able to initialize only pci root bus.
However multi pci bus support is wanted because
- more pci bus is wanted in qemu for many slots
- pci express support is commin in qemu which requires multi pci bus.
those patches on Qemu part are under way, though.
Isaku Yamahata (8):
seabios: pci: introduce foreachpci_in_bus() helper macro.
seabios: pciinit: factor out pci bar region allocation logic.
seabios: pciinit: make pci memory space assignment 64bit aware.
seabios: pciinit: make pci bar assigner preferchable memory aware.
seabios: pciinit: factor out bar offset calculation.
seabios: pciinit: make bar offset calculation pci bridge aware.
seabios: pciinit: pci bridge bus initialization.
seabios: pciinit: initialize pci bridge filtering registers.
src/config.h | 17 +++
src/pci.h | 10 ++
src/pciinit.c | 324 +++++++++++++++++++++++++++++++++++++++++++++++++--------
3 files changed, 306 insertions(+), 45 deletions(-)
On Sun, Jun 27, 2010 at 01:28:52PM +0800, Liu, Jinsong wrote:
> Kevin,
>
> Any comments? or any update need I do?
The main thing holding this up is the open question around the
qemu/seabios acpi interface.
I wont be able to look at this for another week.
-Kevin
Liu, Jinsong wrote:
> Kevin O'Connor wrote:
>>>
>>> I'm referring to git://git.linuxtogo.org/home/kevin/seabios.git
>>> According to http://www.coreboot.org/SeaBIOS,
>>> it seems that Keven maintains that repo as the seabios upstream.
>>> Kevin when pushing patches, which repository should we refer?
>>
>> Patches sent to me should be based off of the linuxtogo repo.
>>
>> -Kevin
>
> Kevin,
>
> Attached is updated patch:
> 1). rebase my patch referring the linuxtogo repo
> git://git.linuxtogo.org/home/kevin/seabios.git; 2). According to
> Isaku and Peter's comments, I update Makefile, use 1 rule to build
> both acpi_ssdt_15.hex and acpi_ssdt_anycpu.hex, while user don't need
> iasl to compile seabios;
>
> Thanks Isaku, Kevin, and Peter for your comments!
>
> Regards,
> Jinsong
Kevin,
Any comments? or any update need I do?
Thanks,
Jinsong
On Mon, Jun 21, 2010 at 02:52:51PM +0800, Liu, Jinsong wrote:
> Isaku,
>
> Thanks for comments!
> I didn't fine changeset 12cbb43b9dc8a16f712188cb308a0eb0321f3e20, I pull from git://git.kernel.org/pub/scm/virt/kvm/seabios.git, any misunderstanding?
I'm referring to git://git.linuxtogo.org/home/kevin/seabios.git
According to http://www.coreboot.org/SeaBIOS,
it seems that Keven maintains that repo as the seabios upstream.
Kevin when pushing patches, which repository should we refer?
> As for makefile rule for acpi-ssdt-15.hex and acpi-ssdt-anycpu.hex, we in fact combine them into 1 generic rule in our old patch, as attached.
> However, the old makefile require iasl for user compiling seabios.
> Kevin prefer not using iasl, so we update it as new version.
Something like the below didn't work?
(I just wrote it just to show my idea. I didn't any test.)
+src/%.hex: src/acpi-ssdt.dsl src/mk_ssdt.c
+ @echo "Compiling SSDT for general os which support more cpus"
+ $(Q)$(CC) -o mk_$* src/mk_ssdt.c
+ head -n -2 $< > src/$*.dsl.i
+ ./mk_$* >> src/$*.dsl.i
+ $(Q)cpp -P src/$*.dsl.i > src/$*.dsl
+ $(Q)iasl -tc -p $@ src/acpi-ssdt-anycpu.dsl
+ $(Q)sed -i -e 's/AmlCode/$*/g' $@
+ $(Q)rm mk_$* src/$*.dsl.i src/$*.aml src/$*.dsl
thanks,
>
> Thanks,
> Jinsong
>
> Isaku Yamahata wrote:
> > Hi Jison.
> >
> > Can you check the changeset of
> > 12cbb43b9dc8a16f712188cb308a0eb0321f3e20 and update Makefile changes?
> >
> > The rule for acpi-ssdt-15.hex and acpi-ssdt-anycpu.hex seems
> > same, so it can be combined into a single generic rule.
> > The rules removes the files at the last, but it would be more
> > reliable to use Makefile intermediate and let make to remove
> > them automatically.
> >
> > On Sun, Jun 20, 2010 at 11:40:02PM +0800, Liu, Jinsong wrote:
> >> Kevin O'Connor wrote:
> >>> On Wed, Jun 16, 2010 at 12:19:24PM +0800, Liu, Jinsong wrote:
> >>>> Gleb Natapov wrote:
> >>>>> FWIW looks good to me. This patch removes dynamic creation of
> >>>>> Processor scope and supports only 15/255 cpus configuration, but
> >>>>> given that new code is much more complex that old one I don't see
> >>>>> other possibilities (unless we'll add aml compiler to seabios
> >>>>> runtime).
> >>>>>
> >>
> >>>
> >>> I'm okay with the approach (two SSDTs selected by cpu count). The
> >>> build changes don't look right (15.c is too cryptic). However, more
> >>> importantly, I want to see where we end up going with the
> >>> qemu/seabios acpi interface discussion before committing this.
> >>>
> >>> -Kevin
> >>
> >>
> >> Kevin,
> >>
> >> Thanks for comments!
> >>
> >> In your last comments, you prefer not to use iasl to compile seabios.
> >> Now I update the patch as attached (only need update Makefile):
> >> 1. cancel cryptic name like 15.c from Makefile, and we give detailed
> >> description for cpu number in new version;
> >> 2. user don't need iasl again to compile seabios, except if they
> >> want to change dsdt/ssdt itself;
> >>
> >> The process to apply patch and build in my desktop is:
> >> $ git apply kvm-vcpu-hotplug-seabios.patch
> >> $ git add src/acpi-ssdt.dsl
> >> $ git add src/mk_ssdt.c
> >> $ git add src/acpi-ssdt-15.hex
> >> $ git add src/acpi-ssdt-anycpu.hex
> >> $ git commit -a
> >> $ make
> >>
> >> We test the updated patch, it works OK with linux2.6.32 hot-add and
> >> hot-remove.
> >>
> >> Thanks,
> >> Jinsong
> >
> >> _______________________________________________
> >> SeaBIOS mailing list
> >> SeaBIOS(a)seabios.org
> >> http://www.seabios.org/mailman/listinfo/seabios
>
--
yamahata
On Tue, Jun 22, 2010 at 10:01:36PM +0800, Liu, Jinsong wrote:
> > Something like the below didn't work?
> > (I just wrote it just to show my idea. I didn't any test.)
> >
> > +src/%.hex: src/acpi-ssdt.dsl src/mk_ssdt.c
> > + @echo "Compiling SSDT for general os which support more cpus"
> > + $(Q)$(CC) -o mk_$* src/mk_ssdt.c
> > + head -n -2 $< > src/$*.dsl.i
> > + ./mk_$* >> src/$*.dsl.i
> > + $(Q)cpp -P src/$*.dsl.i > src/$*.dsl
> > + $(Q)iasl -tc -p $@ src/acpi-ssdt-anycpu.dsl
> > + $(Q)sed -i -e 's/AmlCode/$*/g' $@
> > + $(Q)rm mk_$* src/$*.dsl.i src/$*.aml src/$*.dsl
> >
>
> If so, current dependency 'src/%.hex: src/%.dsl' will conflict with new dependency 'src/%.hex: src/acpi-ssdt.dsl src/mk_ssdt.c', like when build src/acpi-ssdt.hex?
>
Ah, then src/acpi-ssdt-%.hex doesn't work?
Anyway if automatic variable doesn't work for what you want or
you want more generic method, canned command sequence would work.
This technique is already used. Linux kbuild uses it very heavily.
ssdt-compile = ...
(or use define/endef)
src/acpi-anycpu.hex: ...
$(ssdt-compile)
If you want to pass parameter
src/acpi-15cpu.hex: ...
$(call ssdt-compile parameter, ...)
> BTW, in current Makefile, seems the dependency '$(OUT)ccode32flat.o: src/acpi-dsdt.hex' is redundant.
> Without it, makefile still build src/acpi-dsdt.hex. I checked the Makefile but didn't find the reason.
It's subtle dependency. Without the dependency,
"make clean; rm -f src/acpi-dsdt.hex; make" causes the following
error for me. I suspect that old acpi-dsdt.hex would be used even when
acpi-dsdt.dsl is modified.
Hmm, should it be commented?
Working around non-functional -combine
Compiling whole program out/ccode.16.s
Compiling to assembler out/asm-offsets.s
Generating offset file out/asm-offsets.h
Compiling (16bit) out/code16.o
Compiling whole program out/ccode32flat.o
In file included from out/ccode32flat.o.tmp.c:39:
out/../src/acpi.c:205:25: error: acpi-dsdt.hex: No such file or directory
In file included from out/ccode32flat.o.tmp.c:39:
out/../src/acpi.c: In function 'acpi_bios_init':
out/../src/acpi.c:690: error: 'AmlCode' undeclared (first use in this function)
out/../src/acpi.c:690: error: (Each undeclared identifier is reported only once
out/../src/acpi.c:690: error: for each function it appears in.)
make: *** [out/ccode32flat.o] Error 1
--
yamahata
Hi,
This series allows the default values for specific fields on acpi and smbios
tables to be set at build time, by editing config.h.
The current defaults are not changed, but it will allow build-time setting of
specific strings on config.h if necessary.
Eduardo Habkost (2):
acpi: allow header strings be configured on config.h
smbios: allow vendor/manufacturer/version/product names be set on
config.h
src/acpi.c | 8 ++++----
src/config.h | 13 +++++++++++++
src/smbios.c | 16 ++++++++--------
3 files changed, 25 insertions(+), 12 deletions(-)