All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshul Dalal <anshuld@ti.com>
To: Tom Rini <trini@konsulko.com>
Cc: <u-boot@lists.denx.de>, <vigneshr@ti.com>, <afd@ti.com>,
	<m-chawdhry@ti.com>, <n-francis@ti.com>, <b-liu@ti.com>,
	<nm@ti.com>, <bb@ti.com>
Subject: Re: [PATCH v7 01/10] spl: Kconfig: allow K3 devices to use falcon mode
Date: Thu, 12 Jun 2025 21:01:27 +0530	[thread overview]
Message-ID: <DAKNVHXLKDZP.3261Z1O2BP6D0@ti.com> (raw)
In-Reply-To: <20250612150528.GN1382132@bill-the-cat>

On Thu Jun 12, 2025 at 8:35 PM IST, Tom Rini wrote:
> On Thu, Jun 12, 2025 at 10:05:38AM +0530, Anshul Dalal wrote:
>> On Tue Jun 10, 2025 at 8:14 PM IST, Tom Rini wrote:
>> > On Tue, Jun 10, 2025 at 02:01:59PM +0530, Anshul Dalal wrote:
>> >> On Mon Jun 9, 2025 at 8:29 PM IST, Tom Rini wrote:
>> >> > On Mon, Jun 09, 2025 at 05:38:37PM +0530, Anshul Dalal wrote:
>> >> >> On Sat Jun 7, 2025 at 12:36 AM IST, Tom Rini wrote:
>> >> >> > On Tue, Jun 03, 2025 at 07:54:41PM +0530, Anshul Dalal wrote:
>> >> >> >
>> >> >> >> Falcon mode was disabled for TI_SECURE_DEVICE at commit e95b9b4437bc
>> >> >> >> ("ti_armv7_common: Disable Falcon Mode on HS devices") for older 32-bit
>> >> >> >> HS devices and can be enabled on K3 devices.
>> >> >> >> 
>> >> >> >> For secure boot, the kernel with x509 headers can be packaged in a fit
>> >> >> >> container (fitImage) signed with TIFS keys for authentication.
>> >> >> >> 
>> >> >> >> Signed-off-by: Anshul Dalal <anshuld@ti.com>
>> >> >> >> ---
>> >> >> >>  common/spl/Kconfig | 2 +-
>> >> >> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >> >> >> 
>> >> >> >> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
>> >> >> >> index 77cf04d38ed..bc5a334a1c5 100644
>> >> >> >> --- a/common/spl/Kconfig
>> >> >> >> +++ b/common/spl/Kconfig
>> >> >> >> @@ -1190,7 +1190,7 @@ config SPL_ONENAND_SUPPORT
>> >> >> >>  
>> >> >> >>  config SPL_OS_BOOT
>> >> >> >>  	bool "Activate Falcon Mode"
>> >> >> >> -	depends on !TI_SECURE_DEVICE
>> >> >> >> +	depends on !TI_SECURE_DEVICE || ARCH_K3
>> >> >> >>  	help
>> >> >> >>  	  Enable booting directly to an OS from SPL.
>> >> >> >>  	  for more info read doc/README.falcon
>> >> >> >
>> >> >> > I wonder if overloading ARCH_K3 like this isn't a great idea. Or perhaps
>> >> >> > TI_SECURE_DEVICE is too generic a name. I kind of want to introduce
>> >> >> > something that means TI Secure Boot is supported but also Falcon is
>> >> >> > supported, and then use that as how we disable in Kconfig various
>> >> >> > insecure options. And I assume that it's a matter of effort not
>> >> >> > technical restrictions for supporting falcon mode on older HS parts?
>> >> >> 
>> >> >> I second your opinion here, the falcon boot flow we do have in K3
>> >> >> devices is quite different from existing platforms but still enabled by
>> >> >> the same SPL_OS_BOOT config. Perhaps adding a config like K3_FALCON
>> >> >> makes sense here.
>> >> >> 
>> >> >> And yes, older HS *K3* parts should be able to support a similar falcon
>> >> >> style boot flow with not much changes to the k3_falcon_prep function.
>> >> >
>> >> > Maybe we need a common symbol for things that are common to all TI
>> >> > secure devices, and other symbols for K3 or AM33xx (or whatever is most
>> >> > appropriate for that overall era of parts).
>> >> 
>> >> I was thinking of adding TI_SECURE_DEVICE_(LEGACY|K3) hidden config
>> >> symbols which TI_SECURE_DEVICE selects as below:
>> >> 
>> >> config TI_SECURE_DEVICE
>> >> 	bool "HS Device Type Support"
>> >> 	depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_K3
>> >> 	select TI_SECURE_DEVICE_LEGACY if ARCH_KEYSTONE || ARCH_OMAP2PLUS
>> >> 	select TI_SECURE_DEVICE_K3 if ARCH_K3
>> >> 
>> >> We can then use TI_SECURE_DEVICE_LEGACY to disable OS_BOOT for older non
>> >> K3 platforms instead.
>> >  
>> > The current tech today is the legacy tech tomorrow, so I think a better
>> > symbol name is needed for ARCH_KEYSTONE || ARCH_OMAP2PLUS, especially
>> > since the next question is how much do they in fact share in terms of
>> 
>> Agreed, I will update the names to be more descriptive of specific device.
>> 
>> > tooling and features. But I was also thinking that TI_SECURE_DEVICE
>> > should be a hidden symbol too, and used for the common-if-any parts, and
>> > so SPL_OS_BOOT would depend on !TI_SECURE_DEVICE_K2_OMAP2PLUS or
>> > whatever.
>> 
>> I don't think we should make TI_SECURE_DEVICE hidden since iot2050 is a
>> defconfig that disables TI_SECURE_DEVICE while being ARCH_K3, it's also
>> useful to expose it as a config to users in cases of GP devices for
>> example.
>> 
>> If we are in agreement here, I can post v8 with the suggested changes ;)
>
> Well, with TI_SECURE_DEVICE hidden but TI_SECURE_DEVICE_K3 not, iot2050
> can be migrated easily. That should also cover the legacy-within-K3 GP
> parts too, yes?

Yes, that would work but why expose two symbols (TI_SECURE_DEVICE_K3 and
non K3) which essentially mean the same thing "disable insecure features
on this TI device" whatever the device be. We can handle the distinction
between K3 and non K3 device without exposing it to the defconfigs by
keeping the two device specific options hidden. The end user just unsets
the TI_SECURE_DEIVCE if they need to regardless of the underlying
platform.

  reply	other threads:[~2025-06-12 15:32 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03 14:24 [PATCH v7 00/10] Add falcon support for am62a, 62p and 62x Anshul Dalal
2025-06-03 14:24 ` [PATCH v7 01/10] spl: Kconfig: allow K3 devices to use falcon mode Anshul Dalal
2025-06-06 19:06   ` Tom Rini
2025-06-09 12:08     ` Anshul Dalal
2025-06-09 14:59       ` Tom Rini
2025-06-10  8:31         ` Anshul Dalal
2025-06-10 14:44           ` Tom Rini
2025-06-12  4:35             ` Anshul Dalal
2025-06-12 15:05               ` Tom Rini
2025-06-12 15:31                 ` Anshul Dalal [this message]
2025-06-12 17:47                   ` Tom Rini
2025-06-03 14:24 ` [PATCH v7 02/10] spl: make CMD_BOOTZ exclusive with TI_SECURE_DEVICE Anshul Dalal
2025-06-06 19:00   ` Tom Rini
2025-06-03 14:24 ` [PATCH v7 03/10] mach-k3: fix reading size and addr from fdt on R5 Anshul Dalal
2025-06-03 14:24 ` [PATCH v7 04/10] arch: arm: k3-binman: add fit for falcon boot Anshul Dalal
2025-06-06 11:57   ` Bryan Brattlof
2025-06-09  7:28     ` Anshul Dalal
2025-06-09 15:23       ` Andrew Davis
2025-06-10 12:48         ` Anshul Dalal
2025-06-03 14:24 ` [PATCH v7 05/10] mach-k3: sysfw-loader: update img_hdr for falcon Anshul Dalal
2025-06-03 14:24 ` [PATCH v7 06/10] config: add falcon boot config fragment for am62x Anshul Dalal
2025-06-03 14:24 ` [PATCH v7 07/10] board: ti: add default dtb for am62 in falcon mode Anshul Dalal
2025-06-06 19:09   ` Tom Rini
2025-06-09  7:35     ` Anshul Dalal
2025-06-09 14:57       ` Tom Rini
2025-06-10 10:11         ` Anshul Dalal
2025-06-10 14:46           ` Tom Rini
2025-06-10 16:07             ` Anshul Dalal
2025-06-10 22:46               ` Tom Rini
2025-06-03 14:24 ` [PATCH v7 08/10] mach-k3: common: enable falcon mode for 62 platform Anshul Dalal
2025-06-06 19:15   ` Tom Rini
2025-06-09 12:02     ` Anshul Dalal
2025-06-03 14:24 ` [PATCH v7 09/10] Makefile: update tispl regex to also clean falcon spl Anshul Dalal
2025-06-03 14:24 ` [PATCH v7 10/10] doc: ti: am62: add falcon mode documentation Anshul Dalal
2025-06-30 14:05 ` [PATCH v7 00/10] Add falcon support for am62a, 62p and 62x Francesco Valla
2025-07-01  9:14   ` Raghavendra, Vignesh
2025-07-01 10:23     ` Francesco Valla
2025-07-02 10:01       ` Raghavendra, Vignesh

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=DAKNVHXLKDZP.3261Z1O2BP6D0@ti.com \
    --to=anshuld@ti.com \
    --cc=afd@ti.com \
    --cc=b-liu@ti.com \
    --cc=bb@ti.com \
    --cc=m-chawdhry@ti.com \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.