From 57f360f2615818366b39ff21fcd0201154be4ab2 Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Fri, 22 Nov 2013 06:15:51 +0000 Subject: 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 Reviewed-by: Liming Gao Reviewed-by: Jiewen Yao Reviewed-by: Ruiyu Ni git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14884 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 28 ++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'MdeModulePkg/Core/DxeIplPeim/Ia32') 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.
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
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); @@ -182,6 +184,30 @@ HandOffToDxeCore ( TopOfStack ); } 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. -- cgit v1.2.3