Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37392 )
Change subject: cpu/x86/smm/smm_stub: Add x86_64 support ......................................................................
Patch Set 6:
Patch Set 6:
Did a closer review and realized that this patch will break STM support.
If you turn on the STM, the build should fail because start32_offset is missing. The STM initialization functions use this value to create the entry point to start the SMI handler in 32-bit mode.
Secondly, the tss segment selector (0x20) has to be there because when the STM starts the SMI handler VM, the VMX startup checks the TSS selector for proper values. Without it, the VM start will fail with an invalid guest state error.
Thanks for the indepth review! Yes, there are lot of missing features. As there's no support for running on real hardware yet (or platforms supporting STM), this can be fixed in a later commit. First of all a wrapper around FSP has to be written to enable support on those platforms.