All of lore.kernel.org
 help / color / mirror / Atom feed
* Xen on ARM GIC setup
@ 2013-06-04 19:42 Sander Bogaert
  2013-06-04 21:21 ` Julien Grall
  0 siblings, 1 reply; 5+ messages in thread
From: Sander Bogaert @ 2013-06-04 19:42 UTC (permalink / raw)
  To: xen-devel@lists.xen.org

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-05  8:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04 19:42 Xen on ARM GIC setup Sander Bogaert
2013-06-04 21:21 ` Julien Grall
2013-06-04 21:23   ` Julien Grall
2013-06-05  8:29     ` Sander Bogaert
2013-06-05  8:46       ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.