audk/OvmfPkg/SmmAccess
Laszlo Ersek 6812bb7bb5 OvmfPkg/SmmAccess: support extended TSEG size
In SmmAccessPeiEntryPoint(), map TSEG megabyte counts different from 1, 2
and 8 to the MCH_ESMRAMC_TSEG_EXT bit pattern (introduced in the previous
patch), for the ESMRAMC.TSEG_SZ bit-field register. (Suggested by Jordan.)

In SmramAccessGetCapabilities() -- backing both
PEI_SMM_ACCESS_PPI.GetCapabilities() and
EFI_SMM_ACCESS2_PROTOCOL.GetCapabilities() --, map the
MCH_ESMRAMC_TSEG_EXT bit pattern found in the ESMRAMC.TSEG_SZ bit-field
register to a byte count of (mQ35TsegMbytes * SIZE_1MB).

(MCH_ESMRAMC_TSEG_EXT is the only possible pattern if none of
MCH_ESMRAMC_TSEG_1MB, MCH_ESMRAMC_TSEG_2MB, and MCH_ESMRAMC_TSEG_8MB
match.)

The new code paths are not exercised just yet; for that, PlatformPei is
going to have to set PcdQ35TsegMbytes (and consequently, SmramInternal's
"mQ35TsegMbytes") to a value different from 1, 2, and 8.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-07-05 22:29:23 +02:00
..
SmmAccess2Dxe.c OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamic 2017-07-05 22:25:03 +02:00
SmmAccess2Dxe.inf OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamic 2017-07-05 22:25:03 +02:00
SmmAccessPei.c OvmfPkg/SmmAccess: support extended TSEG size 2017-07-05 22:29:23 +02:00
SmmAccessPei.inf OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamic 2017-07-05 22:25:03 +02:00
SmramInternal.c OvmfPkg/SmmAccess: support extended TSEG size 2017-07-05 22:29:23 +02:00
SmramInternal.h OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamic 2017-07-05 22:25:03 +02:00