[coreboot] [PATCH] Set the register based on the ROMSIZE

Patrick Georgi patrick at georgi-clan.de
Fri Dec 10 13:58:12 CET 2010


Am 10.12.2010 13:29, schrieb Bao, Zheng:
>> How about
>> pci_write_config16(dev, 0x6c,
>> 0x10000-(max(512,CONFIG_COREBOOT_ROMSIZE_KB)>>6));
>> instead?
> I am not sure.
> I think we need to leave the workload to compiler, instead of to the
> machine running the coreboot and to the people.
Hmm.. The main problem might be that romcc is probably not capable of
resolving max(a,b) at compile time. Other than that, this is a rather
primitive compile time optimization.

Other than that, it's more a style question: lots of #ifdef/#elif
statements or a comparably opaque calculation as in the proposal?


Patrick




More information about the coreboot mailing list