[coreboot] [PATCH] v3: Work around broken MTRR setup in VIA CAR

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sat Nov 1 23:32:03 CET 2008


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 at 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

-- 
http://www.hailfinger.org/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: linuxbios3_car_via_disable_car_bandaid.diff
Type: text/x-patch
Size: 2018 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081101/11292507/attachment.diff>


More information about the coreboot mailing list