Attention is currently required from: EliasOfWaffle, Martin L Roth, Michał Żygowski, Paul Menzel, Stefan Reinauer.
Jérémy Compostella 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 1:
(5 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/78889/comment/6dccfa3d_d41c89b3 : PS1, Line 9: When the STM is configured, get_save_state returns an incorrect nit: This is more of my rule as I don't think I saw that in coreboot coding style but I usually feel like this is good to define acronyms as they are used in the commit message. I would suggest: `When the SMI Transfer Monitor (STM) is configured` and line 11 `of the processor System Management Mode (SMM) descriptor`.
Patchset:
PS1: Just a few cosmetic and optional comments.
File src/cpu/x86/smm/smm_module_handler.c:
https://review.coreboot.org/c/coreboot/+/78889/comment/f404b014_15a69d52 : PS1, Line 12: #include <security/intel/stm/SmmStm.h> includes are usually sorted in alphabetical order.
https://review.coreboot.org/c/coreboot/+/78889/comment/90881efc_a0fee3ff : PS1, Line 104: size_t stm_psd_size = 0; I feel like the following is more readable but this is totally optional. ``` size_t size = smm_runtime.save_state_size;
if (cpu > smm_runtime.num_cpus) return NULL;
if (CONFIG(STM)) size += ALIGN_UP(sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR), 0x100);
return (void *)(smm_runtime.save_state_top[cpu] - size); ```
https://review.coreboot.org/c/coreboot/+/78889/comment/e96af259_d2e9f932 : PS1, Line 111: 0x100); It should fit on one line. The coding style states 96 columns.