From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 14 Nov 2014 12:44:40 +0100 Subject: [U-Boot] [PATCH v3 3/5] ls102xa: HYP/non-sec: support for ls102xa boards In-Reply-To: <68c11e3d94504f1b8f48b8c77166b7ef@BY2PR0301MB0613.namprd03.prod.outlook.com> References: <1413795650-5531-1-git-send-email-Li.Xiubo@freescale.com> <1413795650-5531-4-git-send-email-Li.Xiubo@freescale.com> <20141114084952.39e0290f@lilith> <68c11e3d94504f1b8f48b8c77166b7ef@BY2PR0301MB0613.namprd03.prod.outlook.com> Message-ID: <20141114124440.7b2bc478@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Li.Xiubo at freescale.com, On Fri, 14 Nov 2014 09:06:13 +0000, Li.Xiubo at freescale.com wrote: > Hi Albert, > > > > +#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) > > > +/* Setting the address at which secondary cores start from.*/ > > > +void smp_set_core_boot_addr(unsigned long addr, int corenr) > > > +{ > > > + struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); > > > + > > > + /* > > > + * After setting the secondary cores start address, > > > + * just release them to boot. > > > + */ > > > + out_be32(&gur->scratchrw[0], addr); > > > + out_be32(&gur->brrl, 0x2); > > > +} > > > > This function does not exactly "[set] the address at which secondary > > cores start from"; it sets *a* secondary core's boot address, and then > > it *boots* it. > > > > Okay, I will fix it later. > > > Why does this version of smp_set_core_boot_addr() need to boot the core > > in addition to setting the address, whereas the existing ones in > > virt_v7, vexpress_common and arndale don't boot the cores? > > > > Yes, they don't doing the release operation. > > For Low Power Management requirement, maybe only one core will be used, and then > We also make sure that the secondary core must be in low power and deep sleep > mode(using wfi). So I just release it here, to make sure that the wfi instruction > will be executed as early as possible. Right after smp_set_core_boot_addr() is called, kick_all_cpus() isgoing to be called. Wouldn't that boot your CPUs just as well? > Thanks, > > BRs, > Xiubo Amicalement, -- Albert.