Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Aug 2015 11:43:21 +0300
From:      Mihai Carabas <mihai.carabas@gmail.com>
To:        freebsd-arm@freebsd.org
Subject:   how to get gic registers from dts
Message-ID:  <CANg1yUsSNZV9%2BtFi-VY4mLxXzh2PmcNWSWoHDXQdcpsY6dVR2A@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANg1yUsSNZV9%2BtFi-VY4mLxXzh2PmcNWSWoHDXQdcpsY6dVR2A>