]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/MpInitLib: Relocate microcode patch fields in CPU_MP_DATA
authorHao A Wu <hao.a.wu@intel.com>
Wed, 25 Dec 2019 02:50:19 +0000 (10:50 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 2 Jan 2020 03:10:36 +0000 (03:10 +0000)
The below 2 microcode patch related fields in structure CPU_MP_DATA:

  UINT64                         MicrocodePatchAddress;
  UINT64                         MicrocodePatchRegionSize;

They will be passed from PEI phase and be reused DXE phase.

Previously, these 2 fields were placed after some fields with type
'UINTN', this will lead to different field offset in different
architecture for them.

This commit will move them before the fields with different size in
different architecture to ensure they can be properly used in DXE phase.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
UefiCpuPkg/Library/MpInitLib/MpLib.h

index 885656900c5586287b292b347adf3d26819437c6..5f50e79744cb506bedb834b36b440d39b646feef 100644 (file)
@@ -217,6 +217,8 @@ struct _CPU_MP_DATA {
   UINT64                         CpuInfoInHob;\r
   UINT32                         CpuCount;\r
   UINT32                         BspNumber;\r
   UINT64                         CpuInfoInHob;\r
   UINT32                         CpuCount;\r
   UINT32                         BspNumber;\r
+  UINT64                         MicrocodePatchAddress;\r
+  UINT64                         MicrocodePatchRegionSize;\r
   //\r
   // The above fields data will be passed from PEI to DXE\r
   // Please make sure the fields offset same in the different\r
   //\r
   // The above fields data will be passed from PEI to DXE\r
   // Please make sure the fields offset same in the different\r
@@ -260,8 +262,6 @@ struct _CPU_MP_DATA {
   UINT8                          Vector;\r
   BOOLEAN                        PeriodicMode;\r
   BOOLEAN                        TimerInterruptState;\r
   UINT8                          Vector;\r
   BOOLEAN                        PeriodicMode;\r
   BOOLEAN                        TimerInterruptState;\r
-  UINT64                         MicrocodePatchAddress;\r
-  UINT64                         MicrocodePatchRegionSize;\r
 \r
   UINT32                         ProcessorSignature;\r
   UINT32                         ProcessorFlags;\r
 \r
   UINT32                         ProcessorSignature;\r
   UINT32                         ProcessorFlags;\r