]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuMpPei: Add CodeSegment and DataSegment fields
authorJeff Fan <jeff.fan@intel.com>
Mon, 11 Jul 2016 05:08:06 +0000 (13:08 +0800)
committerJeff Fan <jeff.fan@intel.com>
Thu, 14 Jul 2016 01:33:24 +0000 (09:33 +0800)
Added CodeSegment and DataSegment fields in MP_CPU_EXCHANGE_INFO. They are set
to the values of current BSP's CS and DS.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Giri Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
UefiCpuPkg/CpuMpPei/CpuMpPei.c
UefiCpuPkg/CpuMpPei/CpuMpPei.h
UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
UefiCpuPkg/CpuMpPei/X64/MpEqu.inc

index bccff24cc1920d514775fbbbe15eb5ea09b5232c..9b602a190631935050fad188895e31b254aa1a34 100644 (file)
@@ -455,6 +455,8 @@ WakeUpAP (
   ExchangeInfo->PmodeOffset        = PeiCpuMpData->AddressMap.PModeEntryOffset;\r
   ExchangeInfo->LmodeOffset        = PeiCpuMpData->AddressMap.LModeEntryOffset;\r
   ExchangeInfo->Cr3                = AsmReadCr3 ();\r
+  ExchangeInfo->CodeSegment        = AsmReadCs ();\r
+  ExchangeInfo->DataSegment        = AsmReadDs ();\r
   ExchangeInfo->CFunction          = (UINTN) ApCFunction;\r
   ExchangeInfo->NumApsExecuting    = 0;\r
   ExchangeInfo->PeiCpuMpData       = PeiCpuMpData;\r
index 5e56934a27b761fc2a691b25eae127fbb325f9c2..4c114decb6c66f1e2916a97bb93033400ef2c01f 100644 (file)
@@ -119,6 +119,8 @@ typedef struct {
   UINTN                 BufferStart;\r
   UINTN                 PmodeOffset;\r
   UINTN                 NumApsExecuting;\r
+  UINTN                 CodeSegment;\r
+  UINTN                 DataSegment;\r
   UINTN                 LmodeOffset;\r
   UINTN                 Cr3;\r
   PEI_CPU_MP_DATA       *PeiCpuMpData;\r
index fc637cc70f9ff94a032a9044da0642e8bec3912b..a88185ed087c9fa9948475f69645e24ac463c816 100644 (file)
@@ -1,5 +1,5 @@
 ;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 ; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
@@ -37,4 +37,6 @@ IdtrLocation                  equ        LockLocation + 16h
 BufferStartLocation           equ        LockLocation + 1Ch\r
 PmodeOffsetLocation           equ        LockLocation + 20h\r
 NumApsExecutingLoction        equ        LockLocation + 24h\r
+CodeSegmentLocation           equ        LockLocation + 28h\r
+DataSegmentLocation           equ        LockLocation + 2Ch\r
 \r
index ab851cf3e7fbb29628f634b393f61d8cf43b3a0a..30c7f6110b6ed62194d82861e3cf3e900078062d 100644 (file)
@@ -1,5 +1,5 @@
 ;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 ; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
@@ -39,7 +39,9 @@ IdtrLocation                  equ        LockLocation + 2Ah
 BufferStartLocation           equ        LockLocation + 34h\r
 PmodeOffsetLocation           equ        LockLocation + 3Ch\r
 NumApsExecutingLoction        equ        LockLocation + 44h\r
-LmodeOffsetLocation           equ        LockLocation + 4Ch\r
-Cr3Location                   equ        LockLocation + 54h\r
+CodeSegmentLocation           equ        LockLocation + 4Ch\r
+DataSegmentLocation           equ        LockLocation + 54h\r
+LmodeOffsetLocation           equ        LockLocation + 5Ch\r
+Cr3Location                   equ        LockLocation + 64h\r
 \r
 ;-------------------------------------------------------------------------------\r