From: Maniaxx <tripleshiftone@gmail.com>
To: linux-acpi@vger.kernel.org
Cc: linux-efi@vger.kernel.org
Subject: Re: PROBLEM: Kernel panic on EFI BGRT early init code (kernel 4.11/4.12rc2) [regression]
Date: Sat, 3 Jun 2017 20:24:02 +0200 [thread overview]
Message-ID: <c1505b0e-8136-86d3-e6ab-019c17106e5b@gmail.com> (raw)
In-Reply-To: <20170602025155.GA3637@dhcp-128-65.nay.redhat.com>
Isn't the image address invalid if bgrt_tab->status is 0
(regarding ACPI specs below)?
The image address could be total garbage and probably the
reason why memremap (in efi-bgrt.c) leads to different
behavior on early_init.
If so, you might need to add another condition to check
status and bail out before memremap.
**************************************************************************************
Source: http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf
5.2.22 Boot Graphics Resource Table (BGRT)
[...]
If the boot path is interrupted (e.g. by a key press),
the valid bit within the status field should be changed to 0
to indicate to the OS that the current image is invalidated.
5.2.22.2 Status
The status field contains information about the current
status of the table. The Valid bit is bit 0 of the lowest byte.
It should be set to 1 when the table is written,
and invalidated if there is reason to expect that the screen
state has been changed.
5.2.22.4 Image Address
The Image Address contains the location in memory where an in-memory
copy of the boot image can be found.
The image should be stored in EfiBootServicesData, allowing the system
to reclaim the memory when the image is no longer needed.
**************************************************************************************
Decompiled BGRT table:
$ sudo acpidump > acpi.dat
$ acpixtract -a acpi.dat
$ iasl -d bgrt.dat
$ cat bgrt.dsl
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20170303 (64-bit version)
* Copyright (c) 2000 - 2017 Intel Corporation
*
* Disassembly of bgrt.dat, Sat Jun 3 15:33:10 2017
*
* ACPI Data Table [BGRT]
*
* Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue
*/
[000h 0000 4] Signature : "BGRT" [Boot Graphics Resource Table]
[004h 0004 4] Table Length : 0000003C
[008h 0008 1] Revision : 00
[009h 0009 1] Checksum : 89
[00Ah 0010 6] Oem ID : "ALASKA"
[010h 0016 8] Oem Table ID : "A M I"
[018h 0024 4] Oem Revision : 01072009
[01Ch 0028 4] Asl Compiler ID : "AMI "
[020h 0032 4] Asl Compiler Revision : 00010013
[024h 0036 2] Version : 0001
[026h 0038 1] Status : 00
[027h 0039 1] Image Type : 00
[028h 0040 8] Image Address : 0A08E01800000001
[030h 0048 4] Image OffsetX : 00000000
[034h 0052 4] Image OffsetY : 00000000
Raw Table Data: Length 60 (0x3C)
0000: 42 47 52 54 3C 00 00 00 00 89 41 4C 41 53 4B 41 // BGRT<.....ALASKA
0010: 41 20 4D 20 49 00 00 00 09 20 07 01 41 4D 49 20 // A M I.... ..AMI
0020: 13 00 01 00 01 00 00 00 01 00 00 00 18 E0 08 0A // ................
0030: 00 00 00 00 00 00 00 00 00 00 00 00 // ............
next prev parent reply other threads:[~2017-06-03 18:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <86c36f9b-f633-3354-d676-7693f35dae0d@gmail.com>
[not found] ` <86c36f9b-f633-3354-d676-7693f35dae0d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-26 1:23 ` PROBLEM: Kernel panic on EFI BGRT early init code (kernel 4.11/4.12rc2) [regression] Dave Young
[not found] ` <a32eea98-9576-1ee7-c27a-b165204d825f@gmail.com>
[not found] ` <a32eea98-9576-1ee7-c27a-b165204d825f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-27 5:14 ` Dave Young
[not found] ` <20170527051427.GA3492-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2017-05-27 5:34 ` Dave Young
[not found] ` <20170527053457.GB3492-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2017-06-01 1:17 ` Maniaxx
2017-06-01 1:57 ` Dave Young
[not found] ` <20170601015621.GA4306-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2017-06-01 19:13 ` Maniaxx
2017-06-02 2:51 ` Dave Young
2017-06-03 18:24 ` Maniaxx [this message]
2017-06-04 0:11 ` Maniaxx
2017-06-04 2:45 ` Maniaxx
2017-06-07 8:57 ` Dave Young
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=c1505b0e-8136-86d3-e6ab-019c17106e5b@gmail.com \
--to=tripleshiftone@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
/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