[PATCH v10 4/6] ARM: add vdso user-space code
Christopher Covington
cov at codeaurora.org
Fri Feb 20 13:52:16 PST 2015
Hi Venkappa,
On 02/18/2015 07:12 AM, Venkappa Mala wrote:
> Catalin Marinas <catalin.marinas <at> arm.com> writes:
>
>
>> I highly doubt you are having a problem with [1] since you mentioned
>> Cortex-A7 which falls under [2]. If you have a _processor_
>> implementation with generic timers but no Hyp, as per the ARMv7 ARM
> the
>> CNTVCT == CNTPCT, otherwise it is a CPU bug.
>>
>> What you actually have is [2] but without code to initialise the Hyp
>> mode. If your kernel is running non-secure, sane Hyp registers
>> initialisation is mandatory even when the kernel does not boot in Hyp.
> yes, cortexA7 is falling under [2]. i.e. my mistake. Thanks for the
> correction.
>
>> Even for the kernel, this should be the case unless
>> "arm,cpu-registers-not-fw-configured" is passed in the DT (this was
>> really only meant as workaround for broken firmware; I think
>> Documentation/arm/Booting needs to be updated with the state of the
>> generic timers on entry).
> It will be good and it helps a lot if it updates.
>
>> IIRC there were some discussions about Linux booting in secure mode on
>> ARMv7 with no firmware to initialise the Hyp registers. If that's the
>> case for you, we could restart that discussion and try to initialise
>> CNTVOFF in the kernel running in _secure_ mode (possibly with some CPU
>> notifiers in the generic timer code).
> My test environment is like CNTVOFF initialization is not taken care in
> the firmware, HYP mode is disabled and kernel is booted with Secure SVC
> PL1 mode. As you have mentioned about restarting the thread, perhaps, it
> will be good to have a discussion in the following thread rather than
> restarting the thread.
> arm: Handle starting up in secure mode
> https://lkml.org/lkml/2014/9/16/552
>
> May I know your opinion about this one?
Catalin pointed out that accesses to NSACR may trap. I have not yet found a
reason why trying to write to CNTFRQ wouldn't work. Peter pointed out that
VBAR can't be used on systems without the security extensions, so something
has to be changed there as well.
In the long term I may be able to post an updated version, but I have no idea
how long that might take. In the short term feel free to CC me on any related
work you do, which I might be able to review, test, or both.
Chris
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
More information about the linux-arm-kernel
mailing list