The red zone is for...
Posted: Sun Aug 15, 2010 1:48 pm
After toying with a non-reactive IOAPIC and an APIC that just won't listen, tens of different kind of ways to screw it up my most recent one is... odd, to say the least.
I compile my code with a regular (crosscompiler) GCC 4.5.0. It uses a red zone that's been specified in the x86_64 ABI. The red zone is the area of 128 bytes below your stack pointer, which is free for use without informing the interrupt handlers.
My problem is that an external interrupt will corrupt that red zone, no matter what I do (other than use IST for stack switching). How did you solve this? I just resorted to -mno-red-zone but I have the feeling there's something wrong with the whole red zone concept.
I compile my code with a regular (crosscompiler) GCC 4.5.0. It uses a red zone that's been specified in the x86_64 ABI. The red zone is the area of 128 bytes below your stack pointer, which is free for use without informing the interrupt handlers.
My problem is that an external interrupt will corrupt that red zone, no matter what I do (other than use IST for stack switching). How did you solve this? I just resorted to -mno-red-zone but I have the feeling there's something wrong with the whole red zone concept.