From: <Claudiu.Beznea@microchip.com> To: <clement.leger@bootlin.com> Cc: <linux@armlinux.org.uk>, <Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <thomas.petazzoni@bootlin.com> Subject: Re: [PATCH 1/2] ARM: at91: add sam_linux_is_in_normal_world() function Date: Wed, 20 Jul 2022 08:29:18 +0000 [thread overview] Message-ID: <5f182f9b-9e50-657f-8a01-f98a2cec3738@microchip.com> (raw) In-Reply-To: <386e02d5067da8e684332c5a788326ee@bootlin.com> On 04.07.2022 20:34, clement.leger@bootlin.com wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Le 2022-07-04 08:19, Claudiu.Beznea@microchip.com a écrit : >> Hi, Clement, >> >> On 06.06.2022 17:57, Clément Léger wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know >>> the content is safe >>> >>> Add sam_linux_is_in_normal_world() which allows to know if Linux is >>> running in the normal world or not. This function is used by code >>> which needs to differentiate the world in which Linux is running. >>> >>> Signed-off-by: Clément Léger <clement.leger@bootlin.com> >>> --- >>> arch/arm/mach-at91/sam_secure.c | 6 ++++++ >>> arch/arm/mach-at91/sam_secure.h | 1 + >>> 2 files changed, 7 insertions(+) >>> >>> diff --git a/arch/arm/mach-at91/sam_secure.c >>> b/arch/arm/mach-at91/sam_secure.c >>> index 2a01f7a7d13f..1ec8c8b9d119 100644 >>> --- a/arch/arm/mach-at91/sam_secure.c >>> +++ b/arch/arm/mach-at91/sam_secure.c >>> @@ -27,6 +27,12 @@ struct arm_smccc_res sam_smccc_call(u32 fn, u32 >>> arg0, u32 arg1) >>> return res; >>> } >>> >>> +bool sam_linux_is_in_normal_world(void) >>> +{ >>> + /* If optee has been detected, then we are running in normal >>> world */ >> >> In case optee hasn't been detected don't we run also in normal world? >> What I want to say is that maybe you can change the function name to >> something like sam_linux_is_optee_available(). > > I would say it depends on the bootloader configuration, but Linux can > run > in secure world also. It would not change a lot of thing though. > However, you are right sam_linux_optee_is_available() seems easier to > understand ;) Changed the name and applied it to at91-soc, thanks! > > Clément
WARNING: multiple messages have this Message-ID (diff)
From: <Claudiu.Beznea@microchip.com> To: <clement.leger@bootlin.com> Cc: alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, thomas.petazzoni@bootlin.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/2] ARM: at91: add sam_linux_is_in_normal_world() function Date: Wed, 20 Jul 2022 08:29:18 +0000 [thread overview] Message-ID: <5f182f9b-9e50-657f-8a01-f98a2cec3738@microchip.com> (raw) In-Reply-To: <386e02d5067da8e684332c5a788326ee@bootlin.com> On 04.07.2022 20:34, clement.leger@bootlin.com wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Le 2022-07-04 08:19, Claudiu.Beznea@microchip.com a écrit : >> Hi, Clement, >> >> On 06.06.2022 17:57, Clément Léger wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know >>> the content is safe >>> >>> Add sam_linux_is_in_normal_world() which allows to know if Linux is >>> running in the normal world or not. This function is used by code >>> which needs to differentiate the world in which Linux is running. >>> >>> Signed-off-by: Clément Léger <clement.leger@bootlin.com> >>> --- >>> arch/arm/mach-at91/sam_secure.c | 6 ++++++ >>> arch/arm/mach-at91/sam_secure.h | 1 + >>> 2 files changed, 7 insertions(+) >>> >>> diff --git a/arch/arm/mach-at91/sam_secure.c >>> b/arch/arm/mach-at91/sam_secure.c >>> index 2a01f7a7d13f..1ec8c8b9d119 100644 >>> --- a/arch/arm/mach-at91/sam_secure.c >>> +++ b/arch/arm/mach-at91/sam_secure.c >>> @@ -27,6 +27,12 @@ struct arm_smccc_res sam_smccc_call(u32 fn, u32 >>> arg0, u32 arg1) >>> return res; >>> } >>> >>> +bool sam_linux_is_in_normal_world(void) >>> +{ >>> + /* If optee has been detected, then we are running in normal >>> world */ >> >> In case optee hasn't been detected don't we run also in normal world? >> What I want to say is that maybe you can change the function name to >> something like sam_linux_is_optee_available(). > > I would say it depends on the bootloader configuration, but Linux can > run > in secure world also. It would not change a lot of thing though. > However, you are right sam_linux_optee_is_available() seems easier to > understand ;) Changed the name and applied it to at91-soc, thanks! > > Clément _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-07-20 8:29 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-06 14:56 [PATCH 0/2] ARM: at91: add support for L2 cache write_sec() callback Clément Léger 2022-06-06 14:56 ` Clément Léger 2022-06-06 14:57 ` [PATCH 1/2] ARM: at91: add sam_linux_is_in_normal_world() function Clément Léger 2022-06-06 14:57 ` Clément Léger 2022-07-04 6:19 ` Claudiu.Beznea 2022-07-04 6:19 ` Claudiu.Beznea 2022-07-04 17:34 ` clement.leger 2022-07-04 17:34 ` clement.leger 2022-07-20 8:29 ` Claudiu.Beznea [this message] 2022-07-20 8:29 ` Claudiu.Beznea 2022-06-06 14:57 ` [PATCH 2/2] ARM: at91: setup outer cache .write_sec() callback if needed Clément Léger 2022-06-06 14:57 ` Clément Léger 2022-07-04 6:39 ` Claudiu.Beznea 2022-07-04 6:39 ` Claudiu.Beznea 2022-07-20 8:30 ` Claudiu.Beznea 2022-07-20 8:30 ` Claudiu.Beznea
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=5f182f9b-9e50-657f-8a01-f98a2cec3738@microchip.com \ --to=claudiu.beznea@microchip.com \ --cc=Nicolas.Ferre@microchip.com \ --cc=alexandre.belloni@bootlin.com \ --cc=clement.leger@bootlin.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=thomas.petazzoni@bootlin.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: linkBe 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.