From nobody Sat Nov 2 10:25:21 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 14927546709741018.8732410208951; Thu, 20 Apr 2017 23:04:30 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 699842195407F; Thu, 20 Apr 2017 23:04:27 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B3E752195406F for ; Thu, 20 Apr 2017 23:04:25 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2017 23:04:25 -0700 Received: from jfan12-desk.ccr.corp.intel.com ([10.239.158.57]) by orsmga001.jf.intel.com with ESMTP; 20 Apr 2017 23:04:24 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,228,1488873600"; d="scan'208";a="1122014267" From: Jeff Fan To: edk2-devel@lists.01.org Date: Fri, 21 Apr 2017 14:04:17 +0800 Message-Id: <20170421060418.12732-2-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20170421060418.12732-1-jeff.fan@intel.com> References: <20170421060418.12732-1-jeff.fan@intel.com> Subject: [edk2] [PATCH 1/2] UefiCpuPkg/MpInitLib: save/restore original contents X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Kinney , Feng Tian MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" If APs is in HLT-LOOP mode, we need AP reset vector for waking up APs. This updating is to save/restore original contents of AP reset vector around wak= ing up APs always. https://bugzilla.tianocore.org/show_bug.cgi?id=3D500 Cc: Feng Tian Cc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/Library/MpInitLib/PeiMpLib.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c b/UefiCpuPkg/Library/M= pInitLib/PeiMpLib.c index fb1d48f..5ce5788 100644 --- a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c @@ -1,7 +1,7 @@ /** @file MP initialize support functions for PEI phase. =20 - Copyright (c) 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -129,10 +129,8 @@ CpuMpEndOfPeiCallback ( } Hob.Raw =3D GET_NEXT_HOB (Hob); } - } else { - CpuMpData->SaveRestoreFlag =3D TRUE; - RestoreWakeupBuffer (CpuMpData); } + return EFI_SUCCESS; } =20 @@ -286,12 +284,8 @@ AllocateResetVector ( CpuMpData->WakeupBuffer =3D GetWakeupBuffer (ApResetVectorSize); CpuMpData->MpCpuExchangeInfo =3D (MP_CPU_EXCHANGE_INFO *) (UINTN) (CpuMpData->WakeupBuffer + CpuMpData->AddressMap.Rende= zvousFunnelSize); - BackupAndPrepareWakeupBuffer (CpuMpData); - } - - if (CpuMpData->SaveRestoreFlag) { - BackupAndPrepareWakeupBuffer (CpuMpData); } + BackupAndPrepareWakeupBuffer (CpuMpData); } =20 /** @@ -304,9 +298,7 @@ FreeResetVector ( IN CPU_MP_DATA *CpuMpData ) { - if (CpuMpData->SaveRestoreFlag) { - RestoreWakeupBuffer (CpuMpData); - } + RestoreWakeupBuffer (CpuMpData); } =20 /** --=20 2.9.3.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel