services from the SMM Services Table (gSmst) as opposed to
relying on Boot Services.
Cc: Liming Gao
Cc: Jiaxin Wu
Cc: Ray Ni
Cc: Ard Biesheuvel
Cc: Sami Mujawar
Signed-off-by: Yuanhao Xie
Reviewed-by: Jiaxin Wu
Reviewed-by: Ray Ni
---
MdeModulePkg/MdeModulePkg.dsc
Lockbox Driver in an upcoming patch
Cc: Liming Gao
Cc: Jiaxin Wu
Cc: Ray Ni
Cc: Ard Biesheuvel
Cc: Sami Mujawar
Signed-off-by: Yuanhao Xie
Reviewed-by: Jiaxin Wu
Reviewed-by: Ray Ni
---
MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c | 361
tocol installation signifies
to the DXE driver that the LockBox API is ready for use.
Cc: Liming Gao
Cc: Jiaxin Wu
Cc: Ray Ni
Cc: Ard Biesheuvel
Cc: Sami Mujawar
Reviewed-by: Jiaxin Wu
Signed-off-by: Yuanhao Xie
---
StandaloneMmPkg/Library/SmmLockBoxMmDependency/SmmLockBoxMmDependency.c
This patch adds a Standalone MM Lockbox Driver
xieyuanh (3):
StandaloneMmPkg: Add LockBox Dependency DXE Driver
MdeModulePkg: Refactors SmmLockBox.c.
MdeModulePkg: Add Standalone MM Lockbox Driver.
MdeModulePkg/MdeModulePkg.dsc |
1 +
MdeModul
This patch fixes an error in calculating cache sizes for cores from
different Dies. The original code incorrectly cleared cache sizes for
different core types during intermediate calculation steps, leading to
mistakes in counting duplicate entries. This patch adds a check for
cache size to distingu
This patch fixes an error in calculating cache sizes for cores from
different Dies. The original code incorrectly cleared cache sizes for
different core types during intermediate calculation steps, leading to
mistakes in counting duplicate entries. This patch adds a check for
cache size to distingu
This patch fixes an error in calculating cache sizes for cores from
different Dies. The original code incorrectly cleared cache sizes for
different core types during intermediate calculation steps, leading to
mistakes in counting duplicate entries. This patch adds a check for
cache size to distingu
This patch fixes an error in calculating cache sizes for cores from
different Dies. The original code incorrectly cleared cache sizes for
different core types during intermediate calculation steps, leading to
mistakes in counting duplicate entries. This patch adds a check for
cache size to distingu
services from the SMM Services Table (gSmst) as opposed to
relying on Boot Services.
Cc: Liming Gao
Cc: Jiaxin Wu
Cc: Ray Ni
Signed-off-by: Yuanhao Xie
---
MdeModulePkg/MdeModulePkg.dsc | 1
+
MdeModulePkg/Universal/LockBox/SmmLockBox
Lockbox Driver in an upcoming patch
Cc: Liming Gao
Cc: Jiaxin Wu
Cc: Ray Ni
Signed-off-by: Yuanhao Xie
---
MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c | 361
tocol installation signifies
to the DXE driver that the LockBox API is ready for use.
Cc: Liming Gao
Cc: Jiaxin Wu
Cc: Ray Ni
Signed-off-by: Yuanhao Xie
---
StandaloneMmPkg/Library/SmmLockBoxMmDependency/SmmLockBoxMmDependency.c
The Lockbox Driver allows sensitive data to be securely stored in a
designated area, thus protected against unauthorized access.
This patch adds a Standalone MM Lockbox Driver with main modifications
xieyuanh (3):
StandaloneMmPkg: Add LockBox Dependency DXE Driver
MdeModulePkg: Refactors SmmLo
Declares in the .inf file that the current component is an MM_STANDALONE
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Jiaxin Wu
Reviewed-by: Jiaxin Wu
---
UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf | 4 ++--
1 file changed, 2 insertions
Declares in the .inf file that the current component is an MM_STANDALONE
xieyuanh (1):
UefiCpuPkg/SmmCpuSyncLib: Add MM_STANDALONE tag.
UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.39.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Ok!
From: Ni, Ray
Sent: Thursday, April 25, 2024 1:54 PM
To: Xie, Yuanhao ; devel@edk2.groups.io
Cc: Dong, Eric ; Kumar, Rahul R ;
Gerd Hoffmann ; Wu, Jiaxin
Subject: Re: [PATCH 1/1] UefiCpuPkg/SmmCpuSyncLib: Add MM_STANDALONE tag.
-# Copyright (c) 2023, Intel Corporation. All rights reserved
Declares in the .inf file that the current component is an MM_STANDALONE
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Jiaxin Wu
---
UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
Declares in the .inf file that the current component is an MM_STANDALONE
xieyuanh (1):
UefiCpuPkg/SmmCpuSyncLib: Add MM_STANDALONE tag.
UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
base-commit: 86c8d69146310f24069701053a27153ae5
Hi Ray,
It means that:
The "SmmCpuRendezvous" function has a bug in that it summons all APs into SMM,
but there is a time gap before they are set as "present." During this window,
if using the "setVariable" operation, it can cause issues because "setVariable"
requires all APs to be in SMM and m
SMM read save state requires AP must be present.
This patch aim to avoid the AP not ready for save state check.
Furthermore, SmmWaitForApArrival has two callers: SmmCpuRendezvous and
BSPHandler, the behavior of the two callers can be consistent by add
the while loop to check the present of the APs
Hi Ray,
In V4, the GetMicrocodePathInfoFromHob() removal is in patch 1 instead of the
patch 3.
Comments of MTRRs syncing is a updated.
Thanks
Yuanhao
-Original Message-
From: Ni, Ray
Sent: Thursday, November 23, 2023 9:18 AM
To: Xie, Yuanhao ; devel@edk2.groups.io
Cc: Dong, Eric ; Kuma
Hi Ray,
In v4, DEBUG_CODE_BEGIN/END() from DumpMicrocodeRevision() is removed, and
calling is updated as:
DEBUG_CODE (
DumpMicrocodeRevision ();
);
Thanks a lot for the feedback!
Regards,
Yunahao
-Original Message-
From: Ni, Ray
Sent: Thursday, November 23, 2023 9:24 AM
To: Xie, Y
ding in DXE.
On 11/21/23 08:39, Yuanhao Xie wrote:
> The DXE stage's Microcode loading process has been elimincated by:
>
> 1. Microcode HOB consumption in MP initialization within the DXE phase.
> 2. Restricting MicrocodeDetect to the PEI phase instead of DXE for BSP.
&g
There is no functional changes, only extract DumpMicrocodeRevision since
only in PEI BSP will detect, apply microcode, and APs will sync
microcode.
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Cc: Laszlo Ersek
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib
Store BSP's MTRR setting only when CpuCount>1.
Reviewed-by: Ray Ni
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Cc: Laszlo Ersek
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff
ff-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib/Microcode.c | 46
--
UefiCpuPkg/Library/MpInitLib/MpLib.c | 39
---
UefiCpuPkg/Library/MpInitLib/MpLib.h | 21 -
3 files changed, 24 inser
The DXE stage's Microcode loading process has been eliminated.
Store BSP's MTRR setting only when CpuCount>1.
Extract Dump Microcode Revision as a function
Compare with V3, this version updates the comments,
Move GetMicrocodePatchInfoFromHob removal from patch 3 to patch 1
on
xieyuanh (3):
Uefi
There is no functional changes, only extract DumpMicrocodeRevision since
only in PEI BSP will detect, apply microcode, and APs will sync
microcode.
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Cc: Laszlo Ersek
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib
Store BSP's MTRR setting only when CpuCount>1.
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Cc: Laszlo Ersek
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/UefiCpuPkg
MTRR table to the AP is always essential.
During the DXE phase, it cannot be omitted like loading microcode,
as the PEI and DXE may be in different bit modes.
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Cc: Laszlo Ersek
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpIn
The DXE stage's Microcode loading process has been eliminated.
Store BSP's MTRR setting only when CpuCount>1.
Compare with V2, V3 also Extract Dump Microcode Revision as function
xieyuanh (3):
UefiCpuPkg/MpInitLib: Eliminate redundant microcode loading in DXE.
UefiCpuPkg/MpInitLib: Store MTRRs
ng no longer a part of this process.
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Cc: Laszlo Ersek
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 54
+++---
1 file changed, 35 insertions(+), 19 deletions(-)
, with the ultimate goal of eliminating the
microcode loading functionality for the second time Mp initialization.
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Cc: Laszlo Ersek
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 +++-
1 file changed, 3 insertions
loading functionality for the second time Mp initialization
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Cc: Laszlo Ersek
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/UefiCpuPkg
The DXE stage's Microcode loading process has been elimincated.
Compare to V1, V2 seperates the patches and adds more comments
xieyuanh (3):
UefiCpuPkg/MpInitLib:Repeat WakeUpAp of loading microcode,Syncing
MTRR.
UefiCpuPkg/MpInitLib: Detect microcode and store MTRR when CpuCount >
1
.
This patch deletes the unnecessary comments in CpuMpData, since
CpuMpData is no longer responsible for passing information from PEI to
DXE.
Signed-off-by: Yuanhao Xie
Cc: Laszlo Ersek ler...@redhat.com
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/MpInitLib
From: Yuanhao Xie
This patch synchronizes the No-Execute bit in the IA32_EFER
register for the APs before the RestoreVolatileRegisters operation.
The commit 964a4f0, titled "Eliminate the second INIT-SIPI-SIPI
sequence," replaces the second INIT-SIPI-SIPI sequence with the BSP
c
code.
It updated the structure comments compared with V6.
Yuanhao Xie (1):
UefiCpuPkg/MpInitLib: Enable execute disable bit.
xieyuanh (1):
UefiCpuPkg/MpInitLib: Update the comments of _CPU_MP_DATA.
UefiCpuPkg/Library/MpInitLib/MpEqu.inc | 2 ++
UefiCpuPkg/Library/MpInitLib/MpLib.c | 14
.
This patch deletes the unnecessary comments in CpuMpData, since
CpuMpData is no longer responsible for passing information from PEI to
DXE.
Signed-off-by: Yuanhao Xie
Cc: Laszlo Ersek ler...@redhat.com
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/MpInitLib
code.
It updated the structure comments compared with V6.
Yuanhao Xie (1):
UefiCpuPkg/MpInitLib: Enable execute disable bit.
xieyuanh (1):
UefiCpuPkg/MpInitLib: Update the comments of _CPU_MP_DATA.
UefiCpuPkg/Library/MpInitLib/MpEqu.inc | 2 ++
UefiCpuPkg/Library/MpInitLib/MpLib.c | 14
From: Yuanhao Xie
This patch synchronizes the No-Execute bit in the IA32_EFER
register for the APs before the RestoreVolatileRegisters operation.
The commit 964a4f0, titled "Eliminate the second INIT-SIPI-SIPI
sequence," replaces the second INIT-SIPI-SIPI sequence with the BSP
c
Hi Ray and Laszlo,
Thanks a lot for the feedbacks.
Please have a review on the patch v6 which:
-Kept execute disable bit both in MpExchangeInfo and CpuMpData.
-Added another patch in which I updated the comments of CpuMpData.
Regards
Yuanhao Xie
-Original Message-
From: Laszlo Ersek
.
Signed-off-by: Yuanhao Xie
Cc: Laszlo Ersek ler...@redhat.com
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/MpInitLib/MpLib.h | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h
b/UefiCpuPkg/Library
From: Yuanhao Xie
This patch synchronizes the No-Execute bit in the IA32_EFER
register for the APs before the RestoreVolatileRegisters operation.
The commit 964a4f0, titled "Eliminate the second INIT-SIPI-SIPI
sequence," replaces the second INIT-SIPI-SIPI sequence with the BSP
c
code.
It also fixed the build error in V5.
Yuanhao Xie (1):
UefiCpuPkg/MpInitLib: Enable execute disable bit.
xieyuanh (1):
UefiCpuPkg/MpInitLib: Update the comments of _CPU_MP_DATA.
UefiCpuPkg/Library/MpInitLib/MpLib.c | 14 +++---
UefiCpuPkg/Library/MpInitLib/MpLib.h | 7 ++-
2
code.
Yuanhao Xie (1):
UefiCpuPkg/MpInitLib: Enable execute disable bit.
xieyuanh (1):
UefiCpuPkg/MpInitLib: Update the comments of _CPU_MP_DATA.
UefiCpuPkg/Library/MpInitLib/MpLib.c | 14 +++---
UefiCpuPkg/Library/MpInitLib/MpLib.h | 7 ++-
2 files changed, 17 insertions(+), 4
From: Yuanhao Xie
This patch synchronizes the No-Execute bit in the IA32_EFER
register for the APs before the RestoreVolatileRegisters operation.
The commit 964a4f0, titled "Eliminate the second INIT-SIPI-SIPI
sequence," replaces the second INIT-SIPI-SIPI sequence with the BSP
c
.
Signed-off-by: Yuanhao Xie
Cc: Laszlo Ersek ler...@redhat.com
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/MpInitLib/MpLib.h | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h
b/UefiCpuPkg/Library
: Yuanhao Xie yuanhao@intel.com
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 57 +++-
1 file changed, 40 insertions(+), 17 deletions(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 9a6ec5db5c..1c68c803d9 100644
--- a
Hi Gerd,
In v4 , InterlockedIncrement called is after RestoreVolatileRegisters to ensure
that "finished" reporting from the APs is as
later as possible.
Here is V3:
GetProcessorNumber (CpuMpData, &ProcessorNumber);
- RestoreVolatileRegisters (&CpuMpData->CpuData[0].VolatileRegisters, FALSE);
From: Yuanhao Xie
This patch synchronizes the No-Execute bit in the IA32_EFER
register for the APs before the RestoreVolatileRegisters operation.
The commit 964a4f0, titled "Eliminate the second INIT-SIPI-SIPI
sequence," replaces the second INIT-SIPI-SIPI sequence with the BSP
c
From: Yuanhao Xie
This patch synchronizes the No-Execute bit in the IA32_EFER
register for the APs before the RestoreVolatileRegisters operation.
The commit 964a4f0, titled "Eliminate the second INIT-SIPI-SIPI
sequence," replaces the second INIT-SIPI-SIPI sequence with the BSP
c
SMM read save state requires AP must be present.
This patch aim to avoid the AP not ready for save state check.
Signed-off-by: Zhihao Li
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c | 25 +
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmC
From: Yuanhao Xie
This patch synchronizes the No-Execute bit in the IA32_EFER
register for the APs before the RestoreVolatileRegisters operation.
The commit 964a4f0, titled "Eliminate the second INIT-SIPI-SIPI
sequence," replaces the second INIT-SIPI-SIPI sequence with the BSP
c
From: Yuanhao Xie
This patch synchronizes the No-Execute bit in the IA32_EFER
register for the APs before the RestoreVolatileRegisters operation.
The commit 964a4f0, titled "Eliminate the second INIT-SIPI-SIPI
sequence," replaces the second INIT-SIPI-SIPI sequence with the BSP
c
From: YuanhaoXie
SmmCpuRendezvous has a issue in that it summons all APs
into SMM, but there is a time gap before they are set as "present."
During this window, if using the "setVariable" operation,
it can cause issues since "setVariable" requires all APs to be in SMM
and marked as "present."
Th
[edk2-devel] [PATCH] UefiCpuPkg: Remove ASSERT checking if
FinishedCount equal to CpuCount-1
On 10/25/23 12:07, Yuanhao Xie wrote:
> The purpose is to fix an assertion with applying the following patch
> series:
>
> UefiCpuPkg: Refactor the logic for placing APs in HltLoop.
> UefiCpuPkg: Re
s in the triggering of the assertion.
Solution:
Instead of assertion, use while loop to waits until all the APs have
incremented the FinishedCount.
Fixes: 964a4f032dcd
Signed-off-by: Yuanhao Xie
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 9
: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 6f1456cfe1..9a6ec5db5c
have
incremented the FinishedCount.
Cc: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c
b/UefiCpuPkg
.
Reviewed-by: Eric Dong
Cc: Chasel Chiu
Cc: Nate DeSimone
Cc: Isaac Oram
Cc: Liming Gao
Cc: Eric Dong
Signed-off-by: Yuanhao Xie
---
Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/Platform/Intel
1MB
Yuanhao,
On 10/19/23 05:20, Yuanhao Xie wrote:
> With the fact that CSM is not supported, the request is to remove the
> cache setting for memory under 1MB.
> This can be treated as the missing part of legacy CSM deprecation.
>
> This patch only set the 0 to 9 and C to
: Chasel Chiu
Cc: Nate DeSimone
Cc: Isaac Oram
Cc: Liming Gao
Cc: Eric Dong
Signed-off-by: Yuanhao Xie
---
Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/Platform/Intel/MinPlatformPkg/Library
: Chasel Chiu
M: Nate DeSimone
M: Isaac Oram
R: Liming Gao
R: Eric Dong
Signed-off-by: Yuanhao Xie
---
Platform/Intel/MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/Platform/Intel/MinPlatformPkg/Library
This change does not introduce any functional modifications.
Remove the unused mValidMtrrAddressMask and mValidMtrrBitsMask.
Reviewed-by: Ray Ni
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ray Ni
---
UefiCpuPkg/CpuDxe/CpuDxe.c | 16 +++-
1
This change does not introduce any functional modifications.
Remove the unused mValidMtrrAddressMask and mValidMtrrBitsMask.
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ray Ni
---
UefiCpuPkg/CpuDxe/CpuDxe.c | 17 -
1 file changed, 8
This change does not introduce any functional modifications.
Recover the modification that was accidentally performanced during
cherry-pick commit 1f78add.
1. Remove the unused variable.
2. reinstate the comment message.
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Tom Lendacky
Signed-off-by: Yuanhao Xie
---
UefiCpuPkg/Library/MpInitLib/MpHandOff.h | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpHandOff.h
b/UefiCpuPkg/Library/MpInitLib/MpHandOff.h
index 83e4055ec9
From: Ray Ni
Old implementation of RefreshMemoryAttributesFromMtrr directly
retrieves the MTRR register content and applies the MTRR cache type
to GCD database following the precedence order defined by SDM.
The code can updated to simply get all the memory cache types for all
memory through newl
Add Unit test of trrGetMemoryAttributesInMtrrSettings and
MtrrSetMemoryAttributesInMtrrSettings.
Signed-off-by: Ray Ni
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c | 36
Improve MtrrDebugPrintAllMtrrsWorker by making use of
MtrrGetMemoryAttributesInMtrrSettings.
Signed-off-by: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 45
++---
1 file changed, 10 insertions(+), 35
MtrrGetMemoryAttributesInMtrrSettings parses the MTRR settings
either from hardware or from the parameter and returns an
array containing the memory cache types of all memory addresses.
This API could elinimate the needs of following APIs:
1. MtrrGetMemoryAttributeInVariableMtr
2. MtrrGetFixedMtrr
From: Ray Ni
Update APIs related to set memory attributes to handle the fixed MTRR
is not always supported.
There are 3 APIs in MtrrLib that can set memory attributes:
1. MtrrSetMemoryAttributesInMtrrSettings
2. MtrrSetMemoryAttributeInMtrrSettings
3. MtrrSetMemoryAttribute
The general idea app
Update UnitTestMtrrSetAllMtrrs() for the case that fixed MtrrLib
is not always supported.
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ray Ni
---
UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c | 35
---
1 file changed
From: Ray Ni
Update MtrrSetAllMtrrs to not access fixed MTRRs if CPU doesn't
support them.
Signed-off-by: Ray Ni
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Include/Library/MtrrLib.h | 9 ++---
UefiCpuPkg/Library/MtrrLib/MtrrLib.c
UnitTestMtrrGetFixedMtrr updated for the case that fixed MtrrLib
is not always supported.
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ray Ni
---
UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c | 13 +
1 file changed, 13 insertions
IsMtrrSupported() return true when either fixed mtrr supported or
variable mtrr suppored. In this case, rather than checking whether
MTRR is supported or not, we should specifically check for fixed MTRR
support.
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc
Update UnitTestMtrrGetAllMtrrs() for the case that fixed MtrrLib
is not always supported
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ray Ni
---
UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c | 99
the portion exceeding the maximum number remains uninitialized.
Signed-off-by: Ray Ni
Signed-off-by: Yuanhao Xie
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 30 ++
1 file changed, 22 insertions(+), 8 deletions
From: Ray Ni
Signed-off-by: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c | 43
---
UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c | 24
+++-
2 files change
Update UnitTestMtrrGetDefaultMemoryType for the case the when Fixed
MTRRs are not supported.
The original implementation returns FALSE when either fixed MTRR isn't
supported or the number of variable MTRRs is 0. The correct behavior
should return FALSE only when both fixed MTRR isn't supported and
Update UnitTestGetFirmwareVariableMtrrCount for the case the when
Fixed MTRRs are not supported.
The original implementation returns FALSE when either fixed MTRR isn't
supported or the number of variable MTRRs is 0. The correct behavior
should return FALSE only when both fixed MTRR isn't supported
The previous implementation returns FALSE if either fixed MTRR is
unsupported or the number of variable MTRRs is 0. The correct behavior
is to return FALSE only when both fixed MTRR is unsupported and the
number of variable MTRRs is 0.
Signed-off-by: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Ger
From: Ray Ni
Add internal function MtrrLibIsMtrrSupported and
update IsMtrrSupported to call the new internal function.
Signed-off-by: Ray Ni
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 83
+
Update MtrrLib modules to handle the absense of Fixed MTRRs
Update unit test of Update for the absense of Fixed MTRRs
Ray Ni (6):
UefiCpuPkg/MtrrLib: Add internal function MtrrLibIsMtrrSupported.
UefiCpuPkg/MtrrUnitTest: Update test to cover no-fixed-mtrr cases.
UefiCpuPkg/MtrrLib: Fix MtrrG
Disable PcdFirstTimeWakeUpAPsBySipi for IntelTdx, Microvm, and Xen to
preserve the original execution of INIT-SIPI-SIPI.
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc: Jordan Justen
Signed-off-by: Yuanhao Xie
---
OvmfPkg/IntelTdx
Deactivate PcdFirstTimeWakeUpAPsBySipi for AMD SEV and SNP to preserve
the original execution of INIT-SIPI-SIPI.
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc: Jordan Justen
Signed-off-by: Yuanhao Xie
---
OvmfPkg/AmdSev/AmdSevX64.dsc | 7
: Gerd Hoffmann
Signed-off-by: Ray Ni
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index e7054adbcc
Disable PcdFirstTimeWakeUpAPsBySipi for OVMF to let BSP wake up APs by
INIT-SIPI-SIPI.
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc: Jordan Justen
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
OvmfPkg/OvmfPkgIa32.dsc| 9
Add PcdFirstTimeWakeUpAPsBySipi to check if it is in the OVMF environment
and necessary to wake up APs by INIT-SIPI-SIPI.
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 1
From: Yuanhao Xie
Add new API SendStartupIpiAllExcludingSelf(), and modify
SendInitSipiSipiAllExcludingSelf() by let it call the new API.
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ray Ni
Signed-off-by: Ray Ni
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
UefiCpuPkg
minimal self-configuration,
then wait for SIPI from the BSP processor
Yuanhao Xie (1):
UefiCpuPkg: Add SendStartupIpiAllExcludingSelf
YuanhaoXie (3):
UefiCpuPkg: Add PcdFirstTimeWakeUpAPsBySipi
OvmfPkg: Disable PcdFirstTimeWakeUpAPsBySipi.
UefiCpuPkg:Wake up APs after power-up or RESET
: Gerd Hoffmann
Signed-off-by: Ray Ni
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index e7054adbcc
Disable PcdFirstTimeWakeUpAPsBySipi for OVMF to let BSP wake up APs by
INIT-SIPI-SIPI.
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc: Jordan Justen
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
OvmfPkg/OvmfPkgIa32.dsc| 10
Add PcdFirstTimeWakeUpAPsBySipi to check if it is in the OVMF environment
and necessary to wake up APs by INIT-SIPI-SIPI.
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 1
From: Yuanhao Xie
Add new API SendStartupIpiAllExcludingSelf(), and modify
SendInitSipiSipiAllExcludingSelf() by let it call the new API.
Cc: Eric Dong
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ray Ni
Signed-off-by: Ray Ni
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
UefiCpuPkg
minimal self-configuration,
then wait for SIPI from the BSP processor.
Yuanhao Xie (1):
UefiCpuPkg: Add SendStartupIpiAllExcludingSelf
YuanhaoXie (3):
UefiCpuPkg: Add PcdFirstTimeWakeUpAPsBySipi
OvmfPkg: Disable PcdFirstTimeWakeUpAPsBySipi.
UefiCpuPkg:Wake up APs after power-up or RESET
TimeWakeUpAPsBySipi for OVMF to let BSP wake up APs by
INIT-SIPI-SIPI.
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc: Jordan Justen
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
OvmfPkg/OvmfPkgIa32.dsc| 9 -
OvmfPkg
: Gerd Hoffmann
Signed-off-by: Ray Ni
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index e7054adbcc
Disable PcdFirstTimeWakeUpAPsBySipi for OVMF to let BSP wake up APs by
INIT-SIPI-SIPI.
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc: Jordan Justen
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
OvmfPkg/OvmfPkgIa32.dsc| 9
Add PcdFirstTimeWakeUpAPsBySipi to check if it is in the OVMF environment
and necessary to wake up APs by INIT-SIPI-SIPI.
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Signed-off-by: Yuanhao Xie
Reviewed-by: Ray Ni
---
UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 1
1 - 100 of 249 matches
Mail list logo