From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.750.1663180847407005135 for ; Wed, 14 Sep 2022 11:40:47 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=iC+YWRee; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: isaac.w.oram@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663180847; x=1694716847; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YdE1ei6sPfjJTI9dxqcjOY2vPClabSFOCnp9wIa3YtA=; b=iC+YWRee235uIUfY+RIbPz+KOa7mTrIjrgkAKn5TWeeBTB5fFbqL8Wr/ tUlQmy4pqycENazmeRFJgsYiTV+ln21yHhvU9F9jKxU9UH+zDNDH+HRNI KI3853vRsAshBU35HZ0xW2ETVLPcv+V526WqLf9liHn7PM5jiSal8kq8y F4rvtuSHO9K8MMGYPdwub8MG3DQiA/6vykFCIfl+bV7uUDCq9FXeGhB6d I5KXtDKLhgLwbSYIFikb3ck9gOMd8J7q+WkTuuPxHAPpbfwvOFO6V0zKd bP+KEi2gguPsDkUEaOeH0uOTu1W3yIVmurfaXa77Tq3mEFGATRGnSGRE3 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10470"; a="324770178" X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="324770178" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 11:40:38 -0700 X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="619414310" Received: from iworam-desk.amr.corp.intel.com ([10.24.80.243]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 11:40:38 -0700 From: "Isaac Oram" To: devel@edk2.groups.io Cc: Isaac Oram , Sai Chaganty , Nate DeSimone , Liming Gao , Chasel Chiu , Eric Dong , Benjamin Doron Subject: [edk2-devel][edk2-platforms][PATCH V1 2/2] MinPlatformPkg/S3: Use EFI_PHYSICAL_ADDRESS for address Date: Wed, 14 Sep 2022 11:40:26 -0700 Message-Id: <20220914184027.1510-3-isaac.w.oram@intel.com> X-Mailer: git-send-email 2.36.1.windows.1 In-Reply-To: <20220914184027.1510-2-isaac.w.oram@intel.com> References: <20220914184027.1510-1-isaac.w.oram@intel.com> <20220914184027.1510-2-isaac.w.oram@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This change fixes build warnings with type casts from some compilers. Also changes type for ACPI_S3_MEMORY S3PeiMemBase to EFI_PHYSICAL_ADDRESS. This generally makes code eaiser to understand as opposed to UINT64. Cc: Sai Chaganty Cc: Nate DeSimone Cc: Liming Gao Cc: Chasel Chiu Cc: Eric Dong Cc: Benjamin Doron Signed-off-by: Isaac Oram --- .../Intel/PowerManagement/S3FeaturePkg/S3Dxe/S3Dxe.c | 10 +++++----- .../Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.c | 2 +- .../Intel/MinPlatformPkg/Include/AcpiS3MemoryNvData.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/S3Dxe/S3Dxe.c b/Features/Intel/PowerManagement/S3FeaturePkg/S3Dxe/S3Dxe.c index 1a7ccb8eed..47b2cc27a5 100644 --- a/Features/Intel/PowerManagement/S3FeaturePkg/S3Dxe/S3Dxe.c +++ b/Features/Intel/PowerManagement/S3FeaturePkg/S3Dxe/S3Dxe.c @@ -124,19 +124,19 @@ S3DxeEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable ) { - UINT64 S3PeiMemSize; - UINT64 S3PeiMemBase; + UINTN S3PeiMemSize; + UINTN S3PeiMemBase; ACPI_S3_MEMORY S3MemoryInfo; EFI_STATUS Status; DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__)); - S3PeiMemSize = GetPeiMemSize (); + S3PeiMemSize = (UINTN) GetPeiMemSize (); S3PeiMemBase = (UINTN) AllocateAcpiNvsMemoryBelow4G (S3PeiMemSize); ASSERT (S3PeiMemBase != 0); - S3MemoryInfo.S3PeiMemBase = S3PeiMemBase; - S3MemoryInfo.S3PeiMemSize = S3PeiMemSize; + S3MemoryInfo.S3PeiMemBase = (EFI_PHYSICAL_ADDRESS) S3PeiMemBase; + S3MemoryInfo.S3PeiMemSize = (UINT64) S3PeiMemSize; DEBUG ((DEBUG_INFO, "S3PeiMemBase: 0x%x\n", S3PeiMemBase)); DEBUG ((DEBUG_INFO, "S3PeiMemSize: 0x%x\n", S3PeiMemSize)); diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.c b/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.c index 6acb894b6f..388e0954bd 100644 --- a/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.c +++ b/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.c @@ -40,7 +40,7 @@ FspSiliconInitDoneNotify ( { EFI_STATUS Status; EFI_BOOT_MODE BootMode; - UINT64 MchBaseAddress; + UINTN MchBaseAddress; Status = PeiServicesGetBootMode (&BootMode); ASSERT_EFI_ERROR (Status); diff --git a/Platform/Intel/MinPlatformPkg/Include/AcpiS3MemoryNvData.h b/Platform/Intel/MinPlatformPkg/Include/AcpiS3MemoryNvData.h index 04eb1435ee..35943e2aa3 100644 --- a/Platform/Intel/MinPlatformPkg/Include/AcpiS3MemoryNvData.h +++ b/Platform/Intel/MinPlatformPkg/Include/AcpiS3MemoryNvData.h @@ -13,8 +13,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // NV data structure // typedef struct { - UINT64 S3PeiMemBase; - UINT64 S3PeiMemSize; + EFI_PHYSICAL_ADDRESS S3PeiMemBase; + UINT64 S3PeiMemSize; } ACPI_S3_MEMORY; #define ACPI_S3_MEMORY_NV_NAME L"S3MemoryInfo" -- 2.36.1.windows.1