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
This commit is contained in:
ydong10
2010-10-18 11:33:26 +00:00
parent 6517edbe51
commit fbe12b79ae
7 changed files with 11 additions and 7 deletions

View File

@ -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;
}