[edk2-devel][PATCH v4 0/8] Support PEI 64bit in IntelFsp2Pkg and IntelFsp2WrapperPkg

Kuo, Ted posted 8 patches 2 years ago
Failed in applying to current master (apply log)
There is a newer version of this series
IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c   |   1 +
IntelFsp2Pkg/FspSecCore/Fsp22SecCoreS.inf          |   8 +-
IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf            |   9 +-
IntelFsp2Pkg/FspSecCore/FspSecCoreS.inf            |   8 +-
IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf            |  10 +-
.../FspSecCore/Ia32/FspApiEntryCommon.nasm         |   4 +-
IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm     |  30 +-
IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm     |  96 +++-
IntelFsp2Pkg/FspSecCore/Ia32/ReadEsp.nasm          |   8 +-
IntelFsp2Pkg/FspSecCore/Ia32/Stack.nasm            |  10 +-
IntelFsp2Pkg/FspSecCore/SecFsp.c                   |  10 +-
IntelFsp2Pkg/FspSecCore/SecFsp.h                   |   2 +-
IntelFsp2Pkg/FspSecCore/SecFspApiChk.c             |   8 +-
IntelFsp2Pkg/FspSecCore/SecMain.c                  |   8 +-
IntelFsp2Pkg/FspSecCore/SecMain.h                  |  18 +-
IntelFsp2Pkg/FspSecCore/X64/Fsp22ApiEntryS.nasm    | 103 +++++
IntelFsp2Pkg/FspSecCore/X64/FspApiEntryCommon.nasm |  76 ++++
IntelFsp2Pkg/FspSecCore/X64/FspApiEntryM.nasm      | 262 +++++++++++
IntelFsp2Pkg/FspSecCore/X64/FspApiEntryS.nasm      |  67 +++
IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm      | 495 +++++++++++++++++++++
IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm         |  34 ++
IntelFsp2Pkg/FspSecCore/X64/MicrocodeLoadNasm.inc  |  11 +
IntelFsp2Pkg/FspSecCore/X64/ReadRsp.nasm           |  22 +
IntelFsp2Pkg/FspSecCore/X64/Stack.nasm             |  73 +++
IntelFsp2Pkg/Include/FspEas/FspApi.h               | 145 +++++-
IntelFsp2Pkg/Include/FspGlobalData.h               |  51 ++-
IntelFsp2Pkg/Include/Guid/FspHeaderFile.h          |  14 +-
IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc     | 284 ++++++++++++
IntelFsp2Pkg/IntelFsp2Pkg.dsc                      |   2 +-
.../Library/BaseFspCommonLib/FspCommonLib.c        |   4 +-
.../BaseFspSwitchStackLib/FspSwitchStackLib.c      |   1 +
.../Library/BaseFspSwitchStackLib/X64/Stack.nasm   |   5 +-
.../SecFspSecPlatformLibNull/Ia32/Flat32.nasm      |   2 +-
.../SecFspSecPlatformLibNull.inf                   |   6 +-
.../SecFspSecPlatformLibNull/X64/Long64.nasm       |  31 ++
.../SecFspSecPlatformLibNull/X64/SecCarInit.nasm   |  40 ++
IntelFsp2Pkg/Tools/GenCfgOpt.py                    |   4 +-
.../FspmWrapperPeim/FspmWrapperPeim.c              |  25 +-
.../BaseFspWrapperApiLib/FspWrapperApiLib.c        |  42 +-
.../BaseFspWrapperApiLib/IA32/DispatchExecute.c    |  21 +
.../BaseFspWrapperApiLib/X64/DispatchExecute.c     |  45 +-
.../{Ia32 => }/Fsp.h                               |   0
.../Ia32/Stack.nasm                                |   6 +-
.../SecFspWrapperPlatformSecLibSample.inf          |   7 +-
.../SecRamInitData.c                               |  22 +-
.../X64/PeiCoreEntry.nasm                          | 149 +++++++
.../X64/SecEntry.nasm                              | 171 +++++++
.../X64/Stack.nasm                                 |  73 +++
48 files changed, 2413 insertions(+), 110 deletions(-)
create mode 100644 IntelFsp2Pkg/FspSecCore/X64/Fsp22ApiEntryS.nasm
create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryCommon.nasm
create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryM.nasm
create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryS.nasm
create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm
create mode 100644 IntelFsp2Pkg/FspSecCore/X64/MicrocodeLoadNasm.inc
create mode 100644 IntelFsp2Pkg/FspSecCore/X64/ReadRsp.nasm
create mode 100644 IntelFsp2Pkg/FspSecCore/X64/Stack.nasm
create mode 100644 IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc
create mode 100644 IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/X64/Long64.nasm
create mode 100644 IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/X64/SecCarInit.nasm
rename IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/{Ia32 => }/Fsp.h (100%)
create mode 100644 IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/X64/PeiCoreEntry.nasm
create mode 100644 IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/X64/SecEntry.nasm
create mode 100644 IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/X64/Stack.nasm
[edk2-devel][PATCH v4 0/8] Support PEI 64bit in IntelFsp2Pkg and IntelFsp2WrapperPkg
Posted by Kuo, Ted 2 years ago
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3893

Currently PEI drivers/libraries only support 32bit in IntelFsp2Pkg and
IntelFsp2WrapperPkg. The patches below are needed to support these
drivers/libraries in 64bit.

V2 changes:
1.Change FSPM_UPD_COMMON2 to FSPM_UPD_COMMON_FSP24 in FspApiEntryM.nasm.
2.Add FSPx_UPD_COMMON_FSP24 in FspApi.h.
3.Add 3 additional patches for supporting X64 in IntelFsp2WrapperPkg.

V3 changes:
1.Update FSPT_ARCH2_UPD and add FSPT_CORE_UPD back.
2.Use 0xFFFFFFFF instead of MAX_ADDRESS to reflect the default of FspData.
3.Remove EnableMultiPhaseMemoryInit from FSPM_ARCH2_UPD.
4.Bump GenCfgOpt version to 0.57.

V4 changes:
1.Added EFIAPI to SwapStack and PEI_CORE_ENTRY.
2.Cast FspData from pointer to UINTN and then from UINTN to UINT32.
3.Corrected few typos.

Ted Kuo (8):
  IntelFsp2Pkg: X64 compatible changes to support PEI in 64bit
  IntelFsp2Pkg: Add FSPx_ARCH2_UPD support for X64
  IntelFsp2Pkg: Update FSP_GLOBAL_DATA and FSP_PLAT_DATA for X64
  IntelFsp2Pkg: FspSecCore support for X64
  IntelFsp2Pkg: SecFspSecPlatformLibNull support for X64
  IntelFsp2WrapperPkg: Adopt FSPM_UPD_COMMON_FSP24 for X64
  IntelFsp2WrapperPkg: BaseFspWrapperApiLib support for X64
  IntelFsp2WrapperPkg: SecFspWrapperPlatformSecLibSample support for X64

 IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c   |   1 +
 IntelFsp2Pkg/FspSecCore/Fsp22SecCoreS.inf          |   8 +-
 IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf            |   9 +-
 IntelFsp2Pkg/FspSecCore/FspSecCoreS.inf            |   8 +-
 IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf            |  10 +-
 .../FspSecCore/Ia32/FspApiEntryCommon.nasm         |   4 +-
 IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm     |  30 +-
 IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm     |  96 +++-
 IntelFsp2Pkg/FspSecCore/Ia32/ReadEsp.nasm          |   8 +-
 IntelFsp2Pkg/FspSecCore/Ia32/Stack.nasm            |  10 +-
 IntelFsp2Pkg/FspSecCore/SecFsp.c                   |  10 +-
 IntelFsp2Pkg/FspSecCore/SecFsp.h                   |   2 +-
 IntelFsp2Pkg/FspSecCore/SecFspApiChk.c             |   8 +-
 IntelFsp2Pkg/FspSecCore/SecMain.c                  |   8 +-
 IntelFsp2Pkg/FspSecCore/SecMain.h                  |  18 +-
 IntelFsp2Pkg/FspSecCore/X64/Fsp22ApiEntryS.nasm    | 103 +++++
 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryCommon.nasm |  76 ++++
 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryM.nasm      | 262 +++++++++++
 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryS.nasm      |  67 +++
 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm      | 495 +++++++++++++++++++++
 IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm         |  34 ++
 IntelFsp2Pkg/FspSecCore/X64/MicrocodeLoadNasm.inc  |  11 +
 IntelFsp2Pkg/FspSecCore/X64/ReadRsp.nasm           |  22 +
 IntelFsp2Pkg/FspSecCore/X64/Stack.nasm             |  73 +++
 IntelFsp2Pkg/Include/FspEas/FspApi.h               | 145 +++++-
 IntelFsp2Pkg/Include/FspGlobalData.h               |  51 ++-
 IntelFsp2Pkg/Include/Guid/FspHeaderFile.h          |  14 +-
 IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc     | 284 ++++++++++++
 IntelFsp2Pkg/IntelFsp2Pkg.dsc                      |   2 +-
 .../Library/BaseFspCommonLib/FspCommonLib.c        |   4 +-
 .../BaseFspSwitchStackLib/FspSwitchStackLib.c      |   1 +
 .../Library/BaseFspSwitchStackLib/X64/Stack.nasm   |   5 +-
 .../SecFspSecPlatformLibNull/Ia32/Flat32.nasm      |   2 +-
 .../SecFspSecPlatformLibNull.inf                   |   6 +-
 .../SecFspSecPlatformLibNull/X64/Long64.nasm       |  31 ++
 .../SecFspSecPlatformLibNull/X64/SecCarInit.nasm   |  40 ++
 IntelFsp2Pkg/Tools/GenCfgOpt.py                    |   4 +-
 .../FspmWrapperPeim/FspmWrapperPeim.c              |  25 +-
 .../BaseFspWrapperApiLib/FspWrapperApiLib.c        |  42 +-
 .../BaseFspWrapperApiLib/IA32/DispatchExecute.c    |  21 +
 .../BaseFspWrapperApiLib/X64/DispatchExecute.c     |  45 +-
 .../{Ia32 => }/Fsp.h                               |   0
 .../Ia32/Stack.nasm                                |   6 +-
 .../SecFspWrapperPlatformSecLibSample.inf          |   7 +-
 .../SecRamInitData.c                               |  22 +-
 .../X64/PeiCoreEntry.nasm                          | 149 +++++++
 .../X64/SecEntry.nasm                              | 171 +++++++
 .../X64/Stack.nasm                                 |  73 +++
 48 files changed, 2413 insertions(+), 110 deletions(-)
 create mode 100644 IntelFsp2Pkg/FspSecCore/X64/Fsp22ApiEntryS.nasm
 create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryCommon.nasm
 create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryM.nasm
 create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryS.nasm
 create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
 create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm
 create mode 100644 IntelFsp2Pkg/FspSecCore/X64/MicrocodeLoadNasm.inc
 create mode 100644 IntelFsp2Pkg/FspSecCore/X64/ReadRsp.nasm
 create mode 100644 IntelFsp2Pkg/FspSecCore/X64/Stack.nasm
 create mode 100644 IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc
 create mode 100644 IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/X64/Long64.nasm
 create mode 100644 IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/X64/SecCarInit.nasm
 rename IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/{Ia32 => }/Fsp.h (100%)
 create mode 100644 IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/X64/PeiCoreEntry.nasm
 create mode 100644 IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/X64/SecEntry.nasm
 create mode 100644 IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/X64/Stack.nasm

-- 
2.16.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88825): https://edk2.groups.io/g/devel/message/88825
Mute This Topic: https://groups.io/mt/90433368/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel][PATCH v4 0/8] Support PEI 64bit in IntelFsp2Pkg and IntelFsp2WrapperPkg
Posted by Chiu, Chasel 2 years ago
Thanks Ted for updating patch!
For this patch series, Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>


> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Kuo,
> Ted
> Sent: Wednesday, April 13, 2022 10:43 AM
> To: devel@edk2.groups.io
> Subject: [edk2-devel][PATCH v4 0/8] Support PEI 64bit in IntelFsp2Pkg and
> IntelFsp2WrapperPkg
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3893
> 
> Currently PEI drivers/libraries only support 32bit in IntelFsp2Pkg and
> IntelFsp2WrapperPkg. The patches below are needed to support these
> drivers/libraries in 64bit.
> 
> V2 changes:
> 1.Change FSPM_UPD_COMMON2 to FSPM_UPD_COMMON_FSP24 in
> FspApiEntryM.nasm.
> 2.Add FSPx_UPD_COMMON_FSP24 in FspApi.h.
> 3.Add 3 additional patches for supporting X64 in IntelFsp2WrapperPkg.
> 
> V3 changes:
> 1.Update FSPT_ARCH2_UPD and add FSPT_CORE_UPD back.
> 2.Use 0xFFFFFFFF instead of MAX_ADDRESS to reflect the default of
> FspData.
> 3.Remove EnableMultiPhaseMemoryInit from FSPM_ARCH2_UPD.
> 4.Bump GenCfgOpt version to 0.57.
> 
> V4 changes:
> 1.Added EFIAPI to SwapStack and PEI_CORE_ENTRY.
> 2.Cast FspData from pointer to UINTN and then from UINTN to UINT32.
> 3.Corrected few typos.
> 
> Ted Kuo (8):
>   IntelFsp2Pkg: X64 compatible changes to support PEI in 64bit
>   IntelFsp2Pkg: Add FSPx_ARCH2_UPD support for X64
>   IntelFsp2Pkg: Update FSP_GLOBAL_DATA and FSP_PLAT_DATA for X64
>   IntelFsp2Pkg: FspSecCore support for X64
>   IntelFsp2Pkg: SecFspSecPlatformLibNull support for X64
>   IntelFsp2WrapperPkg: Adopt FSPM_UPD_COMMON_FSP24 for X64
>   IntelFsp2WrapperPkg: BaseFspWrapperApiLib support for X64
>   IntelFsp2WrapperPkg: SecFspWrapperPlatformSecLibSample support for
> X64
> 
>  IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c   |   1 +
>  IntelFsp2Pkg/FspSecCore/Fsp22SecCoreS.inf          |   8 +-
>  IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf            |   9 +-
>  IntelFsp2Pkg/FspSecCore/FspSecCoreS.inf            |   8 +-
>  IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf            |  10 +-
>  .../FspSecCore/Ia32/FspApiEntryCommon.nasm         |   4 +-
>  IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm     |  30 +-
>  IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm     |  96 +++-
>  IntelFsp2Pkg/FspSecCore/Ia32/ReadEsp.nasm          |   8 +-
>  IntelFsp2Pkg/FspSecCore/Ia32/Stack.nasm            |  10 +-
>  IntelFsp2Pkg/FspSecCore/SecFsp.c                   |  10 +-
>  IntelFsp2Pkg/FspSecCore/SecFsp.h                   |   2 +-
>  IntelFsp2Pkg/FspSecCore/SecFspApiChk.c             |   8 +-
>  IntelFsp2Pkg/FspSecCore/SecMain.c                  |   8 +-
>  IntelFsp2Pkg/FspSecCore/SecMain.h                  |  18 +-
>  IntelFsp2Pkg/FspSecCore/X64/Fsp22ApiEntryS.nasm    | 103 +++++
>  IntelFsp2Pkg/FspSecCore/X64/FspApiEntryCommon.nasm |  76 ++++
>  IntelFsp2Pkg/FspSecCore/X64/FspApiEntryM.nasm      | 262 +++++++++++
>  IntelFsp2Pkg/FspSecCore/X64/FspApiEntryS.nasm      |  67 +++
>  IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm      | 495
> +++++++++++++++++++++
>  IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm         |  34 ++
>  IntelFsp2Pkg/FspSecCore/X64/MicrocodeLoadNasm.inc  |  11 +
>  IntelFsp2Pkg/FspSecCore/X64/ReadRsp.nasm           |  22 +
>  IntelFsp2Pkg/FspSecCore/X64/Stack.nasm             |  73 +++
>  IntelFsp2Pkg/Include/FspEas/FspApi.h               | 145 +++++-
>  IntelFsp2Pkg/Include/FspGlobalData.h               |  51 ++-
>  IntelFsp2Pkg/Include/Guid/FspHeaderFile.h          |  14 +-
>  IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc     | 284 ++++++++++++
>  IntelFsp2Pkg/IntelFsp2Pkg.dsc                      |   2 +-
>  .../Library/BaseFspCommonLib/FspCommonLib.c        |   4 +-
>  .../BaseFspSwitchStackLib/FspSwitchStackLib.c      |   1 +
>  .../Library/BaseFspSwitchStackLib/X64/Stack.nasm   |   5 +-
>  .../SecFspSecPlatformLibNull/Ia32/Flat32.nasm      |   2 +-
>  .../SecFspSecPlatformLibNull.inf                   |   6 +-
>  .../SecFspSecPlatformLibNull/X64/Long64.nasm       |  31 ++
>  .../SecFspSecPlatformLibNull/X64/SecCarInit.nasm   |  40 ++
>  IntelFsp2Pkg/Tools/GenCfgOpt.py                    |   4 +-
>  .../FspmWrapperPeim/FspmWrapperPeim.c              |  25 +-
>  .../BaseFspWrapperApiLib/FspWrapperApiLib.c        |  42 +-
>  .../BaseFspWrapperApiLib/IA32/DispatchExecute.c    |  21 +
>  .../BaseFspWrapperApiLib/X64/DispatchExecute.c     |  45 +-
>  .../{Ia32 => }/Fsp.h                               |   0
>  .../Ia32/Stack.nasm                                |   6 +-
>  .../SecFspWrapperPlatformSecLibSample.inf          |   7 +-
>  .../SecRamInitData.c                               |  22 +-
>  .../X64/PeiCoreEntry.nasm                          | 149 +++++++
>  .../X64/SecEntry.nasm                              | 171 +++++++
>  .../X64/Stack.nasm                                 |  73 +++
>  48 files changed, 2413 insertions(+), 110 deletions(-)  create mode 100644
> IntelFsp2Pkg/FspSecCore/X64/Fsp22ApiEntryS.nasm
>  create mode 100644
> IntelFsp2Pkg/FspSecCore/X64/FspApiEntryCommon.nasm
>  create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryM.nasm
>  create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryS.nasm
>  create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
>  create mode 100644 IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm
>  create mode 100644
> IntelFsp2Pkg/FspSecCore/X64/MicrocodeLoadNasm.inc
>  create mode 100644 IntelFsp2Pkg/FspSecCore/X64/ReadRsp.nasm
>  create mode 100644 IntelFsp2Pkg/FspSecCore/X64/Stack.nasm
>  create mode 100644 IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc
>  create mode 100644
> IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/X64/Long64.nasm
>  create mode 100644
> IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/X64/SecCarInit.nasm
>  rename
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/{Ia32
> => }/Fsp.h (100%)  create mode 100644
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/X64/P
> eiCoreEntry.nasm
>  create mode 100644
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/X64/S
> ecEntry.nasm
>  create mode 100644
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/X64/S
> tack.nasm
> 
> --
> 2.16.2.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88841): https://edk2.groups.io/g/devel/message/88841
Mute This Topic: https://groups.io/mt/90433368/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-