From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Date: Wed, 06 Aug 2014 08:38:13 +0100 Subject: [U-Boot] [PATCH] ARM: HYP/non-sec: Add MIDR check to detect unsupported CPUs In-Reply-To: <53DFA343.407@arm.com> References: <1407033372-24765-1-git-send-email-siarhei.siamashka@gmail.com> <53DFA343.407@arm.com> Message-ID: <1407310693.23472.67.camel@dagon.hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 2014-08-04 at 16:14 +0100, Marc Zyngier wrote: > My personal feeling is that booting in secure mode is always the wrong > thing to do. FWIW I agree. > If you want to go down the road of a single bootloader that is able to > run on several SOCs, then do it the proper way: parse the device tree > and have separate constraints for your SoC. But please don't blacklist > random cores just because it fits your environment. I think there is a CPU feature register which indicates whether support for HYP mode is present, isn't there? In which case a tolerable fix for now (going all the way DT is a big yakk to shave...) would be to use that to decide between booting in NS.HYP vs NS.SVC (nb: not NS.HYP vs S.SVC). I don't recall if the GIC has a feature bit for the security extensions, but if not then inferring it from the CPUs support wouldn't be the worst thing in the world under the circumstances. Ian.