[edk2-devel] [PATCH v3 0/3] Simplify InitializeSeparateExceptionStacks

2022-08-08 Thread Zhiguang Liu
The patch set is to hide the exception implementation details, 
so that caller don't need to know anything about IDT when separate stack
for it. However, this patch set changes a library API, so I have to
change multiple packages inside one patch. Otherwise, I can make sure
every single commit can build and boot fine. If anyone has good idea to
separate the first big patch, please tell me. Thanks in advance.

V2:
Add another patch to Simplify the CPU_EXCEPTION_INIT_DATA definition 
Keep the memory layout picture in CpuExceptionHandlerLib.
Fix some code and comment issue according to Ray's comment

V3:
Change the code behavior when the needed size is zero: skip instead of assert
Fix the bug that treating the TSS as part of GDT
Reorder the modification in the patch set.
Code can be seen at https://github.com/tianocore/edk2/pull/3124

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Rahul Kumar 
Cc: Leif Lindholm 
Cc: Dandan Bi 
Cc: Liming Gao 
Cc: Jian J Wang 
Cc: Ard Biesheuvel 
Cc: Sami Mujawar 
Signed-off-by: Zhiguang Liu 

Zhiguang Liu (3):
  UefiCpuPkg: Simplify InitializeSeparateExceptionStacks
  MdeModulePkg: Move CPU_EXCEPTION_INIT_DATA to UefiCpuPkg
  UefiCpuPkg: Simplify the struct definition of CPU_EXCEPTION_INIT_DATA

 .../Library/ArmExceptionLib/ArmExceptionLib.c |  15 +-
 MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c   |   4 +-
 .../Include/Library/CpuExceptionHandlerLib.h  |  82 +---
 .../CpuExceptionHandlerLibNull.c  |  15 +-
 UefiCpuPkg/CpuDxe/CpuMp.c | 162 
 UefiCpuPkg/CpuMpPei/CpuMpPei.c| 176 --
 .../CpuExceptionCommon.h  |  57 +-
 .../CpuExceptionHandlerLib/DxeException.c | 112 ---
 .../Ia32/ArchExceptionHandler.c   |  71 ---
 .../CpuExceptionHandlerLib/PeiCpuException.c  |  94 +-
 .../PeiCpuExceptionHandlerLib.inf |   4 +-
 .../SecPeiCpuException.c  |  15 +-
 .../CpuExceptionHandlerLib/SmmException.c |  15 +-
 .../X64/ArchExceptionHandler.c|  67 ---
 14 files changed, 411 insertions(+), 478 deletions(-)

-- 
2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92226): https://edk2.groups.io/g/devel/message/92226
Mute This Topic: https://groups.io/mt/92907048/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/3] Simplify InitializeSeparateExceptionStacks

2022-08-08 Thread Ni, Ray
Reviewed-by: Ray Ni 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of
> Zhiguang Liu
> Sent: Tuesday, August 9, 2022 9:26 AM
> To: devel@edk2.groups.io
> Cc: Liu, Zhiguang ; Dong, Eric
> ; Ni, Ray ; Kumar, Rahul R
> ; Leif Lindholm ; Bi,
> Dandan ; Gao, Liming ;
> Wang, Jian J ; Ard Biesheuvel
> ; Sami Mujawar 
> Subject: [edk2-devel] [PATCH v3 0/3] Simplify
> InitializeSeparateExceptionStacks
> 
> The patch set is to hide the exception implementation details,
> so that caller don't need to know anything about IDT when separate stack
> for it. However, this patch set changes a library API, so I have to
> change multiple packages inside one patch. Otherwise, I can make sure
> every single commit can build and boot fine. If anyone has good idea to
> separate the first big patch, please tell me. Thanks in advance.
> 
> V2:
> Add another patch to Simplify the CPU_EXCEPTION_INIT_DATA definition
> Keep the memory layout picture in CpuExceptionHandlerLib.
> Fix some code and comment issue according to Ray's comment
> 
> V3:
> Change the code behavior when the needed size is zero: skip instead of
> assert
> Fix the bug that treating the TSS as part of GDT
> Reorder the modification in the patch set.
> Code can be seen at https://github.com/tianocore/edk2/pull/3124
> 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Cc: Rahul Kumar 
> Cc: Leif Lindholm 
> Cc: Dandan Bi 
> Cc: Liming Gao 
> Cc: Jian J Wang 
> Cc: Ard Biesheuvel 
> Cc: Sami Mujawar 
> Signed-off-by: Zhiguang Liu 
> 
> Zhiguang Liu (3):
>   UefiCpuPkg: Simplify InitializeSeparateExceptionStacks
>   MdeModulePkg: Move CPU_EXCEPTION_INIT_DATA to UefiCpuPkg
>   UefiCpuPkg: Simplify the struct definition of CPU_EXCEPTION_INIT_DATA
> 
>  .../Library/ArmExceptionLib/ArmExceptionLib.c |  15 +-
>  MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c   |   4 +-
>  .../Include/Library/CpuExceptionHandlerLib.h  |  82 +---
>  .../CpuExceptionHandlerLibNull.c  |  15 +-
>  UefiCpuPkg/CpuDxe/CpuMp.c | 162 
>  UefiCpuPkg/CpuMpPei/CpuMpPei.c| 176 --
>  .../CpuExceptionCommon.h  |  57 +-
>  .../CpuExceptionHandlerLib/DxeException.c | 112 ---
>  .../Ia32/ArchExceptionHandler.c   |  71 ---
>  .../CpuExceptionHandlerLib/PeiCpuException.c  |  94 +-
>  .../PeiCpuExceptionHandlerLib.inf |   4 +-
>  .../SecPeiCpuException.c  |  15 +-
>  .../CpuExceptionHandlerLib/SmmException.c |  15 +-
>  .../X64/ArchExceptionHandler.c|  67 ---
>  14 files changed, 411 insertions(+), 478 deletions(-)
> 
> --
> 2.31.1.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92231): https://edk2.groups.io/g/devel/message/92231
Mute This Topic: https://groups.io/mt/92907048/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-