Re: VxWorks Interrupts



Thanks!
It make things clearer...
Where could find the memory map when VxWorks is running or booting...
Just like the information you mentioned when kernelInit...


LarryC 写道:

Hi:

At the end of usrInit in usrConfig.c, you'll see a call to
kernelInit....

kernelInit ((FUNCPTR) usrRoot, ROOT_STACK_SIZE,
(char *) MEM_POOL_START_ADRS,
sysMemTop (), ISR_STACK_SIZE, INT_LOCK_LEVEL);

That's where the ISR_STACK_SIZE is set for the kernel.

vxworks system memory partition is initialized by kernelInit() with
memory between
pMemPoolStart (3rd param) and pMemPoolEnd (4th param). The interrupt
stack of intStackSize (5th param) bytes is allocated starting at
pMemPoolStart. MEM_POOL_START_ADRS is generally set to the mem
location just after the bss of vxWorks.

Some of this gets changed for cpu's that don't have interrupt stacks,
and gets permuted for cpu's where the stack grows upwards toward higher
address.

Good luck,

lc

jeanwelly wrote:
LarryC,
Just follow your discussions...
In the VxWorks Programming Guide, it is said that whether use a
seperate interrupt stack is determined by the architecture. And, I
think the PPC is not using the stack of task, but the general stack at
the task level.
One question is: Where/when that general stack for interrupt was
allocated?

Thanks!
---
Jeanwelly



LarryC 写道:

That's sort of true. Generally, vxWorks support a separate stack for
ISRs, but that really is a function of the architeture also. On some
simple targets, the ISR shares the same stack as the task-level code.

"Context switch" is pretty general, but while it's true there is no
task-to-task context switch when an interrupt occurs, there is a finite
amount of time to save the status of the executing task before the
processing of the interrupt decode occurs.


lc
Maverick wrote:
What I read from the programmers guide ..it said that vxWorks has a
seprate Interrupt stack...and there is no context switch ....when an
interrupt occurs in vxWorks....

Ne Idea..

Thanks In Advance
Abhijit

.



Relevant Pages

  • Re: interrupt routine and application pages
    ... application stack in the interrupt context. ... are still in the context of interrupted thread. ... your code runs at raised IRQL, Memory Manager just had no chance to ...
    (microsoft.public.development.device.drivers)
  • Re: VxWorks Interrupts
    ... kernelInit usrRoot, ROOT_STACK_SIZE, ... location just after the bss of vxWorks. ... Some of this gets changed for cpu's that don't have interrupt stacks, ... and gets permuted for cpu's where the stack grows upwards toward higher ...
    (comp.os.vxworks)
  • Re: VxWorks Interrupts
    ... Where could find the memory map when VxWorks is running or booting... ... That's where the ISR_STACK_SIZE is set for the kernel. ... Some of this gets changed for cpu's that don't have interrupt stacks, ... and gets permuted for cpu's where the stack grows upwards toward higher ...
    (comp.os.vxworks)
  • Re: linux-specific behavior, or coincidence?
    ... Is there any circumstance when the stack is overwritten even if I don't force it with another function call? ... An asynchronous interrupt MIGHT cause the stack to get trashed.. ... the normal mechanism for an asynchronous interrupt is that the processor will *at the least push* the program counter into the current stack, and jump to the interrupt service routine. ... The possible exception being a call to memory that is illegal..resulting in a trap type instruction. ...
    (comp.os.linux.misc)
  • Re: interrupt routine and application pages
    ... You need to lock the pages in memory before the interrupt. ... know the application stack pointer? ... Now you still have the stack pointer problem, ...
    (microsoft.public.development.device.drivers)