public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error
@ 2017-05-11  7:27 Jeff Fan
  2017-05-11  7:51 ` Yao, Jiewen
  2017-05-11 21:26 ` Laszlo Ersek
  0 siblings, 2 replies; 3+ messages in thread
From: Jeff Fan @ 2017-05-11  7:27 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jiewen Yao, Eric Dong

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
index 2713b19..9588eaf 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
@@ -267,7 +267,7 @@ IsInSmmRanges (
 {
   UINTN  Index;
 
-  if ((Address < mCpuHotPlugData.SmrrBase) || (Address >= mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
+  if ((Address >= mCpuHotPlugData.SmrrBase) && (Address < mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
     return TRUE;
   }
   for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
-- 
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error
  2017-05-11  7:27 [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error Jeff Fan
@ 2017-05-11  7:51 ` Yao, Jiewen
  2017-05-11 21:26 ` Laszlo Ersek
  1 sibling, 0 replies; 3+ messages in thread
From: Yao, Jiewen @ 2017-05-11  7:51 UTC (permalink / raw)
  To: Fan, Jeff, edk2-devel@lists.01.org; +Cc: Dong, Eric

Reviewed-by: jiewen.yao@intel.com

> -----Original Message-----
> From: Fan, Jeff
> Sent: Thursday, May 11, 2017 3:27 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff.fan@intel.com>
> ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> index 2713b19..9588eaf 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> @@ -267,7 +267,7 @@ IsInSmmRanges (
>  {
>    UINTN  Index;
> 
> -  if ((Address < mCpuHotPlugData.SmrrBase) || (Address >=
> mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
> +  if ((Address >= mCpuHotPlugData.SmrrBase) && (Address <
> mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
>      return TRUE;
>    }
>    for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
> --
> 2.9.3.windows.2



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error
  2017-05-11  7:27 [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error Jeff Fan
  2017-05-11  7:51 ` Yao, Jiewen
@ 2017-05-11 21:26 ` Laszlo Ersek
  1 sibling, 0 replies; 3+ messages in thread
From: Laszlo Ersek @ 2017-05-11 21:26 UTC (permalink / raw)
  To: Jeff Fan, edk2-devel; +Cc: Jiewen Yao, Eric Dong

On 05/11/17 09:27, Jeff Fan wrote:
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff.fan@intel.com>
> ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> index 2713b19..9588eaf 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> @@ -267,7 +267,7 @@ IsInSmmRanges (
>  {
>    UINTN  Index;
>  
> -  if ((Address < mCpuHotPlugData.SmrrBase) || (Address >= mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
> +  if ((Address >= mCpuHotPlugData.SmrrBase) && (Address < mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize)) {
>      return TRUE;
>    }
>    for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
> 

If this patch hasn't been committed yet, can you please update the
commit message with the use case or functionality that was previously
broken by this bug?

Thanks,
Laszlo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-11 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-11  7:27 [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix logic check error Jeff Fan
2017-05-11  7:51 ` Yao, Jiewen
2017-05-11 21:26 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox