From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhiqiang Hou Date: Thu, 23 Jun 2016 03:54:19 +0000 Subject: [U-Boot] [PATCHv6 2/6] ARMv8: add the secure monitor firmware framework In-Reply-To: References: <1466566259-33431-1-git-send-email-Zhiqiang.Hou@nxp.com> <1466566259-33431-2-git-send-email-Zhiqiang.Hou@nxp.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi York, Thanks for your comments! > -----Original Message----- > From: york sun > Sent: 2016?6?23? 0:20 > To: Zhiqiang Hou ; u-boot at lists.denx.de; > albert.u.boot at aribaud.net; scottwood at freescale.com; > Mingkai.hu at freescale.com; yorksun at freescale.com; leoli at freescale.com; > prabhakar at freescale.com; bhupesh.sharma at freescale.com > Subject: Re: [PATCHv6 2/6] ARMv8: add the secure monitor firmware framework > > On 06/21/2016 08:42 PM, Zhiqiang Hou wrote: > > > > > + > > +#ifdef CONFIG_ARMV8_PSCI > > +/* > > + * The PSCI_VERSION function is added from PSCI v0.2. When the PSCI > > + * v0.1 received this function, the NOT_SUPPORTED (0xffff_ffff) error > > + * number will be returned according to SMC Calling Conventions. But > > + * when getting the NOT_SUPPORTED error number, we cannot ensure if > > + * the PSCI version is v0.1 or other error occurred. So, PSCI v0.1 > > + * won't be supported by this framework. > > + * And if the secure firmware isn't running, return NOT_SUPPORTED. > > + * > > + * The return value on success is PSCI version in format > > + * major[31:16]:minor[15:0]. > > + */ > > +unsigned int sec_firmware_support_psci_version(void) > > +{ > > + if (gd->sec_firmware & SEC_FIRMWARE_RUNNING) > > + return _sec_firmware_support_psci_version(); > > + > > + return 0xffffffff; > > +} > > +#endif > > Does _sec_firmware_support_psci_version() always return version numbers? > Any chance it returns an error code? If the PSCI_VERSION was supported in current PSCI version, it will return the version, otherwise, the SMC will return the value 0xffff_ffff to indicate the PSCI_VERSION isn't supported. There isn't any description for returning error code in the PSCI spec. Thanks, Zhiqiang