diff options
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c index fc418c2500..518978c1d9 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c @@ -315,12 +315,12 @@ ReadSaveStateRegisterByIndex ( }
//
- // Write lower 32-bits of return buffer
+ // Write at most 4 of the lower bytes of the return buffer
//
CopyMem(Buffer, (UINT8 *)CpuSaveState + mSmmCpuWidthOffset[RegisterIndex].Offset64Lo, MIN(4, Width));
- if (Width >= 4) {
+ if (Width > 4) {
//
- // Write upper 32-bits of return buffer
+ // Write at most 4 of the upper bytes of the return buffer
//
CopyMem((UINT8 *)Buffer + 4, (UINT8 *)CpuSaveState + mSmmCpuWidthOffset[RegisterIndex].Offset64Hi, Width - 4);
}
@@ -546,12 +546,12 @@ WriteSaveStateRegister ( }
//
- // Write lower 32-bits of SMM State register
+ // Write at most 4 of the lower bytes of SMM State register
//
CopyMem((UINT8 *)CpuSaveState + mSmmCpuWidthOffset[RegisterIndex].Offset64Lo, Buffer, MIN (4, Width));
- if (Width >= 4) {
+ if (Width > 4) {
//
- // Write upper 32-bits of SMM State register
+ // Write at most 4 of the upper bytes of SMM State register
//
CopyMem((UINT8 *)CpuSaveState + mSmmCpuWidthOffset[RegisterIndex].Offset64Hi, (UINT8 *)Buffer + 4, Width - 4);
}
|