linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marijn Suijten <marijn.suijten@somainline.org>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Shawn Guo <shawnguo@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-arm-msm@vger.kernel.org,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@somainline.org>,
	Martin Botka <martin.botka@somainline.org>,
	Pavel Dubrova <pashadubrova@gmail.com>,
	Siddharth Gupta <sidgup@codeaurora.org>
Subject: Re: [PATCH] soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment
Date: Sat, 28 Aug 2021 10:58:28 +0200	[thread overview]
Message-ID: <1c418a4d-f433-a02f-9a25-61308dd69722@somainline.org> (raw)
In-Reply-To: <20210828060349.GB4274@dragon>

Hi Shawn,

On 8/28/21 8:03 AM, Shawn Guo wrote:
> [..]
> 
> Or you think these are all misusing of PT_LOAD?  Sorry, I hardly believe
> your understanding on PT_LOAD matches the reality.  Instead, I'm inclined
> to agree with Bjorn's comment.


Agreed, PT_LOAD does not imply _external_ loading at all, merely whether 
it has to be copied to the final memory region.  That's my 
misunderstanding, even after quoting the documentation.

This external loading is merely a qcom implementation detail AFAIK, and 
solely detected by the source boundaries (p_offset - p_offset+p_filesz) 
residing outside the .mdt file.

> Quote:
> 
> "I would expect that PT_LOAD denotes that the segment should be loaded
> into the final firmware region and that the hash segment would be
> PT_NULL regardless of being part of the .mdt, single .mbn or a separate
> .bNN segment."
> 
> The only part that doesn't hold is "the hash segment would be PT_NULL".
> But the point is that PT_LOAD doesn't mean the segment should be loaded
> externally (from .bNN file).


Yes, this is strange.  Why would the .mdt request the hash segment to be 
loaded to firmware memory when it's filtered out anyway?  Are we 
supposed to filter it out?

> [..]
> 
> I will send v2. However there will be no code change but just commit log
> update based on all these discussion.  Thanks!


Sounds good - glad we could have this discussion to get to the bottom of 
this and conclude that removing this check is the right approach without 
any side-effects, including a detailed justification in the commit-message.

- Marijn

  reply	other threads:[~2021-08-28  8:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24  9:41 [PATCH] soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment Shawn Guo
2021-08-24 15:18 ` Marijn Suijten
2021-08-24 15:34   ` Marijn Suijten
2021-08-26 14:18   ` Shawn Guo
2021-08-26 20:52     ` Marijn Suijten
2021-08-27  6:24       ` Shawn Guo
2021-08-27  8:29         ` Marijn Suijten
2021-08-27  9:57           ` Shawn Guo
2021-08-27 10:46             ` Marijn Suijten
2021-08-27 14:12               ` Shawn Guo
2021-08-27 15:13                 ` Marijn Suijten
2021-08-28  6:03                   ` Shawn Guo
2021-08-28  8:58                     ` Marijn Suijten [this message]
2021-08-27 16:07             ` Bjorn Andersson
2021-08-27 17:40               ` Marijn Suijten
2021-08-27 21:25                 ` Bjorn Andersson
2021-08-27 23:42                   ` Marijn Suijten

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=1c418a4d-f433-a02f-9a25-61308dd69722@somainline.org \
    --to=marijn.suijten@somainline.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=martin.botka@somainline.org \
    --cc=pashadubrova@gmail.com \
    --cc=shawn.guo@linaro.org \
    --cc=shawnguo@kernel.org \
    --cc=sidgup@codeaurora.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).