From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A186F1A1E59 for ; Fri, 9 Sep 2016 01:00:12 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP; 09 Sep 2016 01:00:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,304,1470726000"; d="scan'208";a="6363230" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.9.5]) by fmsmga006.fm.intel.com with ESMTP; 09 Sep 2016 01:00:10 -0700 From: Jeff Fan To: edk2-devel@lists.01.org Cc: Michael Kinney , Feng Tian , Giri P Mudusuru Date: Fri, 9 Sep 2016 15:59:28 +0800 Message-Id: <20160909075933.14320-3-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20160909075933.14320-1-jeff.fan@intel.com> References: <20160909075933.14320-1-jeff.fan@intel.com> Subject: [Patch 2/7] UefiCpuPkg/CpuMpPei: Add parameter BistInformationSize X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2016 08:00:12 -0000 Add one OPTIONAL parameter BistInformationSize for GetBistInfoFromPpi(). Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/CpuMpPei/CpuBist.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/UefiCpuPkg/CpuMpPei/CpuBist.c b/UefiCpuPkg/CpuMpPei/CpuBist.c index 641eb10..dae7d78 100644 --- a/UefiCpuPkg/CpuMpPei/CpuBist.c +++ b/UefiCpuPkg/CpuMpPei/CpuBist.c @@ -84,6 +84,7 @@ SecPlatformInformation2 ( @param PpiDescriptor Return a pointer to instance of the EFI_PEI_PPI_DESCRIPTOR @param BistInformationData Pointer to BIST information data + @param BistInformationSize Return the size in bytes of BIST information @retval EFI_SUCCESS Retrieve of the BIST data successfully @retval EFI_NOT_FOUND No sec platform information(2) ppi export @@ -95,7 +96,8 @@ GetBistInfoFromPpi ( IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_GUID *Guid, OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, - OUT VOID **BistInformationData + OUT VOID **BistInformationData, + OUT UINT64 *BistInformationSize OPTIONAL ) { EFI_STATUS Status; @@ -140,6 +142,9 @@ GetBistInfoFromPpi ( ); if (Status == EFI_SUCCESS) { *BistInformationData = SecPlatformInformation2; + if (BistInformationSize != NULL) { + *BistInformationSize = InformationSize; + } return EFI_SUCCESS; } } @@ -191,7 +196,8 @@ CollectBistDataFromPpi ( PeiServices, &gEfiSecPlatformInformation2PpiGuid, &SecInformationDescriptor, - (VOID *) &SecPlatformInformation2 + (VOID *) &SecPlatformInformation2, + NULL ); if (Status == EFI_SUCCESS) { // @@ -207,7 +213,8 @@ CollectBistDataFromPpi ( PeiServices, &gEfiSecPlatformInformationPpiGuid, &SecInformationDescriptor, - (VOID *) &SecPlatformInformation + (VOID *) &SecPlatformInformation, + NULL ); if (Status == EFI_SUCCESS) { NumberOfData = 1; -- 2.9.3.windows.2