[RTEMS Project] #3903: raspberrypi2 libbsd 5-freebsd-12 does not build
RTEMS trac
trac at rtems.org
Sun Mar 8 21:50:56 UTC 2020
#3903: raspberrypi2 libbsd 5-freebsd-12 does not build
----------------------------+---------------------
Reporter: Chris Johns | Owner: (none)
Type: defect | Status: new
Priority: high | Milestone: 5.1
Component: network/libbsd | Version: 5
Severity: blocker | Resolution:
Keywords: | Blocked By:
Blocking: |
----------------------------+---------------------
Comment (by Christian Mauderer):
And of course - like everything else on this chip family - the interrupts
can't be simple on RPi. There are at least two groups. Interrupts from the
GPU and ones from the normal system.
See
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings
/interrupt-controller/brcm,bcm2835-armctrl-
ic.txt?id=791d3ef2e11100449837dc0b6fe884e60ca3a484
and
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings
/interrupt-
controller/brcm,bcm2836-l1-intc.txt?id=36464580e658019ac7be26a08c4679bee0454d2c
The interrupts in the device tree look like this:
{{{
// GPIO - 49 to 52 in RTEMS
interrupts = <2 17>, <2 18>, <2 19>, <2 20>;
// USB - 9 in RTEMS
interrupts = <1 9>;
// Mailbox - most likely 65 in RTEMS
interrupts = <0 1>;
}}}
So I **assume** it should be a mapping like follows (in pseudo code):
{{{
#define MAGIC_OFFSET_FOR_SECOND_LEVEL 32
switch(first_number) {
case 0:
return second_number + BCM2835_IRQ_ID_BASIC_BASE_ID;
break;
case 1:
return second_number;
break;
case 2:
return second_number + MAGIC_OFFSET_FOR_SECOND_LEVEL;
break;
default:
/* Handle invalid interrupt */
break;
}
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/3903#comment:4>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list