[PATCH 5/5] CpuException: Add InitializeSeparateExceptionStacks


Ni, Ray
 

Today InitializeCpuExceptionHandlersEx is called from three modules:
1. DxeCore (links to DxeCpuExceptionHandlerLib)
DxeCore expects it initializes the IDT entries as well as
assigning separate stacks for #DF and #PF.
2. CpuMpPei (links to PeiCpuExceptionHandlerLib)
and CpuDxe (links to DxeCpuExceptionHandlerLib)
It's called for each thread for only assigning separate stacks for
#DF and #PF. The IDT entries initialization is skipped because
caller sets InitData->X64.InitDefaultHandlers to FALSE.

Additionally, SecPeiCpuExceptionHandlerLib, SmmCpuExceptionHandlerLib
also implement such API and the behavior of the API is simply to initialize
IDT entries only.

Because it mixes the IDT entries initialization and separate stacks
assignment for certain exception handlers together, in order to know
whether the function call only initializes IDT entries, or assigns stacks,
we need to check:
1. value of InitData->X64.InitDefaultHandlers
2. library instance

This patch cleans up the code to separate the stack assignment to a new API:
InitializeSeparateExceptionStacks().

Only when caller calls the new API, the separate stacks are assigned.
With this change, the SecPei and Smm instance can return unsupported which
gives caller a very clear status.

The old API InitializeCpuExceptionHandlersEx() is removed in this patch.
Because no platform module is consuming the old API, the impact is none.

Signed-off-by: Ray Ni <ray.ni@...>
Cc: Eric Dong <eric.dong@...>
Cc: Jian J Wang <jian.j.wang@...>
---
MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 2 +-
.../Include/Library/CpuExceptionHandlerLib.h | 24 ++---
.../CpuExceptionHandlerLibNull.c | 26 ++----
UefiCpuPkg/CpuDxe/CpuMp.c | 6 +-
UefiCpuPkg/CpuMpPei/CpuMpPei.c | 4 +-
.../CpuExceptionHandlerLib/DxeException.c | 91 ++++++-------------
.../CpuExceptionHandlerLib/PeiCpuException.c | 51 ++---------
.../SecPeiCpuException.c | 27 ++----
.../CpuExceptionHandlerLib/SmmException.c | 27 ++----
9 files changed, 74 insertions(+), 184 deletions(-)

diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dx=
e/DxeMain/DxeMain.c
index 2c27fc0695..83f49d7c00 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -253,7 +253,7 @@ DxeMain (
VectorInfoList =3D (EFI_VECTOR_HANDOFF_INFO *)(GET_GUID_HOB_DATA (Guid=
Hob));=0D
}=0D
=0D
- Status =3D InitializeCpuExceptionHandlersEx (VectorInfoList, NULL);=0D
+ Status =3D InitializeCpuExceptionHandlers (VectorInfoList);=0D
ASSERT_EFI_ERROR (Status);=0D
=0D
//=0D
diff --git a/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h b/MdeMod=
ulePkg/Include/Library/CpuExceptionHandlerLib.h
index d4649bebe1..9a495081f7 100644
--- a/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h
+++ b/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h
@@ -103,32 +103,20 @@ InitializeCpuExceptionHandlers (
);=0D
=0D
/**=0D
- Initializes all CPU exceptions entries with optional extra initializatio=
ns.=0D
+ Setup separate stacks for certain exception handlers.=0D
=0D
- By default, this method should include all functionalities implemented b=
y=0D
- InitializeCpuExceptionHandlers(), plus extra initialization works, if an=
y.=0D
- This could be done by calling InitializeCpuExceptionHandlers() directly=
=0D
- in this method besides the extra works.=0D
+ InitData is optional and processor arch dependent.=0D
=0D
- InitData is optional and its use and content are processor arch dependen=
t.=0D
- The typical usage of it is to convey resources which have to be reserved=
=0D
- elsewhere and are necessary for the extra initializations of exception.=
=0D
+ @param[in] InitData Pointer to data optional for information about=
how=0D
+ to assign stacks for certain exception handler=
s.=0D
=0D
- @param[in] VectorInfo Pointer to reserved vector list.=0D
- @param[in] InitData Pointer to data optional for extra initializat=
ions=0D
- of exception.=0D
-=0D
- @retval EFI_SUCCESS The exceptions have been successfully=0D
- initialized.=0D
- @retval EFI_INVALID_PARAMETER VectorInfo or InitData contains invalid=
=0D
- content.=0D
+ @retval EFI_SUCCESS The stacks are assigned successfully.=0D
@retval EFI_UNSUPPORTED This function is not supported.=0D
=0D
**/=0D
EFI_STATUS=0D
EFIAPI=0D
-InitializeCpuExceptionHandlersEx (=0D
- IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,=0D
+InitializeSeparateExceptionStacks (=0D
IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL=0D
);=0D
=0D
diff --git a/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHa=
ndlerLibNull.c b/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExcepti=
onHandlerLibNull.c
index 54f38788fe..8aeedcb4d1 100644
--- a/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLi=
bNull.c
+++ b/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLi=
bNull.c
@@ -82,34 +82,22 @@ DumpCpuContext (
}=0D
=0D
/**=0D
- Initializes all CPU exceptions entries with optional extra initializatio=
ns.=0D
+ Setup separate stacks for certain exception handlers.=0D
=0D
- By default, this method should include all functionalities implemented b=
y=0D
- InitializeCpuExceptionHandlers(), plus extra initialization works, if an=
y.=0D
- This could be done by calling InitializeCpuExceptionHandlers() directly=
=0D
- in this method besides the extra works.=0D
+ InitData is optional and processor arch dependent.=0D
=0D
- InitData is optional and its use and content are processor arch dependen=
t.=0D
- The typical usage of it is to convey resources which have to be reserved=
=0D
- elsewhere and are necessary for the extra initializations of exception.=
=0D
+ @param[in] InitData Pointer to data optional for information about=
how=0D
+ to assign stacks for certain exception handler=
s.=0D
=0D
- @param[in] VectorInfo Pointer to reserved vector list.=0D
- @param[in] InitData Pointer to data optional for extra initializat=
ions=0D
- of exception.=0D
-=0D
- @retval EFI_SUCCESS The exceptions have been successfully=0D
- initialized.=0D
- @retval EFI_INVALID_PARAMETER VectorInfo or InitData contains invalid=
=0D
- content.=0D
+ @retval EFI_SUCCESS The stacks are assigned successfully.=0D
@retval EFI_UNSUPPORTED This function is not supported.=0D
=0D
**/=0D
EFI_STATUS=0D
EFIAPI=0D
-InitializeCpuExceptionHandlersEx (=0D
- IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,=0D
+InitializeSeparateExceptionStacks (=0D
IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL=0D
)=0D
{=0D
- return InitializeCpuExceptionHandlers (VectorInfo);=0D
+ return EFI_UNSUPPORTED;=0D
}=0D
diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c
index 1f218367b3..e385f585c7 100644
--- a/UefiCpuPkg/CpuDxe/CpuMp.c
+++ b/UefiCpuPkg/CpuDxe/CpuMp.c
@@ -1,7 +1,7 @@
/** @file=0D
CPU DXE Module to produce CPU MP Protocol.=0D
=0D
- Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>=0D
+ Copyright (c) 2008 - 2022, Intel Corporation. All rights reserved.<BR>=0D
SPDX-License-Identifier: BSD-2-Clause-Patent=0D
=0D
**/=0D
@@ -617,7 +617,7 @@ GetGdtr (
/**=0D
Initializes CPU exceptions handlers for the sake of stack switch require=
ment.=0D
=0D
- This function is a wrapper of InitializeCpuExceptionHandlersEx. It's mai=
nly=0D
+ This function is a wrapper of InitializeSeparateExceptionStacks. It's ma=
inly=0D
for the sake of AP's init because of EFI_AP_PROCEDURE API requirement.=0D
=0D
@param[in,out] Buffer The pointer to private data buffer.=0D
@@ -641,7 +641,7 @@ InitializeExceptionStackSwitchHandlers (
AsmReadIdtr (&Idtr);=0D
EssData->Ia32.IdtTable =3D (VOID *)Idtr.Base;=0D
EssData->Ia32.IdtTableSize =3D Idtr.Limit + 1;=0D
- Status =3D InitializeCpuExceptionHandlersEx (NULL, E=
ssData);=0D
+ Status =3D InitializeSeparateExceptionStacks (EssDat=
a);=0D
ASSERT_EFI_ERROR (Status);=0D
}=0D
=0D
diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
index 1e68c91d95..d4786979fa 100644
--- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
+++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
@@ -432,7 +432,7 @@ GetGdtr (
/**=0D
Initializes CPU exceptions handlers for the sake of stack switch require=
ment.=0D
=0D
- This function is a wrapper of InitializeCpuExceptionHandlersEx. It's mai=
nly=0D
+ This function is a wrapper of InitializeSeparateExceptionStacks. It's ma=
inly=0D
for the sake of AP's init because of EFI_AP_PROCEDURE API requirement.=0D
=0D
@param[in,out] Buffer The pointer to private data buffer.=0D
@@ -456,7 +456,7 @@ InitializeExceptionStackSwitchHandlers (
AsmReadIdtr (&Idtr);=0D
EssData->Ia32.IdtTable =3D (VOID *)Idtr.Base;=0D
EssData->Ia32.IdtTableSize =3D Idtr.Limit + 1;=0D
- Status =3D InitializeCpuExceptionHandlersEx (NULL, E=
ssData);=0D
+ Status =3D InitializeSeparateExceptionStacks (EssDat=
a);=0D
ASSERT_EFI_ERROR (Status);=0D
}=0D
=0D
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c b/Uef=
iCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
index c7c1fe31d2..e62bb5e6c0 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
@@ -103,82 +103,49 @@ RegisterCpuInterruptHandler (
}=0D
=0D
/**=0D
- Initializes CPU exceptions entries and setup stack switch for given exce=
ptions.=0D
+ Setup separate stacks for certain exception handlers.=0D
=0D
- This method will call InitializeCpuExceptionHandlers() to setup default=
=0D
- exception handlers unless indicated not to do it explicitly.=0D
+ InitData is optional and processor arch dependent.=0D
=0D
- If InitData is passed with NULL, this method will use the resource reser=
ved=0D
- by global variables to initialize it; Otherwise it will use data in Init=
Data=0D
- to setup stack switch. This is for the different use cases in DxeCore an=
d=0D
- Cpu MP exception initialization.=0D
+ @param[in] InitData Pointer to data optional for information about=
how=0D
+ to assign stacks for certain exception handler=
s.=0D
=0D
- @param[in] VectorInfo Pointer to reserved vector list.=0D
- @param[in] InitData Pointer to data required to setup stack switch=
for=0D
- given exceptions.=0D
-=0D
- @retval EFI_SUCCESS The exceptions have been successfully=0D
- initialized.=0D
- @retval EFI_INVALID_PARAMETER VectorInfo or InitData contains invalid=
=0D
- content.=0D
+ @retval EFI_SUCCESS The stacks are assigned successfully.=0D
+ @retval EFI_UNSUPPORTED This function is not supported.=0D
=0D
**/=0D
EFI_STATUS=0D
EFIAPI=0D
-InitializeCpuExceptionHandlersEx (=0D
- IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,=0D
+InitializeSeparateExceptionStacks (=0D
IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL=0D
)=0D
{=0D
- EFI_STATUS Status;=0D
CPU_EXCEPTION_INIT_DATA EssData;=0D
IA32_DESCRIPTOR Idtr;=0D
IA32_DESCRIPTOR Gdtr;=0D
=0D
- //=0D
- // To avoid repeat initialization of default handlers, the caller should=
pass=0D
- // an extended init data with InitDefaultHandlers set to FALSE. There's =
no=0D
- // need to call this method to just initialize default handlers. Call no=
n-ex=0D
- // version instead; or this method must be implemented as a simple wrapp=
er of=0D
- // non-ex version of it, if this version has to be called.=0D
- //=0D
- if ((InitData =3D=3D NULL) || InitData->X64.InitDefaultHandlers) {=0D
- Status =3D InitializeCpuExceptionHandlers (VectorInfo);=0D
- } else {=0D
- Status =3D EFI_SUCCESS;=0D
- }=0D
-=0D
- if (!EFI_ERROR (Status)) {=0D
- //=0D
- // Initializing stack switch is only necessary for Stack Guard functio=
nality.=0D
- //=0D
- if (PcdGetBool (PcdCpuStackGuard)) {=0D
- if (InitData =3D=3D NULL) {=0D
- SetMem (mNewGdt, sizeof (mNewGdt), 0);=0D
-=0D
- AsmReadIdtr (&Idtr);=0D
- AsmReadGdtr (&Gdtr);=0D
-=0D
- EssData.X64.Revision =3D CPU_EXCEPTION_INIT_DATA=
_REV;=0D
- EssData.X64.KnownGoodStackTop =3D (UINTN)mNewStack + size=
of (mNewStack);=0D
- EssData.X64.KnownGoodStackSize =3D CPU_KNOWN_GOOD_STACK_SI=
ZE;=0D
- EssData.X64.StackSwitchExceptions =3D CPU_STACK_SWITCH_EXCEPT=
ION_LIST;=0D
- EssData.X64.StackSwitchExceptionNumber =3D CPU_STACK_SWITCH_EXCEPT=
ION_NUMBER;=0D
- EssData.X64.IdtTable =3D (VOID *)Idtr.Base;=0D
- EssData.X64.IdtTableSize =3D Idtr.Limit + 1;=0D
- EssData.X64.GdtTable =3D mNewGdt;=0D
- EssData.X64.GdtTableSize =3D sizeof (mNewGdt);=0D
- EssData.X64.ExceptionTssDesc =3D mNewGdt + Gdtr.Limit + =
1;=0D
- EssData.X64.ExceptionTssDescSize =3D CPU_TSS_DESC_SIZE;=0D
- EssData.X64.ExceptionTss =3D mNewGdt + Gdtr.Limit + =
1 + CPU_TSS_DESC_SIZE;=0D
- EssData.X64.ExceptionTssSize =3D CPU_TSS_SIZE;=0D
-=0D
- InitData =3D &EssData;=0D
- }=0D
-=0D
- Status =3D ArchSetupExceptionStack (InitData);=0D
- }=0D
+ if (InitData =3D=3D NULL) {=0D
+ SetMem (mNewGdt, sizeof (mNewGdt), 0);=0D
+=0D
+ AsmReadIdtr (&Idtr);=0D
+ AsmReadGdtr (&Gdtr);=0D
+=0D
+ EssData.X64.Revision =3D CPU_EXCEPTION_INIT_DATA_REV=
;=0D
+ EssData.X64.KnownGoodStackTop =3D (UINTN)mNewStack + sizeof (=
mNewStack);=0D
+ EssData.X64.KnownGoodStackSize =3D CPU_KNOWN_GOOD_STACK_SIZE;=
=0D
+ EssData.X64.StackSwitchExceptions =3D CPU_STACK_SWITCH_EXCEPTION_=
LIST;=0D
+ EssData.X64.StackSwitchExceptionNumber =3D CPU_STACK_SWITCH_EXCEPTION_=
NUMBER;=0D
+ EssData.X64.IdtTable =3D (VOID *)Idtr.Base;=0D
+ EssData.X64.IdtTableSize =3D Idtr.Limit + 1;=0D
+ EssData.X64.GdtTable =3D mNewGdt;=0D
+ EssData.X64.GdtTableSize =3D sizeof (mNewGdt);=0D
+ EssData.X64.ExceptionTssDesc =3D mNewGdt + Gdtr.Limit + 1;=0D
+ EssData.X64.ExceptionTssDescSize =3D CPU_TSS_DESC_SIZE;=0D
+ EssData.X64.ExceptionTss =3D mNewGdt + Gdtr.Limit + 1 + =
CPU_TSS_DESC_SIZE;=0D
+ EssData.X64.ExceptionTssSize =3D CPU_TSS_SIZE;=0D
+=0D
+ InitData =3D &EssData;=0D
}=0D
=0D
- return Status;=0D
+ return ArchSetupExceptionStack (InitData);=0D
}=0D
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c b/=
UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c
index 1ae611c75e..494c2ab433 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c
@@ -150,57 +150,26 @@ InitializeCpuExceptionHandlers (
}=0D
=0D
/**=0D
- Initializes all CPU exceptions entries with optional extra initializatio=
ns.=0D
+ Setup separate stacks for certain exception handlers.=0D
=0D
- By default, this method should include all functionalities implemented b=
y=0D
- InitializeCpuExceptionHandlers(), plus extra initialization works, if an=
y.=0D
- This could be done by calling InitializeCpuExceptionHandlers() directly=
=0D
- in this method besides the extra works.=0D
+ InitData is optional and processor arch dependent.=0D
=0D
- InitData is optional and its use and content are processor arch dependen=
t.=0D
- The typical usage of it is to convey resources which have to be reserved=
=0D
- elsewhere and are necessary for the extra initializations of exception.=
=0D
+ @param[in] InitData Pointer to data optional for information about=
how=0D
+ to assign stacks for certain exception handler=
s.=0D
=0D
- @param[in] VectorInfo Pointer to reserved vector list.=0D
- @param[in] InitData Pointer to data optional for extra initializat=
ions=0D
- of exception.=0D
-=0D
- @retval EFI_SUCCESS The exceptions have been successfully=0D
- initialized.=0D
- @retval EFI_INVALID_PARAMETER VectorInfo or InitData contains invalid=
=0D
- content.=0D
+ @retval EFI_SUCCESS The stacks are assigned successfully.=0D
+ @retval EFI_UNSUPPORTED This function is not supported.=0D
=0D
**/=0D
EFI_STATUS=0D
EFIAPI=0D
-InitializeCpuExceptionHandlersEx (=0D
- IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,=0D
+InitializeSeparateExceptionStacks (=0D
IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL=0D
)=0D
{=0D
- EFI_STATUS Status;=0D
-=0D
- //=0D
- // To avoid repeat initialization of default handlers, the caller should=
pass=0D
- // an extended init data with InitDefaultHandlers set to FALSE. There's =
no=0D
- // need to call this method to just initialize default handlers. Call no=
n-ex=0D
- // version instead; or this method must be implemented as a simple wrapp=
er of=0D
- // non-ex version of it, if this version has to be called.=0D
- //=0D
- if ((InitData =3D=3D NULL) || InitData->Ia32.InitDefaultHandlers) {=0D
- Status =3D InitializeCpuExceptionHandlers (VectorInfo);=0D
- } else {=0D
- Status =3D EFI_SUCCESS;=0D
- }=0D
-=0D
- if (!EFI_ERROR (Status)) {=0D
- //=0D
- // Initializing stack switch is only necessary for Stack Guard functio=
nality.=0D
- //=0D
- if (PcdGetBool (PcdCpuStackGuard) && (InitData !=3D NULL)) {=0D
- Status =3D ArchSetupExceptionStack (InitData);=0D
- }=0D
+ if (InitData =3D=3D NULL) {=0D
+ return EFI_UNSUPPORTED;=0D
}=0D
=0D
- return Status;=0D
+ return ArchSetupExceptionStack (InitData);=0D
}=0D
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c=
b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
index e894ead612..4313cc5582 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
@@ -200,33 +200,22 @@ RegisterCpuInterruptHandler (
}=0D
=0D
/**=0D
- Initializes all CPU exceptions entries with optional extra initializatio=
ns.=0D
+ Setup separate stacks for certain exception handlers.=0D
=0D
- By default, this method should include all functionalities implemented b=
y=0D
- InitializeCpuExceptionHandlers(), plus extra initialization works, if an=
y.=0D
- This could be done by calling InitializeCpuExceptionHandlers() directly=
=0D
- in this method besides the extra works.=0D
+ InitData is optional and processor arch dependent.=0D
=0D
- InitData is optional and its use and content are processor arch dependen=
t.=0D
- The typical usage of it is to convey resources which have to be reserved=
=0D
- elsewhere and are necessary for the extra initializations of exception.=
=0D
+ @param[in] InitData Pointer to data optional for information about=
how=0D
+ to assign stacks for certain exception handler=
s.=0D
=0D
- @param[in] VectorInfo Pointer to reserved vector list.=0D
- @param[in] InitData Pointer to data optional for extra initializat=
ions=0D
- of exception.=0D
-=0D
- @retval EFI_SUCCESS The exceptions have been successfully=0D
- initialized.=0D
- @retval EFI_INVALID_PARAMETER VectorInfo or InitData contains invalid=
=0D
- content.=0D
+ @retval EFI_SUCCESS The stacks are assigned successfully.=0D
+ @retval EFI_UNSUPPORTED This function is not supported.=0D
=0D
**/=0D
EFI_STATUS=0D
EFIAPI=0D
-InitializeCpuExceptionHandlersEx (=0D
- IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,=0D
+InitializeSeparateExceptionStacks (=0D
IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL=0D
)=0D
{=0D
- return InitializeCpuExceptionHandlers (VectorInfo);=0D
+ return EFI_UNSUPPORTED;=0D
}=0D
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c b/Uef=
iCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
index ec643556c7..1c97dab926 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
@@ -96,33 +96,22 @@ RegisterCpuInterruptHandler (
}=0D
=0D
/**=0D
- Initializes all CPU exceptions entries with optional extra initializatio=
ns.=0D
+ Setup separate stacks for certain exception handlers.=0D
=0D
- By default, this method should include all functionalities implemented b=
y=0D
- InitializeCpuExceptionHandlers(), plus extra initialization works, if an=
y.=0D
- This could be done by calling InitializeCpuExceptionHandlers() directly=
=0D
- in this method besides the extra works.=0D
+ InitData is optional and processor arch dependent.=0D
=0D
- InitData is optional and its use and content are processor arch dependen=
t.=0D
- The typical usage of it is to convey resources which have to be reserved=
=0D
- elsewhere and are necessary for the extra initializations of exception.=
=0D
+ @param[in] InitData Pointer to data optional for information about=
how=0D
+ to assign stacks for certain exception handler=
s.=0D
=0D
- @param[in] VectorInfo Pointer to reserved vector list.=0D
- @param[in] InitData Pointer to data optional for extra initializat=
ions=0D
- of exception.=0D
-=0D
- @retval EFI_SUCCESS The exceptions have been successfully=0D
- initialized.=0D
- @retval EFI_INVALID_PARAMETER VectorInfo or InitData contains invalid=
=0D
- content.=0D
+ @retval EFI_SUCCESS The stacks are assigned successfully.=0D
+ @retval EFI_UNSUPPORTED This function is not supported.=0D
=0D
**/=0D
EFI_STATUS=0D
EFIAPI=0D
-InitializeCpuExceptionHandlersEx (=0D
- IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,=0D
+InitializeSeparateExceptionStacks (=0D
IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL=0D
)=0D
{=0D
- return InitializeCpuExceptionHandlers (VectorInfo);=0D
+ return EFI_UNSUPPORTED;=0D
}=0D
--=20
2.35.1.windows.2

Join devel@edk2.groups.io to automatically receive all group messages.