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: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to