Fix a bug that the size of a gate descriptor in the IDT is 8 bytes. The size is 8 bytes in 32-bit mode, while it is 16 bytes in 64-bit mode. Replace the hard-coded size with a sizeof.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11177 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
rsun3 2010-12-17 02:38:26 +00:00
parent bcec20df61
commit 304a39b746
1 changed files with 1 additions and 1 deletions

View File

@ -1082,7 +1082,7 @@ InitInterruptDescriptorTable (
if ((OldIdtPtr.Base != 0) && ((OldIdtPtr.Limit & 7) == 7)) {
OldIdt = (IA32_IDT_GATE_DESCRIPTOR*) OldIdtPtr.Base;
OldIdtSize = (OldIdtPtr.Limit + 1) / 8;
OldIdtSize = (OldIdtPtr.Limit + 1) / sizeof (IA32_IDT_GATE_DESCRIPTOR);
} else {
OldIdt = NULL;
OldIdtSize = 0;