Re: mmc: subtract boot sectors from disk size for eMMC 4.3+ devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 19, 2011 at 4:06 PM, Colin Cross <ccross@xxxxxxxxxxx> wrote:
> On Wed, Jan 19, 2011 at 2:04 PM, drambo <mrdarwinrambo@xxxxxxxxx> wrote:
>> Hello,
>>
>> http://android.git.kernel.org/?p=kernel/common.git;a=commit;h=f0b0e4bec1e89014f3dcef4da8bcf95428cc771c
>>
>> This patch doesn't appear to apply for our 8 GByte Micron 4.4 device
>> MTFC8GKQDI part and probably other Micron parts as well.
>>
>> I have contacted Micron about the 0xe90000 sector count we read, and
>> they state that:
>>
>> "Actually, the boot partition size is in multiples of 128KB, so each
>> boot partition is 2MB.
>> There are two of them, so the total is 4MB.
>> This is not counted as user area, the 0xe90000 is in addition to the
>> boot and RPMB partitions.  The only time the user area would be
>> reduced from the SEC_COUNT value would be if you create general
>> purpose partitions, or enhanced memory areas."
>>
>> Furthermore, when we access the device, the full 0xe90000 sectors are
>> accessible and valid in our testing, which confirms the Micron
>> statement.
>>
>> This patch is not in the 2.6.36+ kernel.org mmc.c code either, which
>> also make it suspect.
>>
>> Could someone please clarify the reasons for this patch? Thanks.
>>
>> Regards,
>> Darwin
>>
>
> This patch was originally necessary because the kernel could not find
> a gpt partition table located at the end of the eMMC device.  Looking
> at the eMMC spec, I believe you are correct, the sector count read
> from the eMMC ext_csd should not include the boot partition size.  I
> don't know if the eMMC part we were using incorrectly gave the size,
> or the code in the bootloader that determined where to put the gpt
> incorrectly calculated the end, and the kernel was changed to be
> bug-compatible.
>
> I am hesitant to revert the change, because the Tegra bootloader
> likely does the same calculation, and reverting the patch would break
> any board that expects the old behavior.
>

I reverted this change in the linux-tegra-2.6.36 and android-2.6.36
repositories.  For anyone who has a bug-compatible bootloader, and
relies on the bootloader and kernel agreeing on the size of the eMMC
(for example, to find a GPT at the end of the device), this revert
will break your kernel.  You can either put it back locally in your
tree, or, if you are using GPT, use
https://android.git.kernel.org/?p=kernel/tegra.git;a=commit;h=fd4194e5c3ab51f0eacdc115eeead02dbf8f4d88
to allow the bootloader to pass the actual location of the GPT to the
kernel.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux