X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=UefiCpuPkg%2FCpuDxe%2FCpuDxe.c;h=99fdbd7757055c34c3d0172c6321f3cad3a1d6c7;hp=35fba39b43aeb192cbf3f0ac9dffbaf00d946f01;hb=0677cc4925d580f7016ac092dc591be0ebe03495;hpb=c52acd89e872e32eae7ae6265b86b1670cd9cac1 diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index 35fba39b43..99fdbd7757 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -1,7 +1,7 @@ /** @file CPU DXE Module. - Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -114,6 +114,14 @@ UINT32 mErrorCodeFlag = 0x00027d00; // // Local function prototypes // + +/** + Set Interrupt Descriptor Table Handler Address. + + @param Index The Index of the interrupt descriptor table handle. + @param Handler Handler address. + +**/ VOID SetInterruptDescriptorTableHandlerAddress ( IN UINTN Index, @@ -604,8 +612,6 @@ CpuSetMemoryAttributes ( return EFI_UNSUPPORTED; } - DEBUG((EFI_D_ERROR, "CpuAp: SetMemorySpaceAttributes(BA=%08x, Len=%08x, Attr=%08x)\n", BaseAddress, Length, Attributes)); - // // If this function is called because GCD SetMemorySpaceAttributes () is called // by RefreshGcdMemoryAttributes (), then we are just synchronzing GCD memory @@ -644,15 +650,12 @@ CpuSetMemoryAttributes ( // // call MTRR libary function // - DEBUG((EFI_D_ERROR, " MtrrSetMemoryAttribute()\n")); - Status = MtrrSetMemoryAttribute( + Status = MtrrSetMemoryAttribute ( BaseAddress, Length, CacheType ); - MtrrDebugPrintAllMtrrs (); - return (EFI_STATUS) Status; } @@ -1014,7 +1017,13 @@ RefreshGcdMemoryAttributes ( mIsFlushingGCD = FALSE; } +/** + Set Interrupt Descriptor Table Handler Address. + @param Index The Index of the interrupt descriptor table handle. + @param Handler Handler address. + +**/ VOID SetInterruptDescriptorTableHandlerAddress ( IN UINTN Index, @@ -1068,7 +1077,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;