Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable mm #159

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Enable mm #159

wants to merge 8 commits into from

Conversation

jiaxinwu
Copy link
Member

No description provided.

@jiaxinwu jiaxinwu marked this pull request as draft June 22, 2024 07:03
@jiaxinwu jiaxinwu marked this pull request as ready for review June 24, 2024 00:38
@jiaxinwu jiaxinwu marked this pull request as draft June 24, 2024 00:38
@jiaxinwu jiaxinwu force-pushed the Enable_MM branch 5 times, most recently from d28c888 to 42e51e9 Compare June 26, 2024 09:10
Force PE/COFF sections to be aligned at 4KB boundaries
to support MemoryAttribute table.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
This patch changes below dynamic PCD to fixed PCD for MM_STANDALONE:
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Enable PcdRestartMmDispatcherOnceMmEntryRegistered PCD

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Add PcdStandaloneMmEnable feature PCD, default set to FALSE.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Include required StandaloneMm drivers under
PcdStandaloneMmEnable PCD.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Include required StandaloneMm Drivers and Libs under
PcdStandaloneMmEnable PCD.

Change the PcdStandaloneMmEnable to TRUE to enable
the MM on QSP.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
@jiaxinwu jiaxinwu force-pushed the Enable_MM branch 2 times, most recently from 98818c3 to ebd866e Compare August 7, 2024 02:11
Add PcdCpuSmmProfileEnable & PcdCpuSmmRestrictedMemoryAccess for
the SmmProfile enable/disable control for QSP.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
The instructions in BaseMemoryLibRepStr could potentially
trigger multiple #PF (Page Faults) before the Debug Trap
handler is invoked if the size of the memory being copied
exceeds 8KB. This would result in the number of recorded
old entries bigger than the MAX_PF_ENTRY_COUNT limit of
10. The relevant instructions are:
    mov     rcx, r8
    and     r8, 7
    shr     rcx, 3
    rep     movsq

To prevent this issue, override the BaseMemoryLib with
BaseMemoryLibSse2 when the SMM profile is enabled. This
change avoids the use of the "rep movsq" instruction, which
is the source of the problem.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant