From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.31049.1612168137199680526 for ; Mon, 01 Feb 2021 00:28:57 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: yun.lou@intel.com) IronPort-SDR: AUKjw0CS/raERLugmBRFClVxIUCmgbZkeGmhxchsO8cWeNVhT7l5Od1oOEvh1YlCHGPagfKspm 3d/y/Jo0STwQ== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="180727021" X-IronPort-AV: E=Sophos;i="5.79,391,1602572400"; d="scan'208";a="180727021" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 00:28:55 -0800 IronPort-SDR: taw7J5Co8WV3+ui0tNOuTbVz+8ZM07YHSzTDVgsETKTrNwjrDLaKbHhn5BfXM5AusdjERZER0F QMBDBbnh5Zkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,391,1602572400"; d="scan'208";a="390805149" Received: from shwdeopenlab102.ccr.corp.intel.com ([10.239.183.61]) by orsmga008.jf.intel.com with ESMTP; 01 Feb 2021 00:28:54 -0800 From: "Jason Lou" To: devel@edk2.groups.io Cc: Jason , Ray Ni , Eric Dong , Laszlo Ersek , Rahul Kumar Subject: [PATCH v1 1/1] UefiCpuPkg/CpuCacheInfoLib: Support no enabled AP case in DxeLib Date: Mon, 1 Feb 2021 16:28:50 +0800 Message-Id: <20210201082850.5357-1-yun.lou@intel.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3195 Support system has no enabled AP case in DxeCpuCacheInfoLib. Otherwise, if the system only has 1 BSP without any enabled AP, UEFI POST hangs when invoking StartupAllAPs protocol because EFI_NOT_STARTED is returned. Signed-off-by: Jason Lou Cc: Ray Ni Cc: Eric Dong Cc: Laszlo Ersek Cc: Rahul Kumar --- UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c b/Uefi= CpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c index bb788e36146b..d810294e2120 100644 --- a/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c +++ b/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.c @@ -51,6 +51,13 @@ CpuCacheInfoStartupAllCPUs ( EFI_STATUS Status;=0D =0D Status =3D MpServices.Protocol->StartupAllAPs (MpServices.Protocol, Proc= edure, FALSE, NULL, 0, ProcedureArgument, NULL);=0D + if (Status =3D=3D EFI_NOT_STARTED) {=0D + //=0D + // EFI_NOT_STARTED is returned when there is no enabled AP.=0D + // Treat this case as EFI_SUCCESS.=0D + //=0D + Status =3D EFI_SUCCESS;=0D + }=0D ASSERT_EFI_ERROR (Status);=0D =0D Procedure (ProcedureArgument);=0D --=20 2.28.0.windows.1