Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3074462ybv; Mon, 24 Feb 2020 17:37:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxViRD0kLzsdWkxxwpRLBc+Oim4/CqEZQuU3B2d6ibeIsUYyBGuUczBq6VlUXWaXQn0Wwn+ X-Received: by 2002:a05:6830:194:: with SMTP id q20mr43874253ota.92.1582594628020; Mon, 24 Feb 2020 17:37:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582594628; cv=none; d=google.com; s=arc-20160816; b=wrYKRh2JN5+idEY+4MnvPIbeC7zED9Ok/EdKDcnLtNT4rlTZTGpnahy2hnrJAFlcnN IUWvo8jkRPq4a0wdguRJO+OIavxyuiuOpY5exwx4psTsr1i7HWMhmNkZ53Ao1MTYDuT6 yTDy75IkcwlF4enNKZfcjIu4X6RDRk0iJgvp87Z7W7gQBc0/f3RaydmVtxEf+qsyu9f0 gmpIT4emI880Zn13QlTwB9QXr9jCGVsG0Qj+tV9aHXycm+om31hIFDrH9Yqtf2tAc79r XTvf0/DoeXLRXvsWjjW3agqr234ePDtSDlJJXpTUr+elQVMs66RnNBFitmMtAiYwKBCC HvHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=7KfeF9bj6ln8qqzpe7IEHDvXUKwiiT/ipxNgBi4uFME=; b=WjBGlZ5g6JktKn1Z/8bBFZkdnBOm8YjUUHzs0BLMpEWSHRccvizgi2zA38mjGRJSUr o58NK4JQQFo8TW3WRmr2k+Clpb6oIwvqJBJRi0xuMZ3mxp9AHmQP5iyB2hda9VL367Ah atpznLOZGfkVkwb7XJLX21xby+JvWM5AGEIQzXztSk8ATcZi9YupOttdqsL0HM1kHcPr FVmO7UPi3YtBw48q6lWXJ8M2O1EiGGq4uSTycccPtVebBvH/84dybHpKaSKh6s1Uru8U BTVd3pT6coudWZqx2gwpHHrMuwtt7vfwig4Q/K0O1n/1tELmEipjviN2Xl4D4nobw1bC lIbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MXbsLVZn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c18si10047750ots.317.2020.02.24.17.36.55; Mon, 24 Feb 2020 17:37:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MXbsLVZn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728735AbgBYBf0 (ORCPT + 99 others); Mon, 24 Feb 2020 20:35:26 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45625 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728682AbgBYBf0 (ORCPT ); Mon, 24 Feb 2020 20:35:26 -0500 Received: by mail-lf1-f66.google.com with SMTP id z5so8303786lfd.12; Mon, 24 Feb 2020 17:35:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7KfeF9bj6ln8qqzpe7IEHDvXUKwiiT/ipxNgBi4uFME=; b=MXbsLVZnsRrOiUyO+RyrtvqNQ3W25wfO2SG+jAz2GDo9XK5OnoEhcftf8feCiPrP/o srGQYWWWGNYCr3om2YQsFdD/rsSHi+0A62kC+hkD9OMswCyO91Zwbx9y/juew9cNgOE3 rfSgxBlbT9XLepoOTw1IcnHpir7MQqP6TFzPtoJ6iOMDMJ1rhclVSwUxNNpJZyFt3b5x 815tKXst1OZnrsdAoD2iC/CIxTNOHV2BfXC2e9uvGXSgQOXIEmzB+lec7kHgADjMrr/U qgGNLw1ts63mJJzZWy5EaDWPYdilzhuAS4p78kCVfOR1+hBuJDnDOUy7aqdaUd5o+Jgr Y+jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7KfeF9bj6ln8qqzpe7IEHDvXUKwiiT/ipxNgBi4uFME=; b=dNhHZuqg/8Qh2+QLqTdpDNknu6lsFN1VrntQK/wYG1494oxKNsDl+m5fOWSGtm25TS OsRV599+/JUoo7luyIQY5FBFbJTgziQn+Hmr8EH9icypCJBe87hkAiD9TziroLwFeYZ7 nMKIHxLAthhpeKTxK61qaTPn5QF2BW3mb1v1ESjtNc6vRRnMG931CIFg8c4MUjBKQImj OrbmDrtf5riqy2iJFlyN4Y+d7qeWbA9D+kik/FhBFgzpm/U5Veqo9Hwf2YpLjPvYckDH GJSyVOdrb393gnNdtU5xtHuROaS+L46VoEQfwQRJl2nmHEh08HWZ/7loHWaXym+jlNxS xfMQ== X-Gm-Message-State: APjAAAUPpZvdtq/X884aFFZIMPHbMie+y+5pmmlJE/GpG4hG7YlJtQtM nW1PLhi9nUlYI2shjL7OeK42NBq3 X-Received: by 2002:a19:48cf:: with SMTP id v198mr3243388lfa.68.1582594523870; Mon, 24 Feb 2020 17:35:23 -0800 (PST) Received: from [192.168.2.145] (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.googlemail.com with ESMTPSA id 14sm6888501ljj.32.2020.02.24.17.35.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Feb 2020 17:35:23 -0800 (PST) Subject: Re: [PATCH v1 3/3] partitions: Introduce NVIDIA Tegra Partition Table To: Stephen Warren Cc: Jens Axboe , Thierry Reding , Jonathan Hunter , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , David Heidelberg , Peter Geis , Nicolas Chauvet , Ulf Hansson , Adrian Hunter , Billy Laws , linux-tegra@vger.kernel.org, linux-block@vger.kernel.org, Andrey Danin , Gilles Grandou , Ryan Grachek , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200224231841.26550-1-digetx@gmail.com> <20200224231841.26550-4-digetx@gmail.com> <44c22925-a14e-96d0-1f93-1979c0c60525@wwwdotorg.org> From: Dmitry Osipenko Message-ID: <69a76bbe-e088-6715-fefe-354dd4bc3ef2@gmail.com> Date: Tue, 25 Feb 2020 04:35:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <44c22925-a14e-96d0-1f93-1979c0c60525@wwwdotorg.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 25.02.2020 03:20, Stephen Warren пишет: > 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(). Thank you very much, I didn't know about that. I checked whether Nexus 7 and A500 have a correct pointer in the BIT and they have it. I'll take it into account in v2, thank you again.