We boot the kernel in non-secure mode and by default access to the CCI device is not enabled for non-secure access, so we must enable this if we want Linux to manage CPU hotplug on big.LITTLE models.
Signed-off-by: Jon Medhurst tixy@linaro.org --- semi_loader.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/semi_loader.c b/semi_loader.c index f8be94d..f9d36e5 100644 --- a/semi_loader.c +++ b/semi_loader.c @@ -263,6 +263,8 @@ static void init_cci(unsigned cci) /* Wait while change pending bit of status register is set */ while(io32(cci+0xc) & 0x1) {} + + io32(cci+0x8) = 1; /* Enable non-secure access to CCI */ }
static void configure_from_fdt(struct loader_info *info)
We boot the kernel in non-secure mode and by default access to the CCI device is not enabled for non-secure access, so we must enable this if we want Linux to manage CPU hotplug on big.LITTLE models.
Signed-off-by: Jon Medhurst tixy@linaro.org ---
Changes since V1: - Add a DSB instructions
semi_loader.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/semi_loader.c b/semi_loader.c index f8be94d..51ffaf6 100644 --- a/semi_loader.c +++ b/semi_loader.c @@ -263,6 +263,13 @@ static void init_cci(unsigned cci) /* Wait while change pending bit of status register is set */ while(io32(cci+0xc) & 0x1) {} + + /* + * Enable non-secure access to CCI and use a DSB ensure this takes + * effect before such accesses are made. + */ + io32(cci+0x8) = 1; + asm volatile ("dsb" : : : "memory"); }
static void configure_from_fdt(struct loader_info *info)
On 3 December 2012 20:23, Jon Medhurst (Tixy) tixy@linaro.org wrote:
We boot the kernel in non-secure mode and by default access to the CCI device is not enabled for non-secure access, so we must enable this if we want Linux to manage CPU hotplug on big.LITTLE models.
Signed-off-by: Jon Medhurst tixy@linaro.org
Reviewed-by: Peter Maydell peter.maydell@linaro.org
I've applied this patch and the arch-timers fix to the linaro boot-wrapper git repo.
-- PMM
On Tue, 2012-12-04 at 16:18 +0000, Peter Maydell wrote:
On 3 December 2012 20:23, Jon Medhurst (Tixy) tixy@linaro.org wrote:
We boot the kernel in non-secure mode and by default access to the CCI device is not enabled for non-secure access, so we must enable this if we want Linux to manage CPU hotplug on big.LITTLE models.
Signed-off-by: Jon Medhurst tixy@linaro.org
Reviewed-by: Peter Maydell peter.maydell@linaro.org
I've applied this patch and the arch-timers fix to the linaro boot-wrapper git repo.
Thanks