summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/DebugSupportDxe
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2010-10-18 11:33:26 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2010-10-18 11:33:26 +0000
commitfbe12b79aef4c2706e90078cc75b94dcf7926ba8 (patch)
tree3e008e770ede3205f66e38ceb9e3140f749712fd /MdeModulePkg/Universal/DebugSupportDxe
parent6517edbe5156bdf40f4bbd46af001d10ef81c8ed (diff)
downloadedk2-fbe12b79aef4c2706e90078cc75b94dcf7926ba8.tar.gz
edk2-fbe12b79aef4c2706e90078cc75b94dcf7926ba8.tar.bz2
edk2-fbe12b79aef4c2706e90078cc75b94dcf7926ba8.zip
Refine code to make code run more safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10955 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DebugSupportDxe')
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c
index 8e623b9419..fa8869d287 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c
+++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c
@@ -36,9 +36,9 @@ GetInterruptHandleFromIdt (
// InterruptHandle 16-31 : OffsetHigh
// InterruptHandle 32-63 : OffsetUpper
//
- ((UINT16 *) &InterruptHandle)[0] = (UINT16) IdtGateDecriptor->Bits.OffsetLow;
- ((UINT16 *) &InterruptHandle)[1] = (UINT16) IdtGateDecriptor->Bits.OffsetHigh;
- ((UINT32 *) &InterruptHandle)[1] = (UINT32) IdtGateDecriptor->Bits.OffsetUpper;
+ InterruptHandle = ((UINTN) IdtGateDecriptor->Bits.OffsetLow) |
+ (((UINTN) IdtGateDecriptor->Bits.OffsetHigh) << 16) |
+ (((UINTN) IdtGateDecriptor->Bits.OffsetUpper) << 32) ;
return InterruptHandle;
}