<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.bios.coreboot.seabios">
    <title>gmane.comp.bios.coreboot.seabios</title>
    <link>http://blog.gmane.org/gmane.comp.bios.coreboot.seabios</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6255"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6243"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6242"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6189"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6188"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6161"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6156"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6154"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6145"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6140"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6101"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6091"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6089"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6075"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6074"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6073"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6072"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6051"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6023"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/5989"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6255">
    <title>KVM call agenda for 2013-05-28</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6255</link>
    <description>&lt;pre&gt;Juan is not available now, and Anthony asked for
agenda to be sent early.
So here comes:

Agenda for the meeting Tue, May 28:

- Generating acpi tables

- Switching the call to a bi-weekly schedule

Please, send any topic that you are interested in covering.

Thanks, MST

&lt;/pre&gt;</description>
    <dc:creator>Michael S. Tsirkin</dc:creator>
    <dc:date>2013-05-23T12:41:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6243">
    <title>DMI based quirks?</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6243</link>
    <description>&lt;pre&gt;Hi all.

Would it be possible to add some DMI based quirks? I have a device and
in coreboot I have
some detection code for it:

http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/mainboard/bachmann/ot200/mainboard.c;h=0ea053aad0c9e085bbd8ea36f14210404881edb7;hb=HEAD

Now it takes quite some time to load Grub in PIO mode even the device
could use DMA.

For the linux kernel I have added this patch:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=abf8f2b877846573f0e6498883fe43f08be5696d


What would be the best solution in seabios to use PIO for broken devices and DMA
for the others? The biggest problem is that the device supports DMA
but due a missing
resister I breaks in DMA.

thanks
--
Christian Gmeiner, MSc
&lt;/pre&gt;</description>
    <dc:creator>Christian Gmeiner</dc:creator>
    <dc:date>2013-05-21T09:02:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6242">
    <title>seabios-1.7.2 stable changes</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6242</link>
    <description>&lt;pre&gt;Hi Gerd,

I just pulled your git branch at "git://git.kraxel.org/seabios
1.7.2-kraxel" into the seabios 1.7.2-stable branch.  (I know my timing
isn't great.)

I did not pull the pvpanic changes as I'm reluctant to put a new
feature and change the acpi tables in a stable release.

If there are no other pressing changes, I'll tag 1.7.2.2.

-Kevin
&lt;/pre&gt;</description>
    <dc:creator>Kevin O'Connor</dc:creator>
    <dc:date>2013-05-21T01:59:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6189">
    <title>another iasl update breaks seabios compilation again</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6189</link>
    <description>&lt;pre&gt;I'm not sure what happened yet, but I noticed that current seabios
does not build with 20130214-32 version of iasl.

Apparently, the listing file (-l) produced now does not contain
any comments from the original source, so tools/acpi_extract.py
produce nothing from these files.

Here's the diff between listing produced by two versions of iasl
for ssdt-pcihp:

----------------

--- out/ssdt-pcihp.lst-201005282013-05-09 17:55:43.872160687 +0400
+++ out/ssdt-pcihp.lst-20130214-322013-05-09 17:57:45.222803783 +0400
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,84 +1,72 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;

 Intel ACPI Component Architecture
-ASL Optimizing Compiler version 20100528 [Jul  2 2010]
-Copyright (c) 2000 - 2010 Intel Corporation
-Supports ACPI Specification Revision 4.0a
-
-Compilation of "out/ssdt-pcihp.dsl.i" - Thu May  9 17:55:43 2013
-
-       1....
-       2..../* ACPI_EXTRACT_ALL_CODE ssdp_pcihp_aml */
-       3....
-       4....DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
-
-00000000....53 53 44 54 58 00 00 00     "SSDTX..."
-00000008....01 77 42 58 50 43 00 00     ".wBXPC.."
-00000010....42 58 53 53 44 54 50 43     "BXSSDTPC"
-00000018....01 00 00 00 49 4E 54 4C     "....INTL"
-00000020....28 05 10 20 ............    "(.. "
-
-       5....{
-       6....    External(\_SB.PCI0, DeviceObj)
-       7....    External(\_SB.PCI0.PCEJ, MethodObj)
-       8....    Scope(\_SB.PCI0) {
-
-00000024....10 33 5C 2E 5F 53 42 5F     ".3\._SB_"
-0000002C....50 43 49 30 ............    "PCI0"
-
-       9....
-      10..../* ACPI_EXTRACT_DEVICE_START ssdt_pcihp_start */
-      11....
-      12....
-      13..../* ACPI_EXTRACT_DEVICE_END ssdt_pcihp_end */
-      14....
-      15....
-      16..../* ACPI_EXTRACT_DEVICE_STRING ssdt_pcihp_name */
-      17....
-      18....        Device(SAA) {
-
-00000030....5B 82 26 53 41 41 5F ...    "[.&amp;amp;SAA_"
-
-      19....
-      20..../* ACPI_EXTRACT_NAME_BYTE_CONST ssdt_pcihp_id */
-      21....
-      22....            Name(_SUN, 0xAA)
-
-00000037....08 5F 53 55 4E 0A AA ...    "._SUN.."
-
-      23....
-      24..../* ACPI_EXTRACT_NAME_DWORD_CONST ssdt_pcihp_adr */
-      25....
-      26....            Name(_ADR, 0xAA0000)
-
-0000003E....08 5F 41 44 52 0C 00 00     "._ADR..."
-00000046....AA 00 ..................    ".."
-
-      27....
-      28..../* ACPI_EXTRACT_METHOD_STRING ssdt_pcihp_ej0 */
-      29....
-      30....            Method(_EJ0, 1) {
-
-00000048....14 0F 5F 45 4A 30 01 ...    ".._EJ0."
-
-      31....                Return (PCEJ(_SUN))
-
-0000004F....A4 .....................    "."
-00000050....50 43 45 4A 5F 53 55 4E     "PCEJ_SUN"
-      32....            }
-      33....        }
-      34....    }
-      35....}
-      36....
+ASL Optimizing Compiler version 20130214-32 [Apr  6 2013]
+Copyright (c) 2000 - 2013 Intel Corporation
+
+Compilation of "out/ssdt-pcihp.dsl.i" - Thu May  9 17:57:45 2013
+
+       4:  DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
+
+00000000:  53 53 44 54 58 00 00 00     "SSDTX..."
+00000008:  01 8B 42 58 50 43 00 00     "..BXPC.."
+00000010:  42 58 53 53 44 54 50 43     "BXSSDTPC"
+00000018:  01 00 00 00 49 4E 54 4C     "....INTL"
+00000020:  14 02 13 20 ............    "... "
+
+       5:  {
+       6:      External(\_SB.PCI0, DeviceObj)
+       7:      External(\_SB.PCI0.PCEJ, MethodObj)
+       8:      Scope(\_SB.PCI0) {
+
+00000024:  10 33 5C 2E 5F 53 42 5F     ".3\._SB_"
+0000002C:  50 43 49 30 ............    "PCI0"
+
+      18:          Device(SAA) {
+
+00000030:  5B 82 26 53 41 41 5F ...    "[.&amp;amp;SAA_"
+
+      22:              Name(_SUN, 0xAA)
+
+00000037:  08 5F 53 55 4E 0A AA ...    "._SUN.."
+
+      26:              Name(_ADR, 0xAA0000)
+
+0000003E:  08 5F 41 44 52 0C 00 00     "._ADR..."
+00000046:  AA 00 ..................    ".."
+
+      30:              Method(_EJ0, 1) {
+
+00000048:  14 0F 5F 45 4A 30 01 ...    ".._EJ0."
+
+      31:                  Return (PCEJ(_SUN))
+
+[****iasl****]
+out/ssdt-pcihp.dsl.i     31:                 Return (PCEJ(_SUN))
+Warning  1104 -                                        ^ Reserved method should not return a value (_EJ0)
+
+
+
+0000004F:  A4 .....................    "."
+00000050:  50 43 45 4A 5F 53 55 4E     "PCEJ_SUN"
+      32:              }
+      33:          }
+      34:      }
+      35:  }
+


 Summary of errors and warnings

+out/ssdt-pcihp.dsl.i     31:                 Return (PCEJ(_SUN))
+Warning  1104 -                                        ^ Reserved method should not return a value (_EJ0)


-ASL Optimizing Compiler version 20100528 [Jul  2 2010]
-ASL Input:  out/ssdt-pcihp.dsl.i - 37 lines, 767 bytes, 6 keywords
-AML Output: out/ssdt-pcihp.aml - 88 bytes, 5 named objects, 1 executable opcodes
+ASL Optimizing Compiler version 20130214-32 [Apr  6 2013]

-Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
+ASL Input:     out/ssdt-pcihp.dsl.i - 37 lines, 359 bytes, 6 keywords
+AML Output:    out/ssdt-pcihp.aml - 88 bytes, 5 named objects, 1 executable opcodes
+Listing File:  out/ssdt-pcihp.lst - 2016 bytes
+Hex Dump:      out/ssdt-pcihp.hex - 228 bytes

+Compilation complete. 0 Errors, 1 Warnings, 0 Remarks, 0 Optimizations

----------------

As you can see, there's no code comments anymore, so
nothing to output by acpi_extract.py

I haven't digged further yet -- just a heads-up for now.

Thanks,

/mjt
&lt;/pre&gt;</description>
    <dc:creator>Michael Tokarev</dc:creator>
    <dc:date>2013-05-09T14:29:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6188">
    <title>another iasl update breaks seabios compilation again</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6188</link>
    <description>&lt;pre&gt;[Resending after being subscribed to the list]

I'm not sure what happened yet, but I noticed that current seabios
does not build with 20130214-32 version of iasl.

Apparently, the listing file (-l) produced now does not contain
any comments from the original source, so tools/acpi_extract.py
produce nothing from these files.

Here's the diff between listing produced by two versions of iasl
for ssdt-pcihp:

----------------

--- out/ssdt-pcihp.lst-201005282013-05-09 17:55:43.872160687 +0400
+++ out/ssdt-pcihp.lst-20130214-322013-05-09 17:57:45.222803783 +0400
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,84 +1,72 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;

 Intel ACPI Component Architecture
-ASL Optimizing Compiler version 20100528 [Jul  2 2010]
-Copyright (c) 2000 - 2010 Intel Corporation
-Supports ACPI Specification Revision 4.0a
-
-Compilation of "out/ssdt-pcihp.dsl.i" - Thu May  9 17:55:43 2013
-
-       1....
-       2..../* ACPI_EXTRACT_ALL_CODE ssdp_pcihp_aml */
-       3....
-       4....DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
-
-00000000....53 53 44 54 58 00 00 00     "SSDTX..."
-00000008....01 77 42 58 50 43 00 00     ".wBXPC.."
-00000010....42 58 53 53 44 54 50 43     "BXSSDTPC"
-00000018....01 00 00 00 49 4E 54 4C     "....INTL"
-00000020....28 05 10 20 ............    "(.. "
-
-       5....{
-       6....    External(\_SB.PCI0, DeviceObj)
-       7....    External(\_SB.PCI0.PCEJ, MethodObj)
-       8....    Scope(\_SB.PCI0) {
-
-00000024....10 33 5C 2E 5F 53 42 5F     ".3\._SB_"
-0000002C....50 43 49 30 ............    "PCI0"
-
-       9....
-      10..../* ACPI_EXTRACT_DEVICE_START ssdt_pcihp_start */
-      11....
-      12....
-      13..../* ACPI_EXTRACT_DEVICE_END ssdt_pcihp_end */
-      14....
-      15....
-      16..../* ACPI_EXTRACT_DEVICE_STRING ssdt_pcihp_name */
-      17....
-      18....        Device(SAA) {
-
-00000030....5B 82 26 53 41 41 5F ...    "[.&amp;amp;SAA_"
-
-      19....
-      20..../* ACPI_EXTRACT_NAME_BYTE_CONST ssdt_pcihp_id */
-      21....
-      22....            Name(_SUN, 0xAA)
-
-00000037....08 5F 53 55 4E 0A AA ...    "._SUN.."
-
-      23....
-      24..../* ACPI_EXTRACT_NAME_DWORD_CONST ssdt_pcihp_adr */
-      25....
-      26....            Name(_ADR, 0xAA0000)
-
-0000003E....08 5F 41 44 52 0C 00 00     "._ADR..."
-00000046....AA 00 ..................    ".."
-
-      27....
-      28..../* ACPI_EXTRACT_METHOD_STRING ssdt_pcihp_ej0 */
-      29....
-      30....            Method(_EJ0, 1) {
-
-00000048....14 0F 5F 45 4A 30 01 ...    ".._EJ0."
-
-      31....                Return (PCEJ(_SUN))
-
-0000004F....A4 .....................    "."
-00000050....50 43 45 4A 5F 53 55 4E     "PCEJ_SUN"
-      32....            }
-      33....        }
-      34....    }
-      35....}
-      36....
+ASL Optimizing Compiler version 20130214-32 [Apr  6 2013]
+Copyright (c) 2000 - 2013 Intel Corporation
+
+Compilation of "out/ssdt-pcihp.dsl.i" - Thu May  9 17:57:45 2013
+
+       4:  DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
+
+00000000:  53 53 44 54 58 00 00 00     "SSDTX..."
+00000008:  01 8B 42 58 50 43 00 00     "..BXPC.."
+00000010:  42 58 53 53 44 54 50 43     "BXSSDTPC"
+00000018:  01 00 00 00 49 4E 54 4C     "....INTL"
+00000020:  14 02 13 20 ............    "... "
+
+       5:  {
+       6:      External(\_SB.PCI0, DeviceObj)
+       7:      External(\_SB.PCI0.PCEJ, MethodObj)
+       8:      Scope(\_SB.PCI0) {
+
+00000024:  10 33 5C 2E 5F 53 42 5F     ".3\._SB_"
+0000002C:  50 43 49 30 ............    "PCI0"
+
+      18:          Device(SAA) {
+
+00000030:  5B 82 26 53 41 41 5F ...    "[.&amp;amp;SAA_"
+
+      22:              Name(_SUN, 0xAA)
+
+00000037:  08 5F 53 55 4E 0A AA ...    "._SUN.."
+
+      26:              Name(_ADR, 0xAA0000)
+
+0000003E:  08 5F 41 44 52 0C 00 00     "._ADR..."
+00000046:  AA 00 ..................    ".."
+
+      30:              Method(_EJ0, 1) {
+
+00000048:  14 0F 5F 45 4A 30 01 ...    ".._EJ0."
+
+      31:                  Return (PCEJ(_SUN))
+
+[****iasl****]
+out/ssdt-pcihp.dsl.i     31:                 Return (PCEJ(_SUN))
+Warning  1104 -                                        ^ Reserved method should not return a value (_EJ0)
+
+
+
+0000004F:  A4 .....................    "."
+00000050:  50 43 45 4A 5F 53 55 4E     "PCEJ_SUN"
+      32:              }
+      33:          }
+      34:      }
+      35:  }
+


 Summary of errors and warnings

+out/ssdt-pcihp.dsl.i     31:                 Return (PCEJ(_SUN))
+Warning  1104 -                                        ^ Reserved method should not return a value (_EJ0)


-ASL Optimizing Compiler version 20100528 [Jul  2 2010]
-ASL Input:  out/ssdt-pcihp.dsl.i - 37 lines, 767 bytes, 6 keywords
-AML Output: out/ssdt-pcihp.aml - 88 bytes, 5 named objects, 1 executable opcodes
+ASL Optimizing Compiler version 20130214-32 [Apr  6 2013]

-Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
+ASL Input:     out/ssdt-pcihp.dsl.i - 37 lines, 359 bytes, 6 keywords
+AML Output:    out/ssdt-pcihp.aml - 88 bytes, 5 named objects, 1 executable opcodes
+Listing File:  out/ssdt-pcihp.lst - 2016 bytes
+Hex Dump:      out/ssdt-pcihp.hex - 228 bytes

+Compilation complete. 0 Errors, 1 Warnings, 0 Remarks, 0 Optimizations

----------------

As you can see, there's no code comments anymore, so
nothing to output by acpi_extract.py

I haven't digged further yet -- just a heads-up for now.

Thanks,

/mjt
&lt;/pre&gt;</description>
    <dc:creator>Michael Tokarev</dc:creator>
    <dc:date>2013-05-09T14:48:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6161">
    <title>How to modify qemu-kvm bios.bin?</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6161</link>
    <description>&lt;pre&gt;I know qemu-kvm use seabios as pc bios.i just want let vm created by
qemu-kvm show a custom JPEG image during bootup. How to modify the file
bios.bin?

I see the following command on coreboot website，but i can't find
coreboot.rom file in /usr/share/qemu-kvm/ . maybe qemu-kvm use non-coreboot
uses,How do I do to reach my goal？

./build/cbfstool build/coreboot.rom add -f /path/to/image.jpg -n
bootsplash.jpg -t raw
_______________________________________________
SeaBIOS mailing list
SeaBIOS&amp;lt; at &amp;gt;seabios.org
http://www.seabios.org/mailman/listinfo/seabios
&lt;/pre&gt;</description>
    <dc:creator>li peter</dc:creator>
    <dc:date>2013-05-06T06:20:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6156">
    <title>[PATCH] acpi: minor clean-up of 64 bit window logic</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6156</link>
    <description>&lt;pre&gt;Make 64 bit window detection logic a bit cleaner:
don't hardcode 0 address as invalid, instead
check start &amp;lt; end.

Signed-off-by: Michael S. Tsirkin &amp;lt;mst&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 src/acpi.c    | 2 +-
 src/pciinit.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/acpi.c b/src/acpi.c
index b03b2ba..1037093 100644
--- a/src/acpi.c
+++ b/src/acpi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -355,7 +355,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_ssdt(void)
     // store pci io windows
     *(u32*)&amp;amp;ssdt_ptr[acpi_pci32_start[0]] = cpu_to_le32(pcimem_start);
     *(u32*)&amp;amp;ssdt_ptr[acpi_pci32_end[0]] = cpu_to_le32(pcimem_end - 1);
-    if (pcimem64_start) {
+    if (pcimem64_start &amp;lt; pcimem64_end) {
         ssdt_ptr[acpi_pci64_valid[0]] = 1;
         *(u64*)&amp;amp;ssdt_ptr[acpi_pci64_start[0]] = cpu_to_le64(pcimem64_start);
         *(u64*)&amp;amp;ssdt_ptr[acpi_pci64_end[0]] = cpu_to_le64(pcimem64_end - 1);
diff --git a/src/pciinit.c b/src/pciinit.c
index a4a5bf5..fdf1362 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -818,7 +818,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void pci_bios_map_devices(struct pci_bus *busses, struct pci_mem *mem)
         pci_region_map_entries(busses, &amp;amp;r64_pref);
     } else if (!mem) {
         // no bars mapped high -&amp;gt; drop 64bit window (see dsdt)
-        pcimem64_start = 0;
+        pcimem64_end = pcimem64_start = 0;
     }
     // Map regions on each device.
     int bus;
&lt;/pre&gt;</description>
    <dc:creator>Michael S. Tsirkin</dc:creator>
    <dc:date>2013-04-30T10:36:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6154">
    <title>[PATCHv2] pci: load memory window setup from host</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6154</link>
    <description>&lt;pre&gt;Load memory window setup for pci from host.
This makes it possible for host to make sure
setup matches hardware exactly: especially important
for when ACPI tables are loaded from host.
This will also make it easier to add more chipsets
down the road.

Signed-off-by: Michael S. Tsirkin &amp;lt;mst&amp;lt; at &amp;gt;redhat.com&amp;gt;
---

Changes from v1:
- fix bug in 64 bit range check
- address Kevin's comments:
move file load into pciinit.c
dont reorder initialization
sizeof style fix

 src/pciinit.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 75 insertions(+), 16 deletions(-)

diff --git a/src/pciinit.c b/src/pciinit.c
index bb9355f..a4a5bf5 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -13,6 +13,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "config.h" // CONFIG_*
 #include "memmap.h" // add_e820
 #include "paravirt.h" // RamSize
+#include "byteorder.h" // le64_to_cpu
 #include "dev-q35.h"
 
 /* PM Timer ticks per second (HZ) */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -61,6 +62,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct pci_bus {
     struct pci_device *bus_dev;
 };
 
+struct pci_mem {
+u64 start32;
+u64 end32;
+u64 start64;
+u64 end64;
+};
+
 static u32 pci_bar(struct pci_device *pci, int region_num)
 {
     if (region_num != PCI_ROM_SLOT) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -361,6 +369,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void pci_enable_default_vga(void)
 
 void i440fx_mem_addr_setup(struct pci_device *dev, void *arg)
 {
+    if (arg)
+/* use supplied memory */;
     if (RamSize &amp;lt;= 0x80000000)
         pcimem_start = 0x80000000;
     else if (RamSize &amp;lt;= 0xc0000000)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -383,8 +393,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void mch_mem_addr_setup(struct pci_device *dev, void *arg)
     pci_config_writel(bdf, Q35_HOST_BRIDGE_PCIEXBAR, lower);
     add_e820(addr, size, E820_RESERVED);
 
-    /* setup pci i/o window (above mmconfig) */
-    pcimem_start = addr + size;
+    /* unless done already, setup pci i/o window (above mmconfig) */
+    if (!arg)
+    pcimem_start = addr + size;
 
     pci_slot_get_irq = mch_pci_slot_get_irq;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -397,11 +408,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct pci_device_id pci_platform_tbl[] = {
     PCI_DEVICE_END
 };
 
-static void pci_bios_init_platform(void)
+static void pci_bios_init_platform(struct pci_mem *mem)
 {
     struct pci_device *pci;
     foreachpci(pci) {
-        pci_init_device(pci_platform_tbl, pci, NULL);
+        pci_init_device(pci_platform_tbl, pci, mem);
     }
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -762,10 +773,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void pci_region_map_entries(struct pci_bus *busses, struct pci_region *r)
     }
 }
 
-static void pci_bios_map_devices(struct pci_bus *busses)
+static void pci_bios_map_devices(struct pci_bus *busses, struct pci_mem *mem)
 {
     if (pci_bios_init_root_regions(busses)) {
         struct pci_region r64_mem, r64_pref;
+
+        if (mem &amp;amp;&amp;amp; mem-&amp;gt;start64 &amp;gt;= mem-&amp;gt;end64)
+            panic("PCI: out of 32bit address space\n");
+
         r64_mem.list = NULL;
         r64_pref.list = NULL;
         pci_region_migrate_64bit_entries(&amp;amp;busses[0].r[PCI_REGION_TYPE_MEM],
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -781,14 +796,27 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void pci_bios_map_devices(struct pci_bus *busses)
         u64 align_mem = pci_region_align(&amp;amp;r64_mem);
         u64 align_pref = pci_region_align(&amp;amp;r64_pref);
 
-        r64_mem.base = ALIGN(0x100000000LL + RamSizeOver4G, align_mem);
-        r64_pref.base = ALIGN(r64_mem.base + sum_mem, align_pref);
-        pcimem64_start = r64_mem.base;
-        pcimem64_end = r64_pref.base + sum_pref;
+        if (mem) {
+            /*
+             * Non prefetcheable memory at start of the window,
+             * prefetcheable memory at the end.
+             * This way OS has the maximum flexibility for
+             * allocating the rest of the memory.
+             */
+            r64_mem.base = ALIGN(mem-&amp;gt;start64, align_mem);
+            r64_pref.base = ALIGN_DOWN(mem-&amp;gt;end64 - sum_pref + 1, align_pref);
+            if (sum_pref &amp;amp;&amp;amp; r64_pref.base &amp;lt; r64_mem.base + sum_mem)
+                panic("PCI: out of 64bit address space\n");
+        } else {
+            r64_mem.base = ALIGN(0x100000000LL + RamSizeOver4G, align_mem);
+            r64_pref.base = ALIGN(r64_mem.base + sum_mem, align_pref);
+            pcimem64_start = r64_mem.base;
+            pcimem64_end = r64_pref.base + sum_pref;
+        }
 
         pci_region_map_entries(busses, &amp;amp;r64_mem);
         pci_region_map_entries(busses, &amp;amp;r64_pref);
-    } else {
+    } else if (!mem) {
         // no bars mapped high -&amp;gt; drop 64bit window (see dsdt)
         pcimem64_start = 0;
     }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -801,11 +829,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void pci_bios_map_devices(struct pci_bus *busses)
     }
 }
 
+static
+struct pci_mem *pci_mem_get(void)
+{
+    int psize;
+    struct pci_mem *mem = romfile_loadfile("etc/pci-info", &amp;amp;psize);
+    if (!mem)
+        return NULL;
+    if (psize &amp;lt; sizeof(*mem)) {
+        free(mem);
+        return NULL;
+    }
+    mem-&amp;gt;start32 = le64_to_cpu(mem-&amp;gt;start32);
+    mem-&amp;gt;end32 = le64_to_cpu(mem-&amp;gt;end32);
+    mem-&amp;gt;start64 = le64_to_cpu(mem-&amp;gt;start64);
+    mem-&amp;gt;end64 = le64_to_cpu(mem-&amp;gt;end64);
+    return mem;
+}
+
 
 /****************************************************************
  * Main setup code
  ****************************************************************/
-
 void
 pci_setup(void)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -823,25 +868,39 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; pci_setup(void)
     dprintf(1, "=== PCI device probing ===\n");
     pci_probe_devices();
 
-    pcimem_start = RamSize;
-    pci_bios_init_platform();
+    struct pci_mem *mem = pci_mem_get();
+
+    if (mem) {
+        pcimem_start = mem-&amp;gt;start32;
+        pcimem_end = mem-&amp;gt;end32;
+        pcimem64_start = mem-&amp;gt;start64;
+        pcimem64_end = mem-&amp;gt;end64;
+    } else {
+        pcimem_start = RamSize;
+    }
+
+    pci_bios_init_platform(mem);
 
     dprintf(1, "=== PCI new allocation pass #1 ===\n");
     struct pci_bus *busses = malloc_tmp(sizeof(*busses) * (MaxPCIBus + 1));
     if (!busses) {
         warn_noalloc();
-        return;
+        goto done;
     }
     memset(busses, 0, sizeof(*busses) * (MaxPCIBus + 1));
     if (pci_bios_check_devices(busses))
-        return;
+        goto done;
 
     dprintf(1, "=== PCI new allocation pass #2 ===\n");
-    pci_bios_map_devices(busses);
+    pci_bios_map_devices(busses, mem);
 
     pci_bios_init_devices();
 
     free(busses);
 
     pci_enable_default_vga();
+
+done:
+    if (mem)
+        free(mem);
 }
&lt;/pre&gt;</description>
    <dc:creator>Michael S. Tsirkin</dc:creator>
    <dc:date>2013-04-30T06:34:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6145">
    <title>[PATCH 0/2] paravirt: load pci window data from host</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6145</link>
    <description>&lt;pre&gt;This makes it possible to load pci window
data from host, when running on qemu.

This makes it possible for host to make sure
setup matches hardware exactly: especially important
for when ACPI tables are loaded from host.
This will also make it easier to add more chipsets
down the road.

Michael S. Tsirkin (2):
  paravirt: init qemu cfg earlier
  pci: load memory window setup from host

 src/paravirt.c | 27 ++++++++++++++++++++++++++-
 src/pciinit.c  | 54 ++++++++++++++++++++++++++++++++++++++++--------------
 src/post.c     |  1 -
 src/util.h     |  8 +++++++-
 4 files changed, 73 insertions(+), 17 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Michael S. Tsirkin</dc:creator>
    <dc:date>2013-04-29T15:21:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6140">
    <title>[PATCH] ps2: disable the keyboard and mouse beforeflushing the queue</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6140</link>
    <description>&lt;pre&gt;If SeaBIOS is run as a payload via coreboot (and presumably as a
CSM), then it's possible the keyboard or mouse will still be
enabled.  This can lead to data being queued even after the flush
function attempts to clear the queue.

Disabling the keyboard/mouse prior to flushing is pretty standard
in DOS programming so it's not surprising that it's needed here.

I believe this problem manifests with the Chromebook Pixel.  People
have reported that sometimes the 'ESC to Select Boot Devices'
doesn't work.  I can reproduce this faithfully by holding 'Ctrl-L'
in the firmware screen during SeaBIOS initialization.

I can't test this fix on an actual Pixel because I don't know how
to update SeaBIOS but I have tested the patch under QEMU.

Signed-off-by: Anthony Liguori &amp;lt;aliguori&amp;lt; at &amp;gt;us.ibm.com&amp;gt;
---
 src/ps2port.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/ps2port.c b/src/ps2port.c
index 9b760fd..2169171 100644
--- a/src/ps2port.c
+++ b/src/ps2port.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -55,6 +55,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int
 i8042_flush(void)
 {
     dprintf(7, "i8042_flush\n");
+
+    /* Disable the keyboard and mouse to prevent additional data from
+     * being queued. */
+    outb(0xad, PORT_PS2_STATUS);
+    outb(0xa7, PORT_PS2_STATUS);
+
     int i;
     for (i=0; i&amp;lt;I8042_BUFFER_SIZE; i++) {
         u8 status = inb(PORT_PS2_STATUS);
&lt;/pre&gt;</description>
    <dc:creator>Anthony Liguori</dc:creator>
    <dc:date>2013-04-25T01:32:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6101">
    <title>[RFC][PATCH 1/2] acpi: add ASL for Embedded Controller</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6101</link>
    <description>&lt;pre&gt;defined at ACPI SPEC v5 chapter 12:
"ACPI Embedded Controller Interface Specification"

Signed-off-by: liguang &amp;lt;lig.fnst&amp;lt; at &amp;gt;cn.fujitsu.com&amp;gt;
---
 src/acpi-dsdt-ec.dsl |  106 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 106 insertions(+), 0 deletions(-)
 create mode 100644 src/acpi-dsdt-ec.dsl

diff --git a/src/acpi-dsdt-ec.dsl b/src/acpi-dsdt-ec.dsl
new file mode 100644
index 0000000..6bd8edd
--- /dev/null
+++ b/src/acpi-dsdt-ec.dsl
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,106 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * 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; version 2 of the License.
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+Device (EC0)
+{
+Name (_HID, EISAID ("PNP0C09"))
+Name(_UID, 1)
+
+Method(_CRS, 0)
+  {
+    Name(BFFR, ResourceTemplate()
+    {
+      IO(Decode16, 0x62, 0x62, 0, 1)      // ACPI DATA IN/OUT
+      IO(Decode16, 0x66, 0x66, 0, 1)      // CMD/STS
+      IRQ(Edge, ActiveHigh, Exclusive) {0x0B}
+    })
+    Return(BFFR)
+  }
+  
+  OperationRegion(ECF0, EmbeddedControl, 0, 0xFF)
+    Field(ECF2, ByteAcc, Lock, Preserve)
+  {
+Offset(1),
+STMP,   8,      // 1,      Sensor Temperature
+ACPW,   8,      // 2,      AC Power (AC Present = 1, else 0)
+LIDS,   8,      // 3,      Lid State (Lid Open = 1, else 0)
+PBNS,   8,      // 4,      Power Button State (Pressed = 1, else 0)
+BTST,   8,      // 5,      Battery Status
+BTCR,   8,      // 6,      Battery Current Rate
+BTCC,   8,      // 7,      Battery Current Capacity
+BTVT,   8,      // 8,      Battery Voltage
+offset(0x10),
+SPTR,   8,      // 5,      SMBus Protocol Register
+SSTS,   8,      // 5,      SMBus Status Register
+SADR,   8,      // 6,      SMBus Address Register
+SCMD,   8,      // 7,      SMBus Command Register
+SBFR,   256,    // 8,      SMBus Block Buffer
+SCNT,   8,      // 40,     SMBus Block Count
+  }
+  
+Method(_REG, 2)
+{
+}
+
+/* AC status: present */
+Method(_Q01, 0, NotSerialized)
+{
+Notify (AC, 0x80)
+}
+
+/* AC status: dispear*/
+Method(_Q02, 0, NotSerialized)
+{
+Notify (AC, 0x80)
+}
+
+    Method(_Q04, 0, NotSerialized)
+    {
+       Notify(LID, 0x80)
+    }
+
+    Method(_Q04, 0, NotSerialized)
+    {
+       Notify(LID, 0x80)
+    }
+
+Device(AC)
+{
+Name(_HID, "ACPI0003")
+Name(_UID, 0x00)
+Name(_PCL, Package() { \_SB } )
+
+Method(_PSR, 0, NotSerialized)
+{
+return (ACPW)
+}
+
+Method(_STA, 0, NotSerialized)
+{
+Return (0x0f)
+}
+}
+
+Device(LID)
+{
+Name(_HID, "PNP0C0D")
+
+Method(_LID, 0, NotSerialized)
+{
+return (LIDS)
+}
+}
+}
&lt;/pre&gt;</description>
    <dc:creator>liguang</dc:creator>
    <dc:date>2013-04-17T07:22:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6091">
    <title>[qemu PATCH 0/5] publish etc/acpi/APIC in fw_cfg</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6091</link>
    <description>&lt;pre&gt;This series exports the MADT (APIC) ACPI table under the new
"etc/acpi/APIC" fw_cfg file. I sought to follow the requirements set
forth in [1], the new table is only visible in the patched/patched case.
I cross-tested { master, patched } qemu with { master, patched } seabios
(the APIC, DSDT and RSDT tables) using guest acpidump and dmesg.

The -acpitable command line option is purposely ignored based on the
last paragraph of [2]; the user isn't supposed to pass APIC with that
option.

checkpatch.pl complains a little but (as last time) it's a false alarm.

The series is bisectable.

[1] http://thread.gmane.org/gmane.comp.emulators.qemu/202005/focus=202072
[2] http://thread.gmane.org/gmane.comp.bios.coreboot.seabios/5960/focus=6008

Laszlo Ersek (5):
  refer to FWCfgState explicitly
  hw/acpi: extract standard table headers as a standalone structure
  hw/acpi: export default ACPI headers using the type just introduced
  hw/acpi: export acpi_checksum()
  i386/pc: build ACPI MADT (APIC) for fw_cfg clients

 hw/acpi.h           |   15 +++++
 hw/loader.h         |    3 +-
 hw/multiboot.h      |    4 +-
 hw/pc.h             |   20 ++++---
 hw/acpi.c           |   89 ++++++++++++++-------------
 hw/acpi_piix4.c     |    2 +-
 hw/i386/multiboot.c |    2 +-
 hw/i386/pc.c        |  166 +++++++++++++++++++++++++++++++++++++++++++++++----
 hw/i386/pc_piix.c   |    4 +-
 hw/i386/pc_q35.c    |   10 ++-
 hw/loader.c         |    2 +-
 hw/sparc/sun4m.c    |    6 +-
 hw/sparc64/sun4u.c  |    2 +-
 13 files changed, 248 insertions(+), 77 deletions(-)
&lt;/pre&gt;</description>
    <dc:creator>Laszlo Ersek</dc:creator>
    <dc:date>2013-04-08T13:13:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6089">
    <title>[seabios PATCH] install the MADT from the "etc/acpi/APIC"fw_cfg file if it's available</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6089</link>
    <description>&lt;pre&gt;
Signed-off-by: Laszlo Ersek &amp;lt;lersek&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 src/acpi.c |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/src/acpi.c b/src/acpi.c
index bc4d8ea..9e128b2 100644
--- a/src/acpi.c
+++ b/src/acpi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -393,6 +393,33 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_madt(void)
     return madt;
 }
 
+static void*
+find_table(const char *sig, void *(*buildfn)(void))
+{
+    char buf[] = "etc/acpi/QUUX";
+    struct romfile_s *file;
+
+    snprintf(buf + (sizeof buf - 1 - 4), 4 + 1, "%s", sig);
+    file = romfile_find(buf);
+    if (file != NULL &amp;amp;&amp;amp; file-&amp;gt;size &amp;gt;= sizeof(struct acpi_table_header)) {
+        void *table;
+
+        table = malloc_high(file-&amp;gt;size);
+        if (table == NULL)
+            warn_noalloc();
+        else {
+            if ((*file-&amp;gt;copy)(file, table, file-&amp;gt;size) == file-&amp;gt;size) {
+                dprintf(4, "ACPI %s: using fw_cfg %s\n", sig, buf);
+                return table;
+            }
+            free(table);
+        }
+    }
+
+    dprintf(4, "ACPI %s: building default\n", sig);
+    return (*buildfn)();
+}
+
 // Encode a hex value
 static inline char getHex(u32 val) {
     val &amp;amp;= 0x0f;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -792,7 +819,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; 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(find_table("APIC", build_madt));
     ACPI_INIT_TABLE(build_hpet());
     ACPI_INIT_TABLE(build_srat());
     if (pci-&amp;gt;device == PCI_DEVICE_ID_INTEL_ICH9_LPC)
&lt;/pre&gt;</description>
    <dc:creator>Laszlo Ersek</dc:creator>
    <dc:date>2013-04-08T13:14:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6075">
    <title>[PATCH 3/3] acpi: Use cpu_to_leXX() consistently.</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6075</link>
    <description>&lt;pre&gt;Audit the ACPI code and ensure that all multi-byte fields do proper
byte swabbing.

Signed-off-by: Kevin O'Connor &amp;lt;kevin&amp;lt; at &amp;gt;koconnor.net&amp;gt;
---
 src/acpi.c | 47 +++++++++++++++++++++++------------------------
 src/acpi.h |  4 ++--
 2 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/src/acpi.c b/src/acpi.c
index f8fc228..f39c232 100644
--- a/src/acpi.c
+++ b/src/acpi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -21,7 +21,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 static void
 build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev)
 {
-    h-&amp;gt;signature = sig;
+    h-&amp;gt;signature = cpu_to_le32(sig);
     h-&amp;gt;length = cpu_to_le32(len);
     h-&amp;gt;revision = rev;
     memcpy(h-&amp;gt;oem_id, BUILD_APPNAME6, 6);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -123,7 +123,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_fadt(struct pci_device *pci)
 
     /* FACS */
     memset(facs, 0, sizeof(*facs));
-    facs-&amp;gt;signature = FACS_SIGNATURE;
+    facs-&amp;gt;signature = cpu_to_le32(FACS_SIGNATURE);
     facs-&amp;gt;length = cpu_to_le32(sizeof(*facs));
 
     /* FADT */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -181,8 +181,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_madt(void)
         intsrcovr-&amp;gt;type   = APIC_XRUPT_OVERRIDE;
         intsrcovr-&amp;gt;length = sizeof(*intsrcovr);
         intsrcovr-&amp;gt;source = 0;
-        intsrcovr-&amp;gt;gsi    = 2;
-        intsrcovr-&amp;gt;flags  = 0; /* conforms to bus specifications */
+        intsrcovr-&amp;gt;gsi    = cpu_to_le32(2);
+        intsrcovr-&amp;gt;flags  = cpu_to_le16(0); /* conforms to bus specifications */
         intsrcovr++;
     }
     for (i = 1; i &amp;lt; 16; i++) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -193,8 +193,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_madt(void)
         intsrcovr-&amp;gt;type   = APIC_XRUPT_OVERRIDE;
         intsrcovr-&amp;gt;length = sizeof(*intsrcovr);
         intsrcovr-&amp;gt;source = i;
-        intsrcovr-&amp;gt;gsi    = i;
-        intsrcovr-&amp;gt;flags  = 0xd; /* active high, level triggered */
+        intsrcovr-&amp;gt;gsi    = cpu_to_le32(i);
+        intsrcovr-&amp;gt;flags  = cpu_to_le16(0xd); /* active high, level triggered */
         intsrcovr++;
     }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -202,7 +202,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_madt(void)
     local_nmi-&amp;gt;type         = APIC_LOCAL_NMI;
     local_nmi-&amp;gt;length       = sizeof(*local_nmi);
     local_nmi-&amp;gt;processor_id = 0xff; /* all processors */
-    local_nmi-&amp;gt;flags        = 0;
+    local_nmi-&amp;gt;flags        = cpu_to_le16(0);
     local_nmi-&amp;gt;lint         = 1; /* LINT1 */
     local_nmi++;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -340,13 +340,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_ssdt(void)
         ssdt_ptr[acpi_s4_pkg[0] + 1] = ssdt[acpi_s4_pkg[0] + 3] = sys_states[4] &amp;amp; 127;
 
     // store pci io windows
-    *(u32*)&amp;amp;ssdt_ptr[acpi_pci32_start[0]] = pcimem_start;
-    *(u32*)&amp;amp;ssdt_ptr[acpi_pci32_end[0]] = pcimem_end - 1;
+    *(u32*)&amp;amp;ssdt_ptr[acpi_pci32_start[0]] = cpu_to_le32(pcimem_start);
+    *(u32*)&amp;amp;ssdt_ptr[acpi_pci32_end[0]] = cpu_to_le32(pcimem_end - 1);
     if (pcimem64_start) {
         ssdt_ptr[acpi_pci64_valid[0]] = 1;
-        *(u64*)&amp;amp;ssdt_ptr[acpi_pci64_start[0]] = pcimem64_start;
-        *(u64*)&amp;amp;ssdt_ptr[acpi_pci64_end[0]] = pcimem64_end - 1;
-        *(u64*)&amp;amp;ssdt_ptr[acpi_pci64_length[0]] = pcimem64_end - pcimem64_start;
+        *(u64*)&amp;amp;ssdt_ptr[acpi_pci64_start[0]] = cpu_to_le64(pcimem64_start);
+        *(u64*)&amp;amp;ssdt_ptr[acpi_pci64_end[0]] = cpu_to_le64(pcimem64_end - 1);
+        *(u64*)&amp;amp;ssdt_ptr[acpi_pci64_length[0]] = cpu_to_le64(
+            pcimem64_end - pcimem64_start);
     } else {
         ssdt_ptr[acpi_pci64_valid[0]] = 0;
     }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -440,7 +441,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_hpet(void)
      * emulated hpet
      */
     hpet-&amp;gt;timer_block_id = cpu_to_le32(0x8086a201);
-    hpet-&amp;gt;addr.address = cpu_to_le32(BUILD_HPET_ADDRESS);
+    hpet-&amp;gt;addr.address = cpu_to_le64(BUILD_HPET_ADDRESS);
     build_header((void*)hpet, HPET_SIGNATURE, sizeof(*hpet), 1);
 
     return hpet;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -452,13 +453,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; acpi_build_srat_memory(struct srat_memory_affinity *numamem,
 {
     numamem-&amp;gt;type = SRAT_MEMORY;
     numamem-&amp;gt;length = sizeof(*numamem);
-    memset(numamem-&amp;gt;proximity, 0 ,4);
+    memset(numamem-&amp;gt;proximity, 0, 4);
     numamem-&amp;gt;proximity[0] = node;
     numamem-&amp;gt;flags = cpu_to_le32(!!enabled);
-    numamem-&amp;gt;base_addr_low = base &amp;amp; 0xFFFFFFFF;
-    numamem-&amp;gt;base_addr_high = base &amp;gt;&amp;gt; 32;
-    numamem-&amp;gt;length_low = len &amp;amp; 0xFFFFFFFF;
-    numamem-&amp;gt;length_high = len &amp;gt;&amp;gt; 32;
+    numamem-&amp;gt;base_addr = cpu_to_le64(base);
+    numamem-&amp;gt;range_length = cpu_to_le64(len);
 }
 
 static void *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -484,7 +483,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_srat(void)
     }
 
     memset(srat, 0, srat_size);
-    srat-&amp;gt;reserved1=1;
+    srat-&amp;gt;reserved1=cpu_to_le32(1);
     struct srat_processor_affinity *core = (void*)(srat + 1);
     int i;
     u64 curnode;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -567,8 +566,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_mcfg_q35(void)
         return NULL;
     }
     memset(mcfg, 0, len);
-    mcfg-&amp;gt;allocation[0].address = Q35_HOST_BRIDGE_PCIEXBAR_ADDR;
-    mcfg-&amp;gt;allocation[0].pci_segment = Q35_HOST_PCIE_PCI_SEGMENT;
+    mcfg-&amp;gt;allocation[0].address = cpu_to_le64(Q35_HOST_BRIDGE_PCIEXBAR_ADDR);
+    mcfg-&amp;gt;allocation[0].pci_segment = cpu_to_le16(Q35_HOST_PCIE_PCI_SEGMENT);
     mcfg-&amp;gt;allocation[0].start_bus_number = Q35_HOST_PCIE_START_BUS_NUMBER;
     mcfg-&amp;gt;allocation[0].end_bus_number = Q35_HOST_PCIE_END_BUS_NUMBER;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -605,8 +604,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; acpi_setup(void)
 
 #define ACPI_INIT_TABLE(X)                                   \
     do {                                                     \
-        tables[tbl_idx] = (u32)(X);                          \
-        if (tables[tbl_idx])                                 \
+        tables[tbl_idx] = cpu_to_le32((u32)(X));             \
+        if (le32_to_cpu(tables[tbl_idx]))                    \
             tbl_idx++;                                       \
     } while(0)
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -675,7 +674,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; acpi_setup(void)
         return;
     }
     memset(rsdp, 0, sizeof(*rsdp));
-    rsdp-&amp;gt;signature = RSDP_SIGNATURE;
+    rsdp-&amp;gt;signature = cpu_to_le64(RSDP_SIGNATURE);
     memcpy(rsdp-&amp;gt;oem_id, BUILD_APPNAME6, 6);
     rsdp-&amp;gt;rsdt_physical_address = cpu_to_le32((u32)rsdt);
     rsdp-&amp;gt;checksum -= checksum(rsdp, 20);
diff --git a/src/acpi.h b/src/acpi.h
index 43287d9..5d1e104 100644
--- a/src/acpi.h
+++ b/src/acpi.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -254,8 +254,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct srat_memory_affinity
     ACPI_SUB_HEADER_DEF
     u8     proximity[4];
     u16    reserved1;
-    u32    base_addr_low,base_addr_high;
-    u32    length_low,length_high;
+    u64    base_addr;
+    u64    range_length;
     u32    reserved2;
     u32    flags;
     u32    reserved3[2];
&lt;/pre&gt;</description>
    <dc:creator>Kevin O'Connor</dc:creator>
    <dc:date>2013-03-30T15:51:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6074">
    <title>[PATCH 2/3] acpi: Remove dead code with descriptions ofbit flags.</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6074</link>
    <description>&lt;pre&gt;Remove dead code from acpi table definitions - the ACPI specification
is the best place to get descriptions of the fields and tables anyway.

Signed-off-by: Kevin O'Connor &amp;lt;kevin&amp;lt; at &amp;gt;koconnor.net&amp;gt;
---
 src/acpi.h | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/src/acpi.h b/src/acpi.h
index 097cc75..43287d9 100644
--- a/src/acpi.h
+++ b/src/acpi.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -97,20 +97,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct fadt_descriptor_rev1
     u8  reserved4;              /* Reserved */
     u8  reserved4a;             /* Reserved */
     u8  reserved4b;             /* Reserved */
-#if 0
-    u32 wb_invd         : 1;    /* The wbinvd instruction works properly */
-    u32 wb_invd_flush   : 1;    /* The wbinvd flushes but does not invalidate */
-    u32 proc_c1         : 1;    /* All processors support C1 state */
-    u32 plvl2_up        : 1;    /* C2 state works on MP system */
-    u32 pwr_button      : 1;    /* Power button is handled as a generic feature */
-    u32 sleep_button    : 1;    /* Sleep button is handled as a generic feature, or not present */
-    u32 fixed_rTC       : 1;    /* RTC wakeup stat not in fixed register space */
-    u32 rtcs4           : 1;    /* RTC wakeup stat not possible from S4 */
-    u32 tmr_val_ext     : 1;    /* The tmr_val width is 32 bits (0 = 24 bits) */
-    u32 reserved5       : 23;   /* Reserved - must be zero */
-#else
     u32 flags;
-#endif
 } PACKED;
 
 struct acpi_table_header         /* ACPI common table header */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -140,8 +127,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct facs_descriptor_rev1
     u32 hardware_signature;     /* Hardware configuration signature */
     u32 firmware_waking_vector; /* ACPI OS waking vector */
     u32 global_lock;            /* Global Lock */
-    u32 S4bios_f        : 1;    /* Indicates if S4BIOS support is present */
-    u32 reserved1       : 31;   /* Must be 0 */
+    u32 flags;
     u8  resverved3 [40];        /* Reserved - must be zero */
 } PACKED;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -166,12 +152,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct multiple_apic_table
 {
     ACPI_TABLE_HEADER_DEF     /* ACPI common table header */
     u32 local_apic_address;     /* Physical address of local APIC */
-#if 0
-    u32 PCATcompat      : 1;    /* A one indicates system also has dual 8259s */
-    u32 reserved1       : 31;
-#else
     u32 flags;
-#endif
 } PACKED;
 
 /* Values for Type in APIC sub-headers */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -201,12 +182,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct madt_processor_apic
     ACPI_SUB_HEADER_DEF
     u8  processor_id;           /* ACPI processor id */
     u8  local_apic_id;          /* Processor's local APIC id */
-#if 0
-    u32 processor_enabled: 1;   /* Processor is usable if set */
-    u32 reserved2       : 31;   /* Reserved, must be zero */
-#else
     u32 flags;
-#endif
 } PACKED;
 
 struct madt_io_apic
&lt;/pre&gt;</description>
    <dc:creator>Kevin O'Connor</dc:creator>
    <dc:date>2013-03-30T15:50:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6073">
    <title>[PATCH 1/3] acpi: Move ACPI table definitions from acpi.cto acpi.h.</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6073</link>
    <description>&lt;pre&gt;Signed-off-by: Kevin O'Connor &amp;lt;kevin&amp;lt; at &amp;gt;koconnor.net&amp;gt;
---
 src/acpi.c | 188 +------------------------------------------------------------
 src/acpi.h | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 175 insertions(+), 185 deletions(-)

diff --git a/src/acpi.c b/src/acpi.c
index 55c7259..f8fc228 100644
--- a/src/acpi.c
+++ b/src/acpi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -16,189 +16,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "paravirt.h" // RamSize
 #include "dev-q35.h"
 
-/****************************************************/
-/* ACPI tables init */
-
-/* Table structure from Linux kernel (the ACPI tables are under the
-   BSD license) */
-
-struct acpi_table_header         /* ACPI common table header */
-{
-    ACPI_TABLE_HEADER_DEF
-} PACKED;
-
-/*
- * ACPI 1.0 Root System Description Table (RSDT)
- */
-#define RSDT_SIGNATURE 0x54445352 // RSDT
-struct rsdt_descriptor_rev1
-{
-    ACPI_TABLE_HEADER_DEF       /* ACPI common table header */
-    u32 table_offset_entry[0];  /* Array of pointers to other */
-    /* ACPI tables */
-} PACKED;
-
-/*
- * ACPI 1.0 Firmware ACPI Control Structure (FACS)
- */
-#define FACS_SIGNATURE 0x53434146 // FACS
-struct facs_descriptor_rev1
-{
-    u32 signature;           /* ACPI Signature */
-    u32 length;                 /* Length of structure, in bytes */
-    u32 hardware_signature;     /* Hardware configuration signature */
-    u32 firmware_waking_vector; /* ACPI OS waking vector */
-    u32 global_lock;            /* Global Lock */
-    u32 S4bios_f        : 1;    /* Indicates if S4BIOS support is present */
-    u32 reserved1       : 31;   /* Must be 0 */
-    u8  resverved3 [40];        /* Reserved - must be zero */
-} PACKED;
-
-
-/*
- * Differentiated System Description Table (DSDT)
- */
-#define DSDT_SIGNATURE 0x54445344 // DSDT
-
-/*
- * MADT values and structures
- */
-
-/* Values for MADT PCATCompat */
-
-#define DUAL_PIC                0
-#define MULTIPLE_APIC           1
-
-
-/* Master MADT */
-
-#define APIC_SIGNATURE 0x43495041 // APIC
-struct multiple_apic_table
-{
-    ACPI_TABLE_HEADER_DEF     /* ACPI common table header */
-    u32 local_apic_address;     /* Physical address of local APIC */
-#if 0
-    u32 PCATcompat      : 1;    /* A one indicates system also has dual 8259s */
-    u32 reserved1       : 31;
-#else
-    u32 flags;
-#endif
-} PACKED;
-
-
-/* Values for Type in APIC sub-headers */
-
-#define APIC_PROCESSOR          0
-#define APIC_IO                 1
-#define APIC_XRUPT_OVERRIDE     2
-#define APIC_NMI                3
-#define APIC_LOCAL_NMI          4
-#define APIC_ADDRESS_OVERRIDE   5
-#define APIC_IO_SAPIC           6
-#define APIC_LOCAL_SAPIC        7
-#define APIC_XRUPT_SOURCE       8
-#define APIC_RESERVED           9           /* 9 and greater are reserved */
-
-/*
- * MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE)
- */
-#define ACPI_SUB_HEADER_DEF   /* Common ACPI sub-structure header */\
-    u8  type;                               \
-    u8  length;
-
-/* Sub-structures for MADT */
-
-struct madt_processor_apic
-{
-    ACPI_SUB_HEADER_DEF
-    u8  processor_id;           /* ACPI processor id */
-    u8  local_apic_id;          /* Processor's local APIC id */
-#if 0
-    u32 processor_enabled: 1;   /* Processor is usable if set */
-    u32 reserved2       : 31;   /* Reserved, must be zero */
-#else
-    u32 flags;
-#endif
-} PACKED;
-
-struct madt_io_apic
-{
-    ACPI_SUB_HEADER_DEF
-    u8  io_apic_id;             /* I/O APIC ID */
-    u8  reserved;               /* Reserved - must be zero */
-    u32 address;                /* APIC physical address */
-    u32 interrupt;              /* Global system interrupt where INTI
-                                 * lines start */
-} PACKED;
-
-struct madt_intsrcovr {
-    ACPI_SUB_HEADER_DEF
-    u8  bus;
-    u8  source;
-    u32 gsi;
-    u16 flags;
-} PACKED;
-
-struct madt_local_nmi {
-    ACPI_SUB_HEADER_DEF
-    u8  processor_id;           /* ACPI processor id */
-    u16 flags;                  /* MPS INTI flags */
-    u8  lint;                   /* Local APIC LINT# */
-} PACKED;
-
-
-/*
- * HPET Description Table
- */
-struct acpi_20_hpet {
-    ACPI_TABLE_HEADER_DEF                    /* ACPI common table header */
-    u32           timer_block_id;
-    struct acpi_20_generic_address addr;
-    u8            hpet_number;
-    u16           min_tick;
-    u8            page_protect;
-} PACKED;
-
-#define HPET_ID         0x000
-#define HPET_PERIOD     0x004
-
-/*
- * SRAT (NUMA topology description) table
- */
-
-#define SRAT_PROCESSOR          0
-#define SRAT_MEMORY             1
-
-struct system_resource_affinity_table
-{
-    ACPI_TABLE_HEADER_DEF
-    u32    reserved1;
-    u32    reserved2[2];
-} PACKED;
-
-struct srat_processor_affinity
-{
-    ACPI_SUB_HEADER_DEF
-    u8     proximity_lo;
-    u8     local_apic_id;
-    u32    flags;
-    u8     local_sapic_eid;
-    u8     proximity_hi[3];
-    u32    reserved;
-} PACKED;
-
-struct srat_memory_affinity
-{
-    ACPI_SUB_HEADER_DEF
-    u8     proximity[4];
-    u16    reserved1;
-    u32    base_addr_low,base_addr_high;
-    u32    length_low,length_high;
-    u32    reserved2;
-    u32    flags;
-    u32    reserved3[2];
-} PACKED;
-
 #include "acpi-dsdt.hex"
 
 static void
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -597,7 +414,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_ssdt(void)
     return ssdt;
 }
 
-#define HPET_SIGNATURE 0x54455048 // HPET
+#define HPET_ID         0x000
+#define HPET_PERIOD     0x004
+
 static void*
 build_hpet(void)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -642,7 +461,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; acpi_build_srat_memory(struct srat_memory_affinity *numamem,
     numamem-&amp;gt;length_high = len &amp;gt;&amp;gt; 32;
 }
 
-#define SRAT_SIGNATURE 0x54415253 // SRAT
 static void *
 build_srat(void)
 {
diff --git a/src/acpi.h b/src/acpi.h
index 7fbd082..097cc75 100644
--- a/src/acpi.h
+++ b/src/acpi.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -113,6 +113,178 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct fadt_descriptor_rev1
 #endif
 } PACKED;
 
+struct acpi_table_header         /* ACPI common table header */
+{
+    ACPI_TABLE_HEADER_DEF
+} PACKED;
+
+/*
+ * ACPI 1.0 Root System Description Table (RSDT)
+ */
+#define RSDT_SIGNATURE 0x54445352 // RSDT
+struct rsdt_descriptor_rev1
+{
+    ACPI_TABLE_HEADER_DEF       /* ACPI common table header */
+    u32 table_offset_entry[0];  /* Array of pointers to other */
+    /* ACPI tables */
+} PACKED;
+
+/*
+ * ACPI 1.0 Firmware ACPI Control Structure (FACS)
+ */
+#define FACS_SIGNATURE 0x53434146 // FACS
+struct facs_descriptor_rev1
+{
+    u32 signature;           /* ACPI Signature */
+    u32 length;                 /* Length of structure, in bytes */
+    u32 hardware_signature;     /* Hardware configuration signature */
+    u32 firmware_waking_vector; /* ACPI OS waking vector */
+    u32 global_lock;            /* Global Lock */
+    u32 S4bios_f        : 1;    /* Indicates if S4BIOS support is present */
+    u32 reserved1       : 31;   /* Must be 0 */
+    u8  resverved3 [40];        /* Reserved - must be zero */
+} PACKED;
+
+/*
+ * Differentiated System Description Table (DSDT)
+ */
+#define DSDT_SIGNATURE 0x54445344 // DSDT
+
+/*
+ * MADT values and structures
+ */
+
+/* Values for MADT PCATCompat */
+
+#define DUAL_PIC                0
+#define MULTIPLE_APIC           1
+
+/* Master MADT */
+
+#define APIC_SIGNATURE 0x43495041 // APIC
+struct multiple_apic_table
+{
+    ACPI_TABLE_HEADER_DEF     /* ACPI common table header */
+    u32 local_apic_address;     /* Physical address of local APIC */
+#if 0
+    u32 PCATcompat      : 1;    /* A one indicates system also has dual 8259s */
+    u32 reserved1       : 31;
+#else
+    u32 flags;
+#endif
+} PACKED;
+
+/* Values for Type in APIC sub-headers */
+
+#define APIC_PROCESSOR          0
+#define APIC_IO                 1
+#define APIC_XRUPT_OVERRIDE     2
+#define APIC_NMI                3
+#define APIC_LOCAL_NMI          4
+#define APIC_ADDRESS_OVERRIDE   5
+#define APIC_IO_SAPIC           6
+#define APIC_LOCAL_SAPIC        7
+#define APIC_XRUPT_SOURCE       8
+#define APIC_RESERVED           9           /* 9 and greater are reserved */
+
+/*
+ * MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE)
+ */
+#define ACPI_SUB_HEADER_DEF   /* Common ACPI sub-structure header */\
+    u8  type;                               \
+    u8  length;
+
+/* Sub-structures for MADT */
+
+struct madt_processor_apic
+{
+    ACPI_SUB_HEADER_DEF
+    u8  processor_id;           /* ACPI processor id */
+    u8  local_apic_id;          /* Processor's local APIC id */
+#if 0
+    u32 processor_enabled: 1;   /* Processor is usable if set */
+    u32 reserved2       : 31;   /* Reserved, must be zero */
+#else
+    u32 flags;
+#endif
+} PACKED;
+
+struct madt_io_apic
+{
+    ACPI_SUB_HEADER_DEF
+    u8  io_apic_id;             /* I/O APIC ID */
+    u8  reserved;               /* Reserved - must be zero */
+    u32 address;                /* APIC physical address */
+    u32 interrupt;              /* Global system interrupt where INTI
+                                 * lines start */
+} PACKED;
+
+struct madt_intsrcovr {
+    ACPI_SUB_HEADER_DEF
+    u8  bus;
+    u8  source;
+    u32 gsi;
+    u16 flags;
+} PACKED;
+
+struct madt_local_nmi {
+    ACPI_SUB_HEADER_DEF
+    u8  processor_id;           /* ACPI processor id */
+    u16 flags;                  /* MPS INTI flags */
+    u8  lint;                   /* Local APIC LINT# */
+} PACKED;
+
+/*
+ * HPET Description Table
+ */
+#define HPET_SIGNATURE 0x54455048 // HPET
+struct acpi_20_hpet {
+    ACPI_TABLE_HEADER_DEF                    /* ACPI common table header */
+    u32           timer_block_id;
+    struct acpi_20_generic_address addr;
+    u8            hpet_number;
+    u16           min_tick;
+    u8            page_protect;
+} PACKED;
+
+/*
+ * SRAT (NUMA topology description) table
+ */
+
+#define SRAT_SIGNATURE 0x54415253 // SRAT
+struct system_resource_affinity_table
+{
+    ACPI_TABLE_HEADER_DEF
+    u32    reserved1;
+    u32    reserved2[2];
+} PACKED;
+
+#define SRAT_PROCESSOR          0
+#define SRAT_MEMORY             1
+
+struct srat_processor_affinity
+{
+    ACPI_SUB_HEADER_DEF
+    u8     proximity_lo;
+    u8     local_apic_id;
+    u32    flags;
+    u8     local_sapic_eid;
+    u8     proximity_hi[3];
+    u32    reserved;
+} PACKED;
+
+struct srat_memory_affinity
+{
+    ACPI_SUB_HEADER_DEF
+    u8     proximity[4];
+    u16    reserved1;
+    u32    base_addr_low,base_addr_high;
+    u32    length_low,length_high;
+    u32    reserved2;
+    u32    flags;
+    u32    reserved3[2];
+} PACKED;
+
 /* PCI fw r3.0 MCFG table. */
 /* Subtable */
 struct acpi_mcfg_allocation {
&lt;/pre&gt;</description>
    <dc:creator>Kevin O'Connor</dc:creator>
    <dc:date>2013-03-30T15:50:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6072">
    <title>[PATCH] Use container_of on romfile entries.</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6072</link>
    <description>&lt;pre&gt;Create cbfs and fw_cfg specific romfile_s wrappers instead of using
private variables directly in romfile_s.

Signed-off-by: Kevin O'Connor &amp;lt;kevin&amp;lt; at &amp;gt;koconnor.net&amp;gt;
---
 src/coreboot.c | 67 ++++++++++++++++++++++++++++++++++------------------------
 src/paravirt.c | 29 +++++++++++++++----------
 src/util.h     |  5 -----
 3 files changed, 57 insertions(+), 44 deletions(-)

diff --git a/src/coreboot.c b/src/coreboot.c
index c9ad2a8..120bc2e 100644
--- a/src/coreboot.c
+++ b/src/coreboot.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -286,6 +286,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct cbfs_file {
     char filename[0];
 } PACKED;
 
+struct cbfs_romfile_s {
+    struct romfile_s file;
+    struct cbfs_file *fhdr;
+    void *data;
+    u32 rawsize, flags;
+};
+
 // Copy a file to memory (uncompressing if necessary)
 static int
 cbfs_copyfile(struct romfile_s *file, void *dst, u32 maxlen)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -293,9 +300,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; cbfs_copyfile(struct romfile_s *file, void *dst, u32 maxlen)
     if (!CONFIG_COREBOOT_FLASH)
         return -1;
 
-    u32 size = file-&amp;gt;rawsize;
-    void *src = file-&amp;gt;data;
-    if (file-&amp;gt;flags) {
+    struct cbfs_romfile_s *cfile;
+    cfile = container_of(file, struct cbfs_romfile_s, file);
+    u32 size = cfile-&amp;gt;rawsize;
+    void *src = cfile-&amp;gt;data;
+    if (cfile-&amp;gt;flags) {
         // Compressed - copy to temp ram and uncompress it.
         void *temp = malloc_tmphigh(size);
         if (!temp) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -333,35 +342,36 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; coreboot_cbfs_init(void)
     }
     dprintf(1, "Found CBFS header at %p\n", hdr);
 
-    struct cbfs_file *cfile = (void *)(0 - be32_to_cpu(hdr-&amp;gt;romsize)
-                                       + be32_to_cpu(hdr-&amp;gt;offset));
+    struct cbfs_file *fhdr = (void *)(0 - be32_to_cpu(hdr-&amp;gt;romsize)
+                                      + be32_to_cpu(hdr-&amp;gt;offset));
     for (;;) {
-        if (cfile &amp;lt; (struct cbfs_file *)(0xFFFFFFFF - be32_to_cpu(hdr-&amp;gt;romsize)))
+        if (fhdr &amp;lt; (struct cbfs_file *)(0xFFFFFFFF - be32_to_cpu(hdr-&amp;gt;romsize)))
             break;
-        u64 magic = cfile-&amp;gt;magic;
+        u64 magic = fhdr-&amp;gt;magic;
         if (magic != CBFS_FILE_MAGIC)
             break;
-        struct romfile_s *file = malloc_tmp(sizeof(*file));
-        if (!file) {
+        struct cbfs_romfile_s *cfile = malloc_tmp(sizeof(*cfile));
+        if (!cfile) {
             warn_noalloc();
             break;
         }
-        memset(file, 0, sizeof(*file));
-        strtcpy(file-&amp;gt;name, cfile-&amp;gt;filename, sizeof(file-&amp;gt;name));
-        file-&amp;gt;size = file-&amp;gt;rawsize = be32_to_cpu(cfile-&amp;gt;len);
-        file-&amp;gt;id = (u32)cfile;
-        file-&amp;gt;copy = cbfs_copyfile;
-        file-&amp;gt;data = (void*)cfile + be32_to_cpu(cfile-&amp;gt;offset);
-        int len = strlen(file-&amp;gt;name);
-        if (len &amp;gt; 5 &amp;amp;&amp;amp; strcmp(&amp;amp;file-&amp;gt;name[len-5], ".lzma") == 0) {
+        memset(cfile, 0, sizeof(*cfile));
+        strtcpy(cfile-&amp;gt;file.name, fhdr-&amp;gt;filename, sizeof(cfile-&amp;gt;file.name));
+        cfile-&amp;gt;file.size = cfile-&amp;gt;rawsize = be32_to_cpu(fhdr-&amp;gt;len);
+        cfile-&amp;gt;fhdr = fhdr;
+        cfile-&amp;gt;file.copy = cbfs_copyfile;
+        cfile-&amp;gt;data = (void*)fhdr + be32_to_cpu(fhdr-&amp;gt;offset);
+        int len = strlen(cfile-&amp;gt;file.name);
+        if (len &amp;gt; 5 &amp;amp;&amp;amp; strcmp(&amp;amp;cfile-&amp;gt;file.name[len-5], ".lzma") == 0) {
             // Using compression.
-            file-&amp;gt;flags = 1;
-            file-&amp;gt;name[len-5] = '\0';
-            file-&amp;gt;size = *(u32*)(file-&amp;gt;data + LZMA_PROPERTIES_SIZE);
+            cfile-&amp;gt;flags = 1;
+            cfile-&amp;gt;file.name[len-5] = '\0';
+            cfile-&amp;gt;file.size = *(u32*)(cfile-&amp;gt;data + LZMA_PROPERTIES_SIZE);
         }
-        romfile_add(file);
+        romfile_add(&amp;amp;cfile-&amp;gt;file);
 
-        cfile = (void*)ALIGN((u32)file-&amp;gt;data + file-&amp;gt;size, be32_to_cpu(hdr-&amp;gt;align));
+        fhdr = (void*)ALIGN((u32)cfile-&amp;gt;data + cfile-&amp;gt;file.size
+                            , be32_to_cpu(hdr-&amp;gt;align));
     }
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -385,12 +395,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct cbfs_payload {
 };
 
 void
-cbfs_run_payload(struct cbfs_file *file)
+cbfs_run_payload(struct cbfs_file *fhdr)
 {
-    if (!CONFIG_COREBOOT_FLASH || !file)
+    if (!CONFIG_COREBOOT_FLASH || !fhdr)
         return;
-    dprintf(1, "Run %s\n", file-&amp;gt;filename);
-    struct cbfs_payload *pay = (void*)file + be32_to_cpu(file-&amp;gt;offset);
+    dprintf(1, "Run %s\n", fhdr-&amp;gt;filename);
+    struct cbfs_payload *pay = (void*)fhdr + be32_to_cpu(fhdr-&amp;gt;offset);
     struct cbfs_payload_segment *seg = pay-&amp;gt;segments;
     for (;;) {
         void *src = (void*)pay + be32_to_cpu(seg-&amp;gt;offset);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -445,9 +455,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; cbfs_payload_setup(void)
         file = romfile_findprefix("img/", file);
         if (!file)
             break;
+        struct cbfs_romfile_s *cfile;
+        cfile = container_of(file, struct cbfs_romfile_s, file);
         const char *filename = file-&amp;gt;name;
         char *desc = znprintf(MAXDESCSIZE, "Payload [%s]", &amp;amp;filename[4]);
-        boot_add_cbfs((void*)file-&amp;gt;id, desc
-                      , bootprio_find_named_rom(filename, 0));
+        boot_add_cbfs(cfile-&amp;gt;fhdr, desc, bootprio_find_named_rom(filename, 0));
     }
 }
diff --git a/src/paravirt.c b/src/paravirt.c
index ee6a86e..e5027d0 100644
--- a/src/paravirt.c
+++ b/src/paravirt.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -166,13 +166,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; qemu_cfg_read_entry(void *buf, int e, int len)
     qemu_cfg_read(buf, len);
 }
 
+struct qemu_romfile_s {
+    struct romfile_s file;
+    int select, skip;
+};
+
 static int
 qemu_cfg_read_file(struct romfile_s *file, void *dst, u32 maxlen)
 {
     if (file-&amp;gt;size &amp;gt; maxlen)
         return -1;
-    qemu_cfg_select(file-&amp;gt;id);
-    qemu_cfg_skip(file-&amp;gt;rawsize);
+    struct qemu_romfile_s *qfile;
+    qfile = container_of(file, struct qemu_romfile_s, file);
+    qemu_cfg_select(qfile-&amp;gt;select);
+    qemu_cfg_skip(qfile-&amp;gt;skip);
     qemu_cfg_read(dst, file-&amp;gt;size);
     return file-&amp;gt;size;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -180,18 +187,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; qemu_cfg_read_file(struct romfile_s *file, void *dst, u32 maxlen)
 static void
 qemu_romfile_add(char *name, int select, int skip, int size)
 {
-    struct romfile_s *file = malloc_tmp(sizeof(*file));
-    if (!file) {
+    struct qemu_romfile_s *qfile = malloc_tmp(sizeof(*qfile));
+    if (!qfile) {
         warn_noalloc();
         return;
     }
-    memset(file, 0, sizeof(*file));
-    strtcpy(file-&amp;gt;name, name, sizeof(file-&amp;gt;name));
-    file-&amp;gt;id = select;
-    file-&amp;gt;rawsize = skip; // Use rawsize to indicate skip length.
-    file-&amp;gt;size = size;
-    file-&amp;gt;copy = qemu_cfg_read_file;
-    romfile_add(file);
+    memset(qfile, 0, sizeof(*qfile));
+    strtcpy(qfile-&amp;gt;file.name, name, sizeof(qfile-&amp;gt;file.name));
+    qfile-&amp;gt;file.size = size;
+    qfile-&amp;gt;select = select;
+    qfile-&amp;gt;skip = skip;
+    qfile-&amp;gt;file.copy = qemu_cfg_read_file;
+    romfile_add(&amp;amp;qfile-&amp;gt;file);
 }
 
 struct e820_reservation {
diff --git a/src/util.h b/src/util.h
index 99aff78..996c29a 100644
--- a/src/util.h
+++ b/src/util.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -436,11 +436,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct romfile_s {
     char name[128];
     u32 size;
     int (*copy)(struct romfile_s *file, void *dest, u32 maxlen);
-
-    u32 id;
-    u32 rawsize;
-    u32 flags;
-    void *data;
 };
 void romfile_add(struct romfile_s *file);
 struct romfile_s *romfile_findprefix(const char *prefix, struct romfile_s *prev);
&lt;/pre&gt;</description>
    <dc:creator>Kevin O'Connor</dc:creator>
    <dc:date>2013-03-30T15:46:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6051">
    <title>[Fwd: Re: [PATCH V3 WIP 3/3] disable vhost_verify_ring_mappings check]</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6051</link>
    <description>&lt;pre&gt;Forwarding to Kevin + seabios for their comments..

Thanks,

--nab
_______________________________________________
SeaBIOS mailing list
SeaBIOS&amp;lt; at &amp;gt;seabios.org
http://www.seabios.org/mailman/listinfo/seabios
&lt;/pre&gt;</description>
    <dc:creator>Nicholas A. Bellinger</dc:creator>
    <dc:date>2013-03-28T06:56:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6023">
    <title>[PATCH] Cleanup QEMU_CFG_NUMA fw_cfg processing - split into two romfile entries.</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/6023</link>
    <description>&lt;pre&gt;The QEMU_CFG_NUMA fw_cfg entry is actually two separate tables in one
fw_cfg entry - a table for cpu affinity and a table for the memory
map.  Create two romfile entries to make that more clear.

Signed-off-by: Kevin O'Connor &amp;lt;kevin&amp;lt; at &amp;gt;koconnor.net&amp;gt;
---
 src/acpi.c     | 25 ++++++++++++++-----------
 src/paravirt.c |  7 +++++--
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/src/acpi.c b/src/acpi.c
index bc4d8ea..55c7259 100644
--- a/src/acpi.c
+++ b/src/acpi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -646,14 +646,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; acpi_build_srat_memory(struct srat_memory_affinity *numamem,
 static void *
 build_srat(void)
 {
-    int filesize;
-    u64 *numadata = romfile_loadfile("etc/numa-nodes", &amp;amp;filesize);
-    if (!numadata)
-        return NULL;
-    int max_cpu = romfile_loadint("etc/max-cpus", 0);
-    int nb_numa_nodes = (filesize / sizeof(u64)) - max_cpu;
-    if (!nb_numa_nodes)
-        return NULL;
+    int numadatasize, numacpusize;
+    u64 *numadata = romfile_loadfile("etc/numa-nodes", &amp;amp;numadatasize);
+    u64 *numacpumap = romfile_loadfile("etc/numa-cpu-map", &amp;amp;numacpusize);
+    if (!numadata || !numacpumap)
+        goto fail;
+    int max_cpu = numacpusize / sizeof(u64);
+    int nb_numa_nodes = numadatasize / sizeof(u64);
 
     struct system_resource_affinity_table *srat;
     int srat_size = sizeof(*srat) +
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -663,8 +662,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_srat(void)
     srat = malloc_high(srat_size);
     if (!srat) {
         warn_noalloc();
-        free(numadata);
-        return NULL;
+        goto fail;
     }
 
     memset(srat, 0, srat_size);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -677,7 +675,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_srat(void)
         core-&amp;gt;type = SRAT_PROCESSOR;
         core-&amp;gt;length = sizeof(*core);
         core-&amp;gt;local_apic_id = i;
-        curnode = *numadata++;
+        curnode = *numacpumap++;
         core-&amp;gt;proximity_lo = curnode;
         memset(core-&amp;gt;proximity_hi, 0, 3);
         core-&amp;gt;local_sapic_eid = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -731,7 +729,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; build_srat(void)
     build_header((void*)srat, SRAT_SIGNATURE, srat_size, 1);
 
     free(numadata);
+    free(numacpumap);
     return srat;
+fail:
+    free(numadata);
+    free(numacpumap);
+    return NULL;
 }
 
 static void *
diff --git a/src/paravirt.c b/src/paravirt.c
index 4a26c6e..ee6a86e 100644
--- a/src/paravirt.c
+++ b/src/paravirt.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -223,8 +223,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; qemu_cfg_legacy(void)
     // NUMA data
     u64 numacount;
     qemu_cfg_read_entry(&amp;amp;numacount, QEMU_CFG_NUMA, sizeof(numacount));
-    numacount += romfile_loadint("etc/max-cpus", 0);
-    qemu_romfile_add("etc/numa-nodes", QEMU_CFG_NUMA, sizeof(numacount)
+    int max_cpu = romfile_loadint("etc/max-cpus", 0);
+    qemu_romfile_add("etc/numa-cpu-map", QEMU_CFG_NUMA, sizeof(numacount)
+                     , max_cpu*sizeof(u64));
+    qemu_romfile_add("etc/numa-nodes", QEMU_CFG_NUMA
+                     , sizeof(numacount) + max_cpu*sizeof(u64)
                      , numacount*sizeof(u64));
 
     // e820 data
&lt;/pre&gt;</description>
    <dc:creator>Kevin O'Connor</dc:creator>
    <dc:date>2013-03-23T15:47:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/5989">
    <title>[PATCH] README: document which config options to use</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/5989</link>
    <description>&lt;pre&gt;In the interim of moving ACPI tables out of
seabios, developers should get the config from
QEMU tree to keep things in sync.

Signed-off-by: Michael S. Tsirkin &amp;lt;mst&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 README | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/README b/README
index a87a0ad..c6a2ee4 100644
--- a/README
+++ b/README
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,9 +1,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 This code implements an X86 legacy bios.  It is intended to be
 compiled using standard gnu tools (eg, gas and gcc).
 
-To build, one should be able to run "make" in the main directory.  The
-resulting file "out/bios.bin" contains the processed bios image.
+To build, one should be able to run "make" in the main directory.
 
+QEMU might only need a part of the BIOS binary, and different QEMU versions
+might need different seabios configurations to work well.  To build
+a bios for qemu, one needs to copy the config file from qemu source tree:
+
+cp $QEMU_DIR/roms/config.seabios $SEABIOS_DIR/.config
+
+(where $QEMU_DIR is the qemu source directory, $SEABIOS_DIR points to the
+seabios build directory); and then run make in the seabios main directory with
+this configuration:
+
+make olddefconfig
+
+The resulting file "out/bios.bin" contains the processed bios image.
 
 Testing of images:
 
&lt;/pre&gt;</description>
    <dc:creator>Michael S. Tsirkin</dc:creator>
    <dc:date>2013-03-21T12:30:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/5986">
    <title>[PATCH] README: document which config options to use</title>
    <link>http://comments.gmane.org/gmane.comp.bios.coreboot.seabios/5986</link>
    <description>&lt;pre&gt;In the interim of moving ACPI tables out of
seabios, developers should get the config from
QEMU tree to keep things in sync.

Signed-off-by: Michael S. Tsirkin &amp;lt;mst&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 README | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/README b/README
index a87a0ad..380fc80 100644
--- a/README
+++ b/README
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4,6 +4,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; compiled using standard gnu tools (eg, gas and gcc).
 To build, one should be able to run "make" in the main directory.  The
 resulting file "out/bios.bin" contains the processed bios image.
 
+QEMU might only need a part of the BIOS binary, and different QEMU versions
+might need different seabios configurations to work well.  To build
+a bios for qemu, one needs to copy the config file from qemu source tree:
+cp roms/config.seabios seabios/.config
+and then run make with this configuration:
+make -C seabios olddefconfig
 
 Testing of images:
 
&lt;/pre&gt;</description>
    <dc:creator>Michael S. Tsirkin</dc:creator>
    <dc:date>2013-03-21T12:03:02</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.bios.coreboot.seabios">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.bios.coreboot.seabios</link>
  </textinput>
</rdf:RDF>
