[coreboot] [PATCH try 2] Reduce duplicate definition in CAR code.

Warren Turkal wt at penguintechs.org
Thu Oct 7 09:31:26 CEST 2010

On Wed, Oct 6, 2010 at 6:42 AM, Carl-Daniel Hailfinger
<c-d.hailfinger.devel.2006 at gmx.net> wrote:


> Yeargh! You can't be serious! ASM macros for MTRR address lists? I have
> worked a lot with CAR code and I know the readability issues there, but
> this makes it worse.

This asm macro allows the list to be place where it is needed in the
file. Since the file seems to be executed from the top, I can't just
define a label with extra data in it in the header. AFAICT, that data
would be executed as code if I did such a thing since the car code
doesn't seem to have a starting label.

>> This code is easy enough to break that we have to be very careful
>> about changing it.
> Not only that. ASM macros are really hard to get right, and some of the
> CAR code even has comments about this. For example, both space and comma
> are parameter separators in some versions of gas, so if you use
> ", " as parameter separator, you lose because this is treated as two
> separators with an empty parameter in between.

Are you saying that the following:
.long 0x0,<space>0x1
could be treated as if it has two separators? Are you saying that this
can only happen in asm macros? If that is not what you are saying,
then the code is already broken as all the vendor main car
implementations current use <comma><space> to separate the register
long values.


More information about the coreboot mailing list