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

[Xen-devel] Xen on ARM GIC setup



Hi,

I was going over this part of the gic setup code ( gic.c:gic_dist_init ):

    type = GICD[GICD_TYPER];
    gic.lines = 32 * (type & GICD_TYPE_LINES);
    ....
    /* Disable all global interrupts */
    for ( i = 32; i < gic.lines; i += 32 )
        GICD[GICD_ICENABLER + i / 32] = (uint32_t)~0ul;

The ARM GIC manual says about the ITLinesNumber bits of the TYPE register:

Indicates the maximum number of interrupts that the GIC supports. If
ITLinesNumber=N, the
maximum number of interrupts is 32(N+1). The interrupt ID range is
from 0 to (number of IDs – 1). For example:
0b00011
Up to 128 interrupt lines, interrupt IDs 0-127.

Shouldn't it be gic.lines = 32 * ((type & GICD_TYPE_LINES)+1); ? I
might be wrong but it seems like this way we are missing the last
register in those loops?

Regards,
Sander

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.