From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Courbot Subject: Re: [PATCH] ARM: tegra: add basic SecureOS support Date: Fri, 7 Jun 2013 16:13:58 +0900 Message-ID: References: <1370503687-17767-1-git-send-email-acourbot@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jassi Brar Cc: Alexandre Courbot , Stephen Warren , Joseph Lo , Karan Jhavar , Varun Wadekar , Chris Johnson , Matthew Longnecker , "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" , Linux Kernel Mailing List , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: devicetree@vger.kernel.org On Thu, Jun 6, 2013 at 9:26 PM, Jassi Brar wrote: > On Thu, Jun 6, 2013 at 12:58 PM, Alexandre Courbot wrote: >> Boot loaders on some Tegra devices can be unlocked but do not let the >> system operate without SecureOS. SecureOS prevents access to some >> registers and requires the operating system to perform certain >> operations through Secure Monitor Calls instead of directly accessing >> the hardware. >> > IOW, some critical h/w controls on Tegra are accessible only from > Secure mode (not unusual). So if we(Linux) run in NS mode we need to > make calls to the SecureOS, over SMC, to do things for us? Exactly. >> This patch introduces basic SecureOS support for Tegra. SecureOS support >> can be enabled by adding a "nvidia,secure-os" property to the "chosen" >> node of the device tree. >> > Probably just a nit, but shouldn't it be "nvidia,nonsecure-os" > instead, denoting the mode Linux is going to run? (and then I wonder > if we could detect the mode (S or NS) at runtime and avoid this flag > at all). Detection of the secure mode at runtime would only solve half of the issue: we would know that we are running in non-secure mode, but we would still not know what monitor is operating. Detecting that part is impossible AFAIK, so I'm afraid we need to pass that information through the DT here. Alex.