Enable compilation with -fwhole-program for initram. The setting can be chosen via Kconfig. Default off. Depending on the target, this saves between 10% and 20% of initram size.
Compilation still broken for: - ADL MSM800SEV - Gigabyte M57SLI
Compilation changed for: - AMD DB800 (checker doesn't trigger anymore, but we get an unresolved symbol instead) - AMD Norwich (same) (The compilation changes are not bad per se, just a bit misleading. It seems that gcc is really smart.)
Compilation OK for: - AMD Serengeti - Artec DBE61 - Artec DBE62 - PCEngines Alix.1C - PCEngines Alix.2C3
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: corebootv3-initram_fwholeprogram/Kconfig =================================================================== --- corebootv3-initram_fwholeprogram/Kconfig (Revision 821) +++ corebootv3-initram_fwholeprogram/Kconfig (Arbeitskopie) @@ -60,6 +60,16 @@ help Enable this option to make coreboot beep upon certain events.
+config BADASS_OPTIMIZATION + bool "Enable badass optimizations" + depends EXPERT && EXPERIMENTAL + help + Enable -fwhole-program -combine for select code. + Needs lots of annotation in stage1 and stage2. + Works for initram only. + + If you are a Gentoo user, say NO! + endmenu
source mainboard/Kconfig Index: corebootv3-initram_fwholeprogram/arch/x86/Makefile =================================================================== --- corebootv3-initram_fwholeprogram/arch/x86/Makefile (Revision 821) +++ corebootv3-initram_fwholeprogram/arch/x86/Makefile (Arbeitskopie) @@ -132,6 +132,12 @@ PARSEELF = -e endif
+ifeq ($(CONFIG_BADASS_OPTIMIZATION), y) + COMBINEFLAGS = -fwhole-program +else + COMBINEFLAGS = +endif + STAGE0_SRC := $(patsubst %,$(src)/lib/%,$(STAGE0_LIB_SRC)) \ $(patsubst %,$(src)/arch/x86/%,$(STAGE0_ARCH_X86_SRC)) \ $(STAGE0_MAINBOARD_SRC) $(STAGE0_CHIPSET_SRC) @@ -268,7 +274,7 @@
$(obj)/coreboot.initram $(obj)/coreboot.initram.map: $(obj)/stage0.init $(obj)/stage0-prefixed.o $(INITRAM_SRC) $(Q)printf " CC $(subst $(shell pwd)/,,$(@)) (XIP)\n" - $(Q)$(CC) $(INITCFLAGS) -fPIE -c -combine $(INITRAM_SRC) -o $(obj)/coreboot.initram_partiallylinked.o + $(Q)$(CC) $(INITCFLAGS) -fPIE -c -combine $(COMBINEFLAGS) $(INITRAM_SRC) -o $(obj)/coreboot.initram_partiallylinked.o
$(Q)# .data and .bss must be empty because they aren't handled $(Q)printf " CHECK initram (non-empty writable/allocatable sections)\n"
On 26.08.2008 05:04, ron minnich wrote:
yes, well, the name alone is worth it.
Acked-by: Ronald G. Minnich rminnich@gmail.com
Thanks, r825 with your new name suggestion.
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
Index: corebootv3-initram_fwholeprogram/Kconfig
--- corebootv3-initram_fwholeprogram/Kconfig (Revision 821) +++ corebootv3-initram_fwholeprogram/Kconfig (Arbeitskopie) @@ -60,6 +60,16 @@ help Enable this option to make coreboot beep upon certain events.
+config BADASS_OPTIMIZATION
Please use a more appropriate language/wording. While you and me might find the l33t way of expressing yourself quite humorous, not all users of coreboot do. We had this problem before; all it brought us was people going back to legacy 16bit firmware.
Stefan
On 26.08.2008 13:32, Stefan Reinauer wrote:
Carl-Daniel Hailfinger wrote:
Index: corebootv3-initram_fwholeprogram/Kconfig
--- corebootv3-initram_fwholeprogram/Kconfig (Revision 821) +++ corebootv3-initram_fwholeprogram/Kconfig (Arbeitskopie) @@ -60,6 +60,16 @@ help Enable this option to make coreboot beep upon certain events.
+config BADASS_OPTIMIZATION
Please use a more appropriate language/wording. While you and me might find the l33t way of expressing yourself quite humorous, not all users of coreboot do.
I strongly object to calling that name l33t. It was not B4D455_0PT1M124T10N. But I do see your point.
How about UNREASONABLE_OPTIMIZATION? Or OVERBOARD_OPTIMIZATION (although that can be misunderstood by non-native speakers as referring to a board)?
We had this problem before; all it brought us was people going back to legacy 16bit firmware.
That sucks. Do you have a specific example as to who had a problem with which wordings and were the wordings user-visible? IIRC we do have some strong wordings in the v3 code, but our user/config interface is not offensive at all. I'm asking because I want to know where the sensitivities are.
Regards, Carl-Daniel
Carl-Daniel Hailfinger schrieb:
How about UNREASONABLE_OPTIMIZATION? Or OVERBOARD_OPTIMIZATION (although that can be misunderstood by non-native speakers as referring to a board)?
how about any of: experimental optimization excessive optimization maximum optimization (potentially) unstable optimization
(all CAPSed and under_scored, of course ;-)
Patrick
On 26.08.2008 15:05, Patrick Georgi wrote:
Carl-Daniel Hailfinger schrieb:
How about UNREASONABLE_OPTIMIZATION? Or OVERBOARD_OPTIMIZATION (although that can be misunderstood by non-native speakers as referring to a board)?
how about any of: experimental optimization excessive optimization maximum optimization (potentially) unstable optimization
(all CAPSed and under_scored, of course ;-)
Experimental and maximum both would trigger every Gentoo user out there to enable them (bad). Unstable sounds right on track, but it might leave a bad impression with some potential users. I do like excessive, though.
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
How about UNREASONABLE_OPTIMIZATION? Or OVERBOARD_OPTIMIZATION (although that can be misunderstood by non-native speakers as referring to a board)?
If it's unreasonable or overboard, let's just not check this stuff in.
Maybe EXTREME_ or DANGEROUS_ ?
That sucks. Do you have a specific example as to who had a problem with which wordings and were the wordings user-visible? IIRC we do have some strong wordings in the v3 code, but our user/config interface is not offensive at all. I'm asking because I want to know where the sensitivities are.
Back then it was stuff in flashrom.
On Tue, Aug 26, 2008 at 5:48 AM, Carl-Daniel Hailfinger
We had this problem before; all it brought us was people going back to legacy 16bit firmware.
That sucks.
it's true but it sucks. Go ahead and pick another name :-)
Just call it WHOLE_PROGRAM_COMPILE or some such.
I bet the flashrom comments were my fault.
ron