summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/DxeIplPeim
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2013-11-22 06:15:51 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2013-11-22 06:15:51 +0000
commit57f360f2615818366b39ff21fcd0201154be4ab2 (patch)
tree3bfe346a566fb0df56ee4e362c154e02b8eb820b /MdeModulePkg/Core/DxeIplPeim
parentd18b71c1a84d8161c155de88312071020fb669ac (diff)
downloadedk2-platforms-57f360f2615818366b39ff21fcd0201154be4ab2.tar.xz
1. DxeIplPeim will locate Vector Handoff Table PPI and build GUIDed HOB if it has.
2. DxeMain will get Vector Handoff Table GUIDed HOB to install configuration table if it has. 3. Updated CPU Exception Handler Library to provide 3 new APIs to replace original one API and updated NULL instance accordingly. 4. Updated DxeMain/CapsuleX64/BootSriptExectorDxe to use the new API in CPU Exception Handler Lib. Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14884 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/DxeIplPeim')
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeIpl.h3
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf3
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c28
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c37
4 files changed, 63 insertions, 8 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
index 97086345ad..75372ace8d 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
@@ -2,7 +2,7 @@
Master header file for DxeIpl PEIM. All source files in this module should
include this file for common definitions.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -27,6 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Ppi/LoadFile.h>
#include <Ppi/S3Resume2.h>
#include <Ppi/RecoveryModule.h>
+#include <Ppi/VectorHandoffInfo.h>
#include <Guid/MemoryTypeInformation.h>
#include <Guid/MemoryAllocationHob.h>
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
index 986250bdcc..85d0069c2e 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
@@ -5,7 +5,7 @@
# PPI to discover and dispatch the DXE Foundation and components that are
# needed to run the DXE Foundation.
#
-# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -83,6 +83,7 @@
gEfiPeiLoadFilePpiGuid ## CONSUMES
gEfiPeiS3Resume2PpiGuid ## SOMETIMES_CONSUMES(Consumed on S3 boot path)
gEfiPeiRecoveryModulePpiGuid ## SOMETIMES_CONSUMES(Consumed on recovery boot path)
+ gEfiVectorHandoffInfoPpiGuid ## SOMETIMES_CONSUMES
[Guids]
gEfiMemoryTypeInformationGuid ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"
diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
index b121e2439b..38832cc364 100644
--- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
+++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
@@ -1,7 +1,7 @@
/** @file
Ia32-specific functionality for DxeLoad.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -83,6 +83,8 @@ HandOffToDxeCore (
EFI_PHYSICAL_ADDRESS VectorAddress;
UINT32 Index;
X64_IDT_TABLE *IdtTableForX64;
+ EFI_VECTOR_HANDOFF_INFO *VectorInfo;
+ EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;
Status = PeiServicesAllocatePages (EfiBootServicesData, EFI_SIZE_TO_PAGES (STACK_SIZE), &BaseOfStack);
ASSERT_EFI_ERROR (Status);
@@ -183,6 +185,30 @@ HandOffToDxeCore (
);
} else {
//
+ // Get Vector Hand-off Info PPI and build Guided HOB
+ //
+ Status = PeiServicesLocatePpi (
+ &gEfiVectorHandoffInfoPpiGuid,
+ 0,
+ NULL,
+ (VOID **)&VectorHandoffInfoPpi
+ );
+ if (Status == EFI_SUCCESS) {
+ DEBUG ((EFI_D_INFO, "Vector Hand-off Info PPI is gotten, GUIDed HOB is created!\n"));
+ VectorInfo = VectorHandoffInfoPpi->Info;
+ Index = 1;
+ while (VectorInfo->Attribute != EFI_VECTOR_HANDOFF_LAST_ENTRY) {
+ VectorInfo ++;
+ Index ++;
+ }
+ BuildGuidDataHob (
+ &gEfiVectorHandoffInfoPpiGuid,
+ VectorHandoffInfoPpi->Info,
+ sizeof (EFI_VECTOR_HANDOFF_INFO) * Index
+ );
+ }
+
+ //
// Compute the top of the stack we were allocated. Pre-allocate a UINTN
// for safety.
//
diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
index a6e5c28046..88f1f47461 100644
--- a/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
+++ b/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
@@ -1,7 +1,7 @@
/** @file
x64-specifc functionality for DxeLoad.
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -34,10 +34,37 @@ HandOffToDxeCore (
IN EFI_PEI_HOB_POINTERS HobList
)
{
- VOID *BaseOfStack;
- VOID *TopOfStack;
- EFI_STATUS Status;
- UINTN PageTables;
+ VOID *BaseOfStack;
+ VOID *TopOfStack;
+ EFI_STATUS Status;
+ UINTN PageTables;
+ UINT32 Index;
+ EFI_VECTOR_HANDOFF_INFO *VectorInfo;
+ EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;
+
+ //
+ // Get Vector Hand-off Info PPI and build Guided HOB
+ //
+ Status = PeiServicesLocatePpi (
+ &gEfiVectorHandoffInfoPpiGuid,
+ 0,
+ NULL,
+ (VOID **)&VectorHandoffInfoPpi
+ );
+ if (Status == EFI_SUCCESS) {
+ DEBUG ((EFI_D_INFO, "Vector Hand-off Info PPI is gotten, GUIDed HOB is created!\n"));
+ VectorInfo = VectorHandoffInfoPpi->Info;
+ Index = 1;
+ while (VectorInfo->Attribute != EFI_VECTOR_HANDOFF_LAST_ENTRY) {
+ VectorInfo ++;
+ Index ++;
+ }
+ BuildGuidDataHob (
+ &gEfiVectorHandoffInfoPpiGuid,
+ VectorHandoffInfoPpi->Info,
+ sizeof (EFI_VECTOR_HANDOFF_INFO) * Index
+ );
+ }
//
// Allocate 128KB for the Stack