[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
context switch and interrupts
- Date: Mon, 4 Jan 2010 17:41:23 -0500
- From: gedare at gwu.edu (Gedare Bloom)
- Subject: context switch and interrupts
I'm working on a port of RTEMS to the Sparc 64 (with Eugen) using the
existing SPARC port as a basis. Our port is "working", but I have
found that when any RTEMS application begins to run, interrupts are
disabled. After some initial debugging, it appears that interrupts are
turned off explicitly by boot_card and do not appear to be explicitly
Looking at the BSP guide, I noticed this in section 7.3.2 about
boot_card: "RTEMS will context switch to the first application task.
As a side-effect of this context switch, processor interrupts will be
Does this mean that _CPU_Context_switch in cpu_asm.S should always
turn interrupts on, regardless of the processor's state?
Or is it just that the first context pointed to by Context_Control
*heir on the first context switch has the appropriate processor state
for interrupts to be enabled? If so, where is that context
initialized so that I can make sure it is correct? The obvious
candidate seems to be _CPU_Context_Initialize, but it only seems to
set an interrupt masking level, not actually change whether interrupts
are enabled or disabled.