]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Core/PiSmmCore/HeapGuard.c
MdeModulePkg/PiSmmCore: fix bits operation error on a boundary condition
authorJian J Wang <jian.j.wang@intel.com>
Thu, 15 Mar 2018 04:43:20 +0000 (12:43 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 16 Mar 2018 07:01:12 +0000 (15:01 +0800)
commit883787a2c6f83a59fa56f9529317aa86be71fe91
treedab4e332914c1edefa6540224b3ed7c1e86400ec
parent7fef06af4ec100f3f8856e3fa08ef067a9fd40d2
MdeModulePkg/PiSmmCore: fix bits operation error on a boundary condition

If given address is on 64K boundary and the requested bit number is 64,
all SetBits(), ClearBits() and GetBits() will encounter ASSERT problem
in trying to do a 64 bits of shift, which is not allowed by LShift() and
RShift(). This patch tries to fix this issue by turning bits operation
into whole integer operation in such situation.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
MdeModulePkg/Core/PiSmmCore/HeapGuard.c