On 01.11.2008 23:21, Carl-Daniel Hailfinger wrote:
Once we touch the MTRRs in VIA disable_car(), the CPU resets. Since workarounds are better than instant reboots, mangle the code so that it only switches stacks and flushes the cache.
There are two genuine fixes in there as well: Switch %esp before CAR is disabled. That way, debugging becomes easier and the stack is always valid.
And one of the nastier bugs easily happening in C: We had a pointer to a const struct, but we wanted a const pointer to a struct. This kills the (correct) warning about that code.
Many thanks to Corey for testing countless iterations of that code.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net Attached for poor gmail users.
New version attached. It also fixes a missing semicolon that somehow snuck into the earlier patch.
Regards, Carl-Daniel