Eugene Myers has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43684 )
Change subject: cpu/x86/smm: Introduce SMM module loader version 2 ......................................................................
Patch Set 5: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/43684/2/src/cpu/x86/smm/smm_module_... File src/cpu/x86/smm/smm_module_loaderv2.c:
https://review.coreboot.org/c/coreboot/+/43684/2/src/cpu/x86/smm/smm_module_... PS2, Line 123: not enough space in SMM to setup all CPUs
A developer would have to read the Intel Software Developer's Manuals and the datasheet of the speci […]
From reading the statements on line 112, 114 and 116, the error message in line 123 is somewhat misleading. 'available' means the space left over within a given 64K where other cpus' stack/stub can be placed. If 'available' < 0, then there is a problem in the stub_size and/or ss_size as the combination of the two is simply too large even in the case of a single cpu. if '0 < available < ss_size', then cpus_in_segment should be one as you have already accounted one of the CPUs and 'available' is the space that you can fit other CPUs.
So, line 123 should inform the developer that his stub_size and ss_size (as entry_offset is normally hardware dependent) are too large for the segment.