On 9/1/10 5:26 PM, Myles Watson wrote:
The only thing that worries me is this include.
from src/include/pc80/mc146818rtc.h: #include <pc80/mc146818rtc_early.c>
It seems like usually when we make initobj, we stop including the c file.
Yes... Another problem though.
It's guarded by #ifdef __ROMCC__ so it only gets included on romcc targets. We could remove the C include from there and move it to the romstage.c files, to make it more obvious which .c files get sucked in on the targets. Not sure what else we could do..
There are 4 other places where a .c file is included in a .h file:
./src/arch/i386/include/bootblock_common.h:#include <cpu/x86/lapic/boot_cpu.c> ./src/include/console/console.h:#include <pc80/serial.c> ./src/include/console/console.h:#include "lib/ne2k.c" ./src/include/console/console.h:#include <console/console.c> ./src/include/pc80/mc146818rtc.h:#include <pc80/mc146818rtc_early.c>
In addition:
- We have an unknown number of .h files that contain functions
- We include .c files in 148 romstage.c files
and in these:
./cpu/amd/car/post_cache_as_ram.c ./cpu/amd/dualcore/amd_sibling.c ./cpu/amd/dualcore/dualcore.c ./cpu/amd/model_10xxx/init_cpus.c ./cpu/amd/quadcore/amd_sibling.c ./cpu/amd/quadcore/quadcore.c ./cpu/amd/sc520/raminit.c ./drivers/ati/ragexl/xlinit.c ./lib/lzma.c ./mainboard/getac/p470/mainboard.c ./mainboard/getac/p470/mainboard_smi.c ./northbridge/amd/amdfam10/bootblock.c ./northbridge/amd/amdfam10/debug.c ./northbridge/amd/amdfam10/northbridge.c ./northbridge/amd/amdfam10/raminit_amdmct.c ./northbridge/amd/amdht/h3finit.c ./northbridge/amd/amdht/ht_wrapper.c ./northbridge/amd/amdk8/raminit_f.c ./northbridge/amd/amdk8/raminit_test.c ./northbridge/intel/i82830/raminit.c ./northbridge/intel/i945/early_init.c ./northbridge/intel/i945/raminit.c ./northbridge/via/vx800/raminit.c ./pc80/usbdebug_serial.c ./pc80/vga/vga.c ./southbridge/amd/amd8111/amd8111_reset.c ./southbridge/amd/amd8111/bootblock.c ./southbridge/amd/cs5530/cs5530_vga.c ./southbridge/amd/sb600/sb600_early_setup.c ./southbridge/amd/sb600/sb600_reset.c ./southbridge/amd/sb600/sb600_sm.c ./southbridge/amd/sb700/sb700_early_setup.c ./southbridge/amd/sb700/sb700_reset.c ./southbridge/amd/sb700/sb700_sm.c ./southbridge/broadcom/bcm5785/bcm5785_early_setup.c ./southbridge/broadcom/bcm5785/bcm5785_reset.c ./southbridge/broadcom/bcm5785/bootblock.c ./southbridge/intel/i82801dx/i82801dx_smihandler.c ./southbridge/intel/i82801gx/i82801gx_smihandler.c ./southbridge/nvidia/ck804/ck804_reset.c ./southbridge/nvidia/mcp55/mcp55_reset.c ./southbridge/sis/sis966/sis966_reset.c
Stefan