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

Warren Turkal wt at penguintechs.org
Fri Oct 8 06:15:48 CEST 2010


If the code was already setup to do that, I certainly would, but it's
really not setup that way for the CAR code. That would be a much
bigger change to the structure of the code IMO.

wt

On Thu, Oct 7, 2010 at 10:19 AM, ron minnich <rminnich at gmail.com> wrote:
> Actually, one more comment here, as if we need one :-)
>
> It's actually been easiest for me over the years to define initialized
> data in C, even if used in assembly code, i.e.:
>
> u32 *allmtrr[] = {fixedmtrr, varmtrr, amdmtrr, NULL};
>
> u32 fixedmtrr[] = {0xthis, 0xthat, 0xother, 0};
>
> Then reference these from assembly code. In fact, I frequently write
> the C code to walk this double loop, generate asm, and use that (I do
> this more commonly on Plan 9 than linux for several reasons but the
> idea is the same).
>
> The way to actually use these structs is left as an exercise for the reader :-)
>
> It's really best to use the C compiler as often as you can for things,
> including static initialized data. At least it is for me.
>
> ron
>
> --
> coreboot mailing list: coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
>




More information about the coreboot mailing list