[LinuxBIOS] [PATCH v3] v2, v3: Bug? in CAR setup with CacheSize!={4k, 8k, 16k}
Marc Jones
marc.jones at amd.com
Thu Nov 29 23:58:43 CET 2007
Carl-Daniel Hailfinger wrote:
> Everything is set up correctly until now.
>
>>>> /* enable caching for 16K/8K/4K using fixed mtrr */
>>>> movl $0x269, %ecx /* fix4k_cc000*/
>>>> #if CacheSize == 0x4000
>>>> movl $0x06060606, %edx /* WB IO type */
>>>> #endif
>>>> #if CacheSize == 0x2000
>>>> movl $0x06060000, %edx /* WB IO type */
>>>> #endif
>>>> #if CacheSize == 0x1000
>>>> movl $0x06000000, %edx /* WB IO type */
>>>> #endif
>>>> xorl %eax, %eax
>>>> wrmsr
>>>
>
> This is where the bug is. I'm speaking of the two commands above,
> executed unconditionally. %ecx is 0x269, %eax is zeroed, %edx keeps its
> value ($0x06060606 in case of CacheSize>=32k). wrmsr is issued. Is there
> any reason to assume that this will not disable CAR again between 16k
> and 32k? And no, that code is not protected by an #ifdef.
Ah! You are right. This is a bad bug.
Marc
--
Marc Jones
Senior Firmware Engineer
(970) 226-9684 Office
mailto:Marc.Jones at amd.com
http://www.amd.com/embeddedprocessors
More information about the coreboot
mailing list