diff options
author | Jeff Fan <jeff.fan@intel.com> | 2017-03-23 12:55:26 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2017-03-27 16:18:00 +0800 |
commit | 98387f54ae7fcdc2badb90e39be0e9d8b37855c9 (patch) | |
tree | 30ce3da91aff60a723a8406a5bfb076e4d9a3679 /UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c | |
parent | 0027921b1be4b41a766c982615b4ed5a4868d318 (diff) | |
download | edk2-98387f54ae7fcdc2badb90e39be0e9d8b37855c9.tar.gz edk2-98387f54ae7fcdc2badb90e39be0e9d8b37855c9.tar.bz2 edk2-98387f54ae7fcdc2badb90e39be0e9d8b37855c9.zip |
UefiCpuPkg/RegisterCpuFeaturesLib: Define Index to UINT64
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>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c')
-rw-r--r-- | UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c index 396618b057..32189cbc79 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 ) |