qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] gic_cpu_write() call in exynos4210_gic_init()


From: Peter Maydell
Subject: [Qemu-devel] gic_cpu_write() call in exynos4210_gic_init()
Date: Tue, 3 Apr 2012 17:45:45 +0100

Hi; I've been working on a refactoring of the ARM GIC code (trying
to make it its own sysbus device rather than having the .c file
included from lots of places), and I noticed the following odd code
in hw/exynos4210_gic.c:exynos4210_gic_init():

    gic_cpu_write(&s->gic, 1, 0, 1);

This seems to be trying to enable the CPU interface for CPU 1
(by directly calling the GIC function for writing a word to
that CPU interface). However, doing this in an init function
doesn't seem correct -- the write will change the GIC's internal
state but the change would be undone by a reset. (This happens
to work at the moment because we don't actually reset the GIC
at reset! However I intend to fix that bug...)

What was the intention of this code, and can we just drop it,
or do it in some other way? Does the Exynos GIC really reset
with the second CPU interface enabled?

My guess is that we either want a device property for CPU
interface state on reset (if the Exynos GIC resets differently
to the standard GIC), or this should be being done in the
arm_boot code if it's just trying to emulate behaviour of some
boot ROM...

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]