linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Ulf Hansson <ulf.hansson@linaro.org>,
	Dmitry Osipenko <digetx@gmail.com>, Jens Axboe <axboe@kernel.dk>
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
	"David Heidelberg" <david@ixit.cz>,
	"Peter Geis" <pgwipeout@gmail.com>,
	"Nicolas Chauvet" <kwizart@gmail.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Billy Laws" <blaws05@gmail.com>,
	linux-tegra <linux-tegra@vger.kernel.org>,
	linux-block <linux-block@vger.kernel.org>,
	"Andrey Danin" <danindrey@mail.ru>,
	"Gilles Grandou" <gilles@grandou.net>,
	"Ryan Grachek" <ryan@edited.us>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 3/3] partitions: Introduce NVIDIA Tegra Partition Table
Date: Fri, 6 Mar 2020 09:52:56 -0700	[thread overview]
Message-ID: <6fe6d262-c6b0-52d8-0150-4c32a4c36cbd@wwwdotorg.org> (raw)
In-Reply-To: <CAPDyKFric6pZbJ5-2qkwAFoeJ0c0kcha99zHJ12AUrWO6FQmgg@mail.gmail.com>

On 3/6/20 6:37 AM, Ulf Hansson wrote:
> On Wed, 4 Mar 2020 at 18:09, Dmitry Osipenko <digetx@gmail.com> wrote:
>>
>> 04.03.2020 19:36, Ulf Hansson пишет:
>>> On Tue, 25 Feb 2020 at 01:20, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>>
>>>> On 2/24/20 4:18 PM, Dmitry Osipenko wrote:
>>>>> All NVIDIA Tegra devices use a special partition table format for the
>>>>> internal storage partitioning. Most of Tegra devices have GPT partition
>>>>> in addition to TegraPT, but some older Android consumer-grade devices do
>>>>> not or GPT is placed in a wrong sector, and thus, the TegraPT is needed
>>>>> in order to support these devices properly in the upstream kernel. This
>>>>> patch adds support for NVIDIA Tegra Partition Table format that is used
>>>>> at least by all NVIDIA Tegra20 and Tegra30 devices.
>>>>
>>>>> diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c
>>>>
>>>>> +static void __init tegra_boot_config_table_init(void)
>>>>> +{
>>>>> +     void __iomem *bct_base;
>>>>> +     u16 pt_addr, pt_size;
>>>>> +
>>>>> +     bct_base = IO_ADDRESS(TEGRA_IRAM_BASE) + TEGRA_IRAM_BCT_OFFSET;
>>>>
>>>> This shouldn't be hard-coded. IIRC, the boot ROM writes a BIT (Boot
>>>> Information Table) to a fixed location in IRAM, and there's some value
>>>> in the BIT that points to where the BCT is in IRAM. In practice, it
>>>> might work out that the BCT is always at the same place in IRAM, but
>>>> this certainly isn't guaranteed. I think there's code in U-Boot which
>>>> extracts the BCT location from the BIT? Yes, see
>>>> arch/arm/mach-tegra/ap.c:get_odmdata().
>>>
>>> So, have you considered using the command line partition option,
>>> rather than adding yet another partition scheme to the kernel?
>>>
>>> In principle, you would let the boot loader scan for the partitions,
>>> likely from machine specific code in U-boot. Then you append these to
>>> the kernel command line and let block/partitions/cmdline.c scan for
>>> it.
>>
>> The bootloader is usually locked-down on a consumer Tegra machines (it's
>> signed / encrypted).
> 
> Right, you are you talking about this from a developer point of view,
> not from an end product user?
> 
> I mean, for sure you can upgrade the bootloader on Nvidia products? No, really?

For developer-oriented products like Jetson developer kits, you can 
upgrade the bootloader, and luckily they haven't used this partition 
table format for many versions.

However, commercial Android products typically have secure boot enabled, 
so you can't replace the bootloader unless you know the secure boot 
keys, which only the manufacturer knows. Dmitry is working on 
re-purposing such products.

  reply	other threads:[~2020-03-06 16:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 23:18 [PATCH v1 0/3] Introduce NVIDIA Tegra Partition Table Dmitry Osipenko
2020-02-24 23:18 ` [PATCH v1 1/3] mmc: core: Add raw_boot_mult field to mmc_ext_csd Dmitry Osipenko
2020-03-01 10:50   ` Avri Altman
2020-03-01 23:09     ` Dmitry Osipenko
2020-02-24 23:18 ` [PATCH v1 2/3] mmc: block: Add mmc_bdev_to_card() helper Dmitry Osipenko
2020-02-25 14:53   ` Ulf Hansson
2020-02-25 15:46     ` Dmitry Osipenko
2020-02-27  0:40   ` kbuild test robot
2020-02-24 23:18 ` [PATCH v1 3/3] partitions: Introduce NVIDIA Tegra Partition Table Dmitry Osipenko
2020-02-25  0:20   ` Stephen Warren
2020-02-25  1:35     ` Dmitry Osipenko
2020-03-04 16:36     ` Ulf Hansson
2020-03-04 17:09       ` Dmitry Osipenko
2020-03-06 13:37         ` Ulf Hansson
2020-03-06 16:52           ` Stephen Warren [this message]
2020-03-06 21:56             ` Dmitry Osipenko
2020-03-06 23:11           ` Dmitry Osipenko

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=6fe6d262-c6b0-52d8-0150-4c32a4c36cbd@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=adrian.hunter@intel.com \
    --cc=axboe@kernel.dk \
    --cc=blaws05@gmail.com \
    --cc=danindrey@mail.ru \
    --cc=david@ixit.cz \
    --cc=digetx@gmail.com \
    --cc=gilles@grandou.net \
    --cc=jonathanh@nvidia.com \
    --cc=kwizart@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=pgwipeout@gmail.com \
    --cc=ryan@edited.us \
    --cc=thierry.reding@gmail.com \
    --cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).