Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33115 )
Change subject: Makefile.inc: Compile smm files based on CONFIG_SMM_INDEPENDENT_BUILD ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/#/c/33115/4/src/Kconfig File src/Kconfig:
https://review.coreboot.org/#/c/33115/4/src/Kconfig@333 PS4, Line 333: default y if STAGE_RAMSTAGE || RAMPAYLOAD
I'm not following why the default would be based on these things. I think you should have another Kconfig which is the negative of this one such that you can select it for the small number of platforms that would deselect smm. Then the default of this option would be !that_option.
purpose of this CL is to make required SMM code "also" compiled independent of ramstage hence i have included only below case.
1. when ramstage is enable then we might need to pull those smm code (this was the existing case)
2. when rampayload is selected and we need to only compiled those smm code without ramstage (new change)
The changes that you are recommending makes sense if i don't remove smm code from ramstage and additionally duplicate the same code under SMM_INDEPENDENT_BUILD which will be enable if !STAGE_RAMSTAGE ?
Also, as this option is x86 dependent it should go in src/arch/x86
yes, this is good idea
https://review.coreboot.org/#/c/33115/4/src/arch/x86/Makefile.inc File src/arch/x86/Makefile.inc:
https://review.coreboot.org/#/c/33115/4/src/arch/x86/Makefile.inc@403 PS4, Line 403: ifeq ($(CONFIG_SMM_INDEPENDENT_BUILD),y)
I still don't follow why this change is needed. […]
are you referring about smm.manual creation ?