From: Igor Mammedov <imammedo@redhat.com>
To: Phil Dennis-Jordan <phil@philjordan.eu>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt
Date: Mon, 23 Jan 2017 12:12:04 +0100 [thread overview]
Message-ID: <20170123121204.547e6415@nial.brq.redhat.com> (raw)
In-Reply-To: <CAAibmn3GJWWun69KCHp+0qCBo=fjg1_xg+R_o+Qyro48a7Y_zQ@mail.gmail.com>
On Thu, 19 Jan 2017 19:09:47 +0100
Phil Dennis-Jordan <phil@philjordan.eu> wrote:
> On 18 January 2017 at 17:30, Michael S. Tsirkin <mst@redhat.com> wrote:
> > I think what's important is the Fadt format revision. That one was 1 for 1.0b and 3 for 2.0.
> >
> > See page 112, Table 5-5 Fixed ACPI Description Table Format in acpi spec
> > 1.0b.
> >
> > Now look at page 110 in spec 2.0, this time
> > "Table 5-8 Fixed ACPI Description Table (FADT) Format".
> >
> > You will see that FADT revision is now 3, and there are a bunch of new
> > fields after the reset register. I think you have to fill them in,
> > you probably can get away with copying the non-extended values.
>
>
> I've just spent a few hours fiddling around with this, and the results
> aren't good. WinXP and 7 seem absolutely fine with a rev3 (or rev5)
> FADT, presumably because they ignore it. macOS 10.12 hangs on boot
> with a fully filled out r3/5 FADT. If I skip filling out the
> Xdsdt/Xfacs addresses and just leave them at 0 it boots OK. Windows 10
> hangs or bluescreens ("ACPI BIOS ERROR") in either case. (I tested
> UEFI boot with OVMF, did not try legacy BIOS.)
>
> Just in case I'd messed up the code, I also tried this FADT patch
> https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg02216.html
> from some months ago which evidently never got accepted. It yielded
> the same result as my independently developed implementation.
patch looks a bit wrong in filling x_fields, pls see spec first
before setting them.
>
> I don't really know enough about ACPI to have an intuition for what to
> try next. Unfortunately, macOS's ACPI table parser does not appear to
> be in any of the open source bits of the xnu kernel, otherwise I'd be
> looking there for hints.
>
> For reference, my approach to filling out the Xdsdt/Xfacs fields in
> build_fadt() is essentially the same as for the 32-bit variants from
> rev1:
>
> unsigned xfacs_offset = (char *)&fadt->Xfacs - table_data->data;
> bios_linker_loader_add_pointer(linker,
> ACPI_BUILD_TABLE_FILE, xfacs_offset, sizeof(fadt->Xfacs),
> ACPI_BUILD_TABLE_FILE, facs_tbl_offset);
>
> Suggestions welcome.
You are not supposed to fill in the same values in X_FOO as in FOO.
Spec says that only either one of above should be set.
X_FOO is typically is used for addresses above 4G and seabios
always allocates tables below 4G so you don't need to set
X_FOO variants unless you have to for some reason.
Read FADT fields description that you are modifying/adding
in respective ACPI spec http://www.uefi.org/acpi/specs
>
> Thanks,
> Phil
next prev parent reply other threads:[~2017-01-23 11:12 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 11:45 [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt Phil Dennis-Jordan
2017-01-18 16:30 ` Michael S. Tsirkin
2017-01-18 17:19 ` Igor Mammedov
2017-01-31 14:31 ` Phil Dennis-Jordan
2017-01-31 14:58 ` Michael S. Tsirkin
2017-01-31 15:41 ` Igor Mammedov
2017-01-31 16:04 ` Phil Dennis-Jordan
2017-01-31 16:17 ` Igor Mammedov
2017-02-02 16:12 ` Michael S. Tsirkin
2017-01-31 16:28 ` Laszlo Ersek
2017-01-31 18:17 ` Michael S. Tsirkin
2017-01-31 19:08 ` Laszlo Ersek
2017-02-06 16:44 ` Phil Dennis-Jordan
2017-02-07 0:09 ` Laszlo Ersek
2017-02-01 11:37 ` Igor Mammedov
2017-02-01 12:52 ` Laszlo Ersek
2017-02-01 13:03 ` Laszlo Ersek
2017-02-01 15:16 ` Igor Mammedov
2017-02-01 16:03 ` Laszlo Ersek
2017-02-01 16:17 ` Michael S. Tsirkin
2017-02-01 16:27 ` Laszlo Ersek
2017-02-01 14:49 ` Michael S. Tsirkin
2017-02-06 16:30 ` Phil Dennis-Jordan
2017-02-07 19:54 ` Laszlo Ersek
2017-02-07 21:02 ` Phil Dennis-Jordan
2017-02-08 0:52 ` Laszlo Ersek
2017-01-19 18:09 ` Phil Dennis-Jordan
2017-01-23 11:12 ` Igor Mammedov [this message]
2017-01-26 13:43 ` Phil Dennis-Jordan
2017-01-27 13:57 ` Igor Mammedov
2017-01-27 16:05 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170123121204.547e6415@nial.brq.redhat.com \
--to=imammedo@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=phil@philjordan.eu \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).