coreboot-kgpe-d16/Documentation
Rocky Phagura afb7a81478 cpu/x86/smm: Introduce SMM module loader version 2
Xeon-SP Skylake Scalable Processor can have 36 CPU threads (18 cores).
Current coreboot SMM is unable to handle more than ~32 CPU threads.
This patch introduces a version 2 of the SMM module loader which
addresses this problem. Having two versions of the SMM module loader
prevents any issues to current projects. Future Xeon-SP products will
be using this version of the SMM loader.  Subsequent patches will
enable board specific functionality for Xeon-SP.

The reason for moving to version 2 is the state save area begins to
encroach upon the SMI handling code when more than 32 CPU threads are
in the system. This can cause system hangs, reboots, etc. The second
change is related to staggered entry points with simple near jumps. In
the current loader, near jumps will not work because the CPU is jumping
within the same code segment. In version 2, "far" address jumps are
necessary therefore protected mode must be enabled first. The SMM
layout and how the CPUs are staggered are documented in the code.

By making the modifications above, this allows the smm module loader to
expand easily as more CPU threads are added.

TEST=build for Tiogapass platform under OCP mainboard. Enable the
following in Kconfig.
        select CPU_INTEL_COMMON_SMM
        select SOC_INTEL_COMMON_BLOCK_SMM
        select SMM_TSEG
        select HAVE_SMI_HANDLER
        select ACPI_INTEL_HARDWARE_SLEEP_VALUES

Debug console will show all 36 cores relocated. Further tested by
generating SMI's to port 0xb2 using XDP/ITP HW debugger and ensured all
cores entering and exiting SMM properly. In addition, booted to Linux
5.4 kernel and observed no issues during mp init.

Change-Id: I00a23a5f2a46110536c344254868390dbb71854c
Signed-off-by: Rocky Phagura <rphagura@fb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43684
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-15 02:16:32 +00:00
..
Intel mb,soc/intel: Rename acpi_fill_in_fadt() to acpi_fill_fadt() 2020-06-07 21:45:45 +00:00
RFC
_static
acpi Documentation/acpi: Fix the path to variants/hatch/overridetree.cb 2020-05-26 14:58:35 +00:00
arch arch/x86/postcar: Add x86_64 support 2020-08-14 17:55:26 +00:00
community
contributing documentation: Add documentation ideas for season of docs 2020-05-01 13:47:06 +00:00
doxygen
drivers Documentation: Add documentation for drivers/intel/dptf chip driver 2020-07-18 16:05:43 +00:00
flash_tutorial Documentation: Use inline code block for kernel parameter 2020-02-19 12:09:53 +00:00
getting_started doc/getting_started: update name of file generated by "make savedefconfig" 2020-07-29 09:36:33 +00:00
gfx drivers/intel/gma: Add override for presence straps 2020-05-20 23:38:05 +00:00
ifdtool Documentation: ifdtool/layout: use real table for FD regions 2020-02-17 20:08:41 +00:00
lib fw_config: Add firmware configuration interface 2020-06-02 16:40:04 +00:00
mainboard doc/mb/ocp: update Delta Lake documentation 2020-08-14 09:07:32 +00:00
northbridge Documentation: Add tutorial for me_cleaner on Lenovo devices 2020-03-02 11:39:05 +00:00
releases cpu/x86/smm: Introduce SMM module loader version 2 2020-08-15 02:16:32 +00:00
security cpu/x86/smm: Add helper functions to verify SMM access 2020-06-17 09:17:56 +00:00
soc soc/intel/common/basecode: Implement CSE update flow 2020-07-26 21:42:06 +00:00
superio superio/nuvoton/nct5539d: Update documentation and remove DSDT 2020-03-11 15:03:39 +00:00
technotes Documentation/tutorial: Add tutorial for writing unit tests 2020-05-30 08:46:59 +00:00
tutorial Doc/tutorial/part1.md: Show how to list toolchain targets 2020-07-22 04:56:25 +00:00
vendorcode Documentation/vendorcode/eltan: Update security document 2020-01-30 13:28:24 +00:00
AMD-S3.txt
COPYING
Doxyfile.coreboot
Doxyfile.coreboot_simple
Makefile
Makefile.sphinx Documentation: Add several fixes 2020-07-01 21:51:26 +00:00
POSTCODES
beginverbatim.tex
cbfs.txt
codeflow.svg
coding_style.md
conf.py Documentation: Fix sphinx configuration 2020-08-04 12:18:29 +00:00
corebootBuildingGuide.tex
coreboot_logo.png
distributions.md
endverbatim.tex
gcov.txt
hypertransport.svg
index.md documentation: Add documentation ideas for season of docs 2020-05-01 13:47:06 +00:00
mainboard_io_trap_handler_sample.c ACPI GNVS: Replace uses of smm_get_gnvs() 2020-07-01 05:14:24 +00:00
payloads.md Documentation: Add Heads to payloads 2020-03-02 11:39:16 +00:00
util.md Doc,util: Update list of utilities 2020-04-20 06:55:49 +00:00