From: Matt Porter <matt.porter@linaro.org>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: Karel Zak <kzak@redhat.com>,
Matt Fleming <matt.fleming@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: GPT detection regression in efi.c from commit 27a7c64
Date: Fri, 13 Sep 2013 10:50:35 -0400 [thread overview]
Message-ID: <20130913145033.GA8502@ohporter.com> (raw)
The commit, "27a7c64 partitions/efi: account for pmbr size in lba", that
was just merged in 3.12-rc caused a regression on my system with a GPT
formatted eMMC device. In 3.11, the GPT partition table was detected
fine but now a partition table is not detected.
Not being a GPT expert, I did some research and found that the tool used
to create the PMBR on my system shares characteristics with what is
mentioned in an explanation of Microsoft created PMBRs [1]. In short,
the size_in_lba field incorrectly has 0xffffffff even though I have a
<2TiB drive (16GiB eMMC).
I get that this is not compliant with UEFI. I bring this up because
before this commit the is_pmbr_valid() check was less pedantic. In 3.11
a PMBR formatted this way did not fail the check. For my particular
case, I simply dded out LBA 1 and whacked the SizeInLBA field to comply
with the spec and this patch and I'm back in business. We're updating
the tools that we inherited to prepopulate our boards with a GPT to be
compliant. However, I wondered if this would be a problem for all the
people with Windows-generated GPTs as noted in [1].
-Matt
[1] http://thestarman.pcministry.com/asm/mbr/GPT.htm#GPTPT
"The partition table contains only a single "GPT Protective" entry which
in all cases is set to the maximum 32-bit limitation (even though a
drive may have far less than a 2.2 TB capacity). The "GPT Protective MBR
Sector" has exactly the same contents for all GPT disk drives created by
the Windows 7 (or 8) OS. But, note: This does not follow the UEFI
Specification, which states that the "SizeInLBA" should be "set to the
size of the disk minus one" if it's not too large to be represented.[1]
(GPT drives partitioned under various Linux and Apple® Mac OS systems do
follow the UEFI Specification in this regard.)"
next reply other threads:[~2013-09-13 14:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 14:50 Matt Porter [this message]
2013-09-13 16:28 ` GPT detection regression in efi.c from commit 27a7c64 Davidlohr Bueso
2013-09-13 17:01 ` Matt Porter
2013-09-13 17:37 ` Davidlohr Bueso
2013-09-13 18:17 ` Matt Porter
2013-09-13 18:07 ` Davidlohr Bueso
2013-09-13 18:09 ` Matt Porter
2013-09-13 18:17 ` Karel Zak
2013-09-13 18:29 ` Davidlohr Bueso
2013-09-13 18:33 ` Matt Porter
2013-09-13 19:26 ` Davidlohr Bueso
2013-09-13 21:36 ` Matt Porter
2013-09-13 22:02 ` Davidlohr Bueso
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=20130913145033.GA8502@ohporter.com \
--to=matt.porter@linaro.org \
--cc=davidlohr@hp.com \
--cc=kzak@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
/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