From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Date: Fri, 20 Sep 2013 04:47:18 +0100 Subject: [U-Boot] [PATCH v5 2/8] ARM: add secure monitor handler to switch to non-secure state In-Reply-To: References: <1379606806-439-1-git-send-email-andre.przywara@linaro.org> <1379606806-439-3-git-send-email-andre.przywara@linaro.org> <20130920004221.GA62854@lvm> Message-ID: <20130920034718.GS7623@lvm> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Sep 20, 2013 at 08:08:45AM +0530, Mj Embd wrote: > On Fri, Sep 20, 2013 at 6:12 AM, Christoffer Dall < > christoffer.dall at linaro.org> wrote: > > > On Fri, Sep 20, 2013 at 03:20:15AM +0530, Mj Embd wrote: > > > Just checking, is the mcr p15,0,r1,c1,c1,0 in sync with the following > > text > > > . I could be wrong here, just checking > > > > In the future, if you can comment specifically inline on the lines of > > code you are targeting, it is easier for other people to address your > > concerns. > > > > > > > > B1.5.1 Arm Arch Ref Manual > > > > > > - > > > > > > To avoid security holes, software must not: > > > - > > > > > > ? Change from Secure to Non-secure state by using an MSR or CPS > > > instruction > > > to switch from Monitor > > > > The important part here is that we don't change from S to NS by > > modifying the SCR, because monitor mode is always in secure mode, so the > > change only happens on the exception return. > > > > So yes, it's safe. > > > > -Christoffer > > > > Ok. Good Discussion. Thanks, > PS: Gmail auto wraps the previous msg in 3 dots, so sometimes I miss > inlining. > Thanks for pointing out. > No problem, thanks for looking at the code. -Christoffer