Attention is currently required from: EliasOfWaffle, Jérémy Compostella, Martin L Roth, Matt DeVillier, Michał Żygowski, Paul Menzel, Stefan Reinauer.
Eugene Myers has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78889?usp=email )
Change subject: cpu/x86/smm: Fix get_save_state calculation ......................................................................
Patch Set 5:
(2 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/78889/comment/d8cea46a_c0ccf3f0 : PS4, Line 9: When the SMI transfer monitor (STM) is configured, get_save_state returns an incorrect pointer to the cpu save state because the size (rounded up to 0x100)of the processor System Management Mode (SMM) descriptor needs to be subtracted out in this case.
missing space after the parenthesis.
Done
File src/cpu/x86/smm/smm_module_handler.c:
https://review.coreboot.org/c/coreboot/+/78889/comment/ec7a50d8_86cb0a49 : PS4, Line 110: stm_psd_size = ALIGN_UP(sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR),
`ALIGN_UP(sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR), 0x100)` is also used in `src/cpu/x86/mp_init. […]
The inconsistency is in the definition of smm_runtime.save_state_size, which was assumed to be the cpu save state (defined for the processor) and used in the tiling calculation for SMM. The STM's SMM descriptors had to also be accounted for when the STM is configured. I agree that someone may want to give more thought about how these data structures are dealt with. Not sure if I am the one to do it as I am trying to fix a serious bug.