From: Jeff Fan <jeff.fan@intel.com>
To: edk2-devel@lists.01.org
Cc: Feng Tian <feng.tian@intel.com>,
Michael Kinney <michael.d.kinney@intel.com>
Subject: [PATCH 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Define Index to UINT64
Date: Thu, 23 Mar 2017 13:27:37 +0800 [thread overview]
Message-ID: <20170323052738.10888-2-jeff.fan@intel.com> (raw)
In-Reply-To: <20170323052738.10888-1-jeff.fan@intel.com>
The input parameter Index of PreSmmCpuRegisterTableWrite() and
CpuRegisterTableWrite() is defined as UINT32. Index is MSR/MMIO address that
will be saved in CPU register table. UINT32 blocks the MMIO address > 4GB.
This fix is to define Index to UINT64 instead of UINT32.
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h | 4 ++--
.../Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h b/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h
index 42eb3b2..3fb8209 100644
--- a/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h
+++ b/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h
@@ -366,7 +366,7 @@ EFIAPI
CpuRegisterTableWrite (
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
- IN UINT32 Index,
+ IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
);
@@ -390,7 +390,7 @@ EFIAPI
PreSmmCpuRegisterTableWrite (
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
- IN UINT32 Index,
+ IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
);
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c
index 396618b..32189cb 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c
@@ -506,7 +506,7 @@ CpuRegisterTableWriteWorker (
IN BOOLEAN PreSmmFlag,
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
- IN UINT32 Index,
+ IN UINT64 Index,
IN UINT8 ValidBitStart,
IN UINT8 ValidBitLength,
IN UINT64 Value
@@ -550,7 +550,7 @@ CpuRegisterTableWriteWorker (
//
RegisterTableEntry = (CPU_REGISTER_TABLE_ENTRY *) (UINTN) RegisterTable->RegisterTableEntry;
RegisterTableEntry[RegisterTable->TableLength].RegisterType = RegisterType;
- RegisterTableEntry[RegisterTable->TableLength].Index = Index;
+ RegisterTableEntry[RegisterTable->TableLength].Index = (UINT32) Index;
RegisterTableEntry[RegisterTable->TableLength].ValidBitStart = ValidBitStart;
RegisterTableEntry[RegisterTable->TableLength].ValidBitLength = ValidBitLength;
RegisterTableEntry[RegisterTable->TableLength].Value = Value;
@@ -577,7 +577,7 @@ EFIAPI
CpuRegisterTableWrite (
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
- IN UINT32 Index,
+ IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
)
@@ -611,7 +611,7 @@ EFIAPI
PreSmmCpuRegisterTableWrite (
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
- IN UINT32 Index,
+ IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
)
--
2.9.3.windows.2
next prev parent reply other threads:[~2017-03-23 5:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 5:27 [PATCH 0/2] [UefiCpuPkg] Support 64bit MMIO address in CPU Register Table Jeff Fan
2017-03-23 5:27 ` Jeff Fan [this message]
2017-03-23 5:27 ` [PATCH 2/2] UefiCpuPkg/AcpiCpuData.h: Support >4GB MMIO address Jeff Fan
2017-03-27 5:30 ` [PATCH 0/2] [UefiCpuPkg] Support 64bit MMIO address in CPU Register Table Tian, Feng
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=20170323052738.10888-2-jeff.fan@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