ron minnich wrote:
On Mon, Sep 8, 2008 at 9:00 AM, Stefan Reinauer stepan@coresystems.de wrote:
roughly: asm volatile ("movl newstack, %eax\n movl %eax, %esp\n")
and your entire call chain and all automatics on the stack are gone. And you can't return from disable_car.
So are you saying it is incredible hard to produce that call chain from scratch, or copy it over? I really don't think so.
Moving the stack in the general case won't work. Better to call another function -- i.e. disable_car never returns -- that's we do do in v2 today.
Works fine for me.
We could set up a relocation mapping. That's what FILO does to cope with this issue.
It seems kind of complex and it is very architecture dependent.
Yes, as is a bios. We're talking about details in Cache as RAM here,... that's much CPU specific, whereas the FILO reloc is "only" x86 dependent. Though, all modern CPUs have a mechanism like that, should we ever try to find out we need that at all.
If we assume there is no return from disable_car, life is very much simpler.
Ok, why don't we do that?