[coreboot] [PATCH] AMD F10h: set MMCONF bus count according to configured value

Myles Watson mylesgw at gmail.com
Tue Oct 19 04:43:15 CEST 2010


On Mon, Oct 18, 2010 at 8:06 PM, Stefan Reinauer
<stefan.reinauer at coresystems.de> wrote:
>
> On 18.10.2010, at 10:44, Myles Watson <mylesgw at gmail.com> wrote:
>
>> On Mon, Oct 18, 2010 at 11:29 AM, Scott Duplichan <scott at notabs.org> wrote:
>>
>>> +   #elif (CONFIG_MMCONF_BUS_NUMBER == 4)
>>> +       orl     $2, %eax
>>> +   #elif (CONFIG_MMCONF_BUS_NUMBER == 8)
>>> +       orl     $3, %eax
>>> +   #elif (CONFIG_MMCONF_BUS_NUMBER == 16)
>>> +       orl     $4, %eax
>>> +   #elif (CONFIG_MMCONF_BUS_NUMBER == 32)
>>> +       orl     $5, %eax
>>> +   #elif (CONFIG_MMCONF_BUS_NUMBER == 64)
>>> +       orl     $6, %eax
>>> +   #elif (CONFIG_MMCONF_BUS_NUMBER == 128)
>>> +       orl     $7, %eax
>>> +   #elif (CONFIG_MMCONF_BUS_NUMBER == 256)
>>> +       orl     $8, %eax
>>> +   #else
>>> +       #error "unsupported MMCONF_BUS_NUMBER value"
>>> +   #endif
>>>        andl    $(~(0x0000ffff)), %edx
>>>        orl     $(CONFIG_MMCONF_BASE_ADDRESS >> 32), %edx
>>>        wrmsr
>>
>> Could you move the ugly logic into Kconfig or a header file?
>
> I don't think that we should move ugly logic into Kconfig. Kconfig is for configuration, code is for logic.

Agreed.

Thanks,
Myles




More information about the coreboot mailing list