how to get gic registers from dts

Mihai Carabas mihai.carabas at gmail.com
Fri Aug 7 08:43:23 UTC 2015


Hello,

I'm trying to integrate the VGIC infrastructure into the VMM code and I
want to use some of the current GIC code.

I have a generic question about how the gic registers are geting filled up
in this piece of code:
167 >-------if (bus_alloc_resources(dev, arm_gic_spec, sc->gic_res)) {
168 >------->-------device_printf(dev, "could not allocate resources\n");
169 >------->-------return (ENXIO);
170 >-------}
171
172 >-------arm_post_filter = gic_post_filter;
173
174 >-------/* Distributor Interface */
175 >-------sc->gic_d_bst = rman_get_bustag(sc->gic_res[0]);
176 >-------sc->gic_d_bsh = rman_get_bushandle(sc->gic_res[0]);
177
178 >-------/* CPU Interface */
179 >-------sc->gic_c_bst = rman_get_bustag(sc->gic_res[1]);
180 >-------sc->gic_c_bsh = rman_get_bushandle(sc->gic_res[1]);

So bus_alloc_resource allocates the gic_res, but in that code I coudn't
find where the bustag and bushandle are getting populated. I need to get
the GICH_* and GICV_* registers (which are in the thrid and forth position
in the DTS) and I must understand the logic.

Thank you,
Mihai Carabas


More information about the freebsd-arm mailing list