[Sound-open-firmware] Stack alignment issues with XCC?

Liam Girdwood liam.r.girdwood at linux.intel.com
Wed Nov 20 12:08:46 CET 2019


On Tue, 2019-11-19 at 15:33 +0000, Paul Olaru wrote:
> Hello, I'm trying to begin doing all my builds with XCC for testing
> and, besides one issue where I need to
> manually insert stack alignment code in the IRQ handling function for
> the DMA domain it seems to work.
> Also, if I align the stack within my IRQ_STEER handler it remains
> aligned for the domain handler just fine.
> 
> My question is, why within irq_handler (see
> src/drivers/imx/interrupt.c, function begins around line 275)
> the stack is not aligned? Did you also encounter this issue on other
> platforms? And is there any good
> solution other than that bit of inline assembly that just force-
> aligns the stack pointer when entering the
> cascaded IRQ handler?
> 

Never encountered this on Intel platforms. It could be another issue
that shows up when handling an IRQ ?

Does the emulator shed any light on this ?

> Without this code I seem to get panics with an alignment exception,
> the address pointing within an
> Interrupt stack and epc0 not being correct (I think I need to
> investigate that as well but that's a
> low-priority issue).

Could be corruption somewhere else ? I guess the timer IRQs and SW IRQs
work fine without the alignment ?

Liam
> 
> Compiler version for reference (in case there is a known issue I'm
> not aware of):
> 
> xt-xcc -v
> xt-xcc version 11.0.4
> Thread model: single
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware



More information about the Sound-open-firmware mailing list