On 11/8/2018 6:21 AM, Richard Henderson wrote:
On 11/7/18 7:48 PM, Bijan Mottahedeh wrote:
+static void set_system_clock_scale(void)
+{
+unsigned long cntfrq_el0;
+
+asm volatile("mrs %0, cntfrq_el0" : "=r"(cntfrq_el0));
+
+if (cntfrq_el0 == 0) {
+cntfrq_el0 =
On 11/7/18 7:48 PM, Bijan Mottahedeh wrote:
>
> +static void set_system_clock_scale(void)
> +{
> +unsigned long cntfrq_el0;
> +
> +asm volatile("mrs %0, cntfrq_el0" : "=r"(cntfrq_el0));
> +
> +if (cntfrq_el0 == 0) {
> +cntfrq_el0 = GTIMER_SCALE_DEF;
> +}
> +
> +
Initialize the generic timer scale factor based on the counter frequency
register cntfrq_el0, and default to the current static value if necessary.
Signed-off-by: Bijan Mottahedeh
---
hw/arm/virt.c | 15 +++
target/arm/helper.c| 19 ---