From: "Isaac Oram" <isaac.w.oram@intel.com>
To: devel@edk2.groups.io
Cc: Isaac Oram <isaac.w.oram@intel.com>,
Sai Chaganty <rangasai.v.chaganty@intel.com>,
Nate DeSimone <nathaniel.l.desimone@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Chasel Chiu <chasel.chiu@intel.com>,
Eric Dong <eric.dong@intel.com>,
Benjamin Doron <benjamin.doron00@gmail.com>
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 [thread overview]
Message-ID: <20220914184027.1510-3-isaac.w.oram@intel.com> (raw)
In-Reply-To: <20220914184027.1510-2-isaac.w.oram@intel.com>
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 <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Benjamin Doron <benjamin.doron00@gmail.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
.../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
next prev parent reply other threads:[~2022-09-14 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 18:40 [edk2-devel][edk2-platforms][PATCH V1 0/2] Platforms/Intel: Build fixes Isaac Oram
2022-09-14 18:40 ` [edk2-devel][edk2-platforms][PATCH V1 1/2] S3FeaturePkg/Build: Add libraries needed by S3FeaturePkg Isaac Oram
2022-09-14 18:40 ` Isaac Oram [this message]
2022-09-28 16:16 ` [edk2-devel] [edk2-platforms][PATCH V1 0/2] Platforms/Intel: Build fixes Benjamin Doron
2022-09-28 17:22 ` Isaac Oram
2022-10-11 23:40 ` [edk2-devel][edk2-platforms][PATCH " Nate DeSimone
2022-10-12 1:33 ` Isaac Oram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220914184027.1510-3-isaac.w.oram@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox