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

Scott Duplichan scott at notabs.org
Tue Oct 19 20:34:20 CEST 2010

-----Original Message-----
From: coreboot-bounces at coreboot.org [mailto:coreboot-bounces at coreboot.org] On Behalf Of Carl-Daniel Hailfinger
Sent: Tuesday, October 19, 2010 01:25 PM
To: Scott Duplichan
Cc: 'Arne Georg Gleditsch'; 'Coreboot'
Subject: Re: [coreboot] [PATCH] AMD F10h: set MMCONF bus count according toconfigured value

]Hi Scott,
]On 19.10.2010 19:47, Scott Duplichan wrote:
]> Last night, I thought I would just learn about gas macros and do it
]> that way. It was more difficult than I thought. I cannot even find
]> examples of gas macros that use arguments.
]Take a look at src/cpu/amd/car/cache_as_ram.inc, specifically
]extractmask and simplemask.

Thanks Carl-Daniel. 

Hello Myles,

I am not so happy with the new one either. What I really wanted was a
macro called highestSetBit. That way, the reader can guess what macro
invocation highestSetBit (CONFIG_MMCONF_BUS_NUMBER) does without
actually digging it out. But I could not find a way to make that work.
Another idea was to find highestSetBit at runtime, if it could be done
a short and readable code sequence. This would be possible with family
15h, where instructions such as lzcnt are supported. But family 10h
does not have this instruction.

Now that Carl-Daniel has showed how to do gas macros, how about I add a
highestSetBit macro to amd/mtrr.h? Then everything else can be inlined?


More information about the coreboot mailing list