From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Date: Thu, 04 Jul 2013 13:29:31 +0200 Subject: [U-Boot] [PATCH v2 6/7] ARM: extend non-secure switch to also go into HYP mode In-Reply-To: <20130628125133.383C.AA925319@jp.panasonic.com> References: <1371121273-18763-1-git-send-email-andre.przywara@linaro.org> <1371121273-18763-7-git-send-email-andre.przywara@linaro.org> <20130628125133.383C.AA925319@jp.panasonic.com> Message-ID: <51D55C9B.7000104@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/28/2013 05:51 AM, Masahiro Yamada wrote: > Hi Andre > > > [RFC] > > I'd like to suggest to separate HYP-switching code > from Non-secure switching. Thanks for stepping up and providing a use-case! The first version of the patches had those two separate cases, but I later merged them in favor of readability. So I actually split those two cases in the code now and am about to fold this in the existing patches. > And define different macros, for example: > > CONFIG_ARMV7_NONSECURE : switch to nonsecure > CONFIG_ARMV7_VIRT : switch to hypervisor done. > > Of cource, CONFIG_ARMV7_NONSECURE must be defined > when using CONFIG_ARMV7_VIRT. > > (If we introduced Kconfig to U-boot, > we could handle nicely dependency between CONFIGs.) I managed to get along without it. By clever use of ifdefs this dependency is now implicitly in the code. I still have to test this, so the new version will be delayed a bit. Thanks! Andre. > > I know your incentive to switch to non-secure state > is virtualization. > But I think this separation would make this code > useful for other boards and easy to understand. > > For example (this situtation might be specific > to my board), non-secure switching is done > for the reason to use a hardware debugger, > because our debugger without security extension > can work only in non-secure state. > > > > Best Regards > Masahiro Yamada > >