X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkModulePkg%2FUniversal%2FDebugSupport%2FDxe%2FIa32%2FplDebugSupport.c;h=270a158b7972e221e63723ecc67128a6e16c38ed;hp=289158216cbd403703a64dc7a9d8722017446808;hb=2c3b5ec562c7b43a73424e1be25e2053d1edfe4f;hpb=9db9711c414fe3207ffae81b3c1627554c428308 diff --git a/EdkModulePkg/Universal/DebugSupport/Dxe/Ia32/plDebugSupport.c b/EdkModulePkg/Universal/DebugSupport/Dxe/Ia32/plDebugSupport.c index 289158216c..270a158b79 100644 --- a/EdkModulePkg/Universal/DebugSupport/Dxe/Ia32/plDebugSupport.c +++ b/EdkModulePkg/Universal/DebugSupport/Dxe/Ia32/plDebugSupport.c @@ -45,16 +45,15 @@ Returns: --*/ { - EFI_STATUS Status; UINT8 *StubCopy; // // First, allocate a new buffer and copy the stub code into it // - Status = gBS->AllocatePool (EfiBootServicesData, StubSize, Stub); - if (Status == EFI_SUCCESS) { + *Stub = AllocatePool (StubSize); + if (*Stub != NULL) { StubCopy = *Stub; - gBS->CopyMem (StubCopy, InterruptEntryStub, StubSize); + CopyMem (StubCopy, InterruptEntryStub, StubSize); // // Next fixup the stub code for this vector @@ -78,9 +77,11 @@ Returns: // fixup the jump target to point to the common entry // *(UINT32 *) &StubCopy[0x0e] = (UINT32) CommonIdtEntry - (UINT32) &StubCopy[StubSize]; + + return EFI_SUCCESS; } - return Status; + return EFI_OUT_OF_RESOURCES; } STATIC @@ -144,20 +145,18 @@ Arguments: Returns: EFI_SUCCESS - Other values are passed through from FreePool --*/ { BOOLEAN OldIntFlagState; - EFI_STATUS Status; OldIntFlagState = WriteInterruptFlag (0); WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc)); - Status = gBS->FreePool ((VOID *) (UINTN) IdtEntryTable[ExceptionType].StubEntry); + FreePool ((VOID *) (UINTN) IdtEntryTable[ExceptionType].StubEntry); ZeroMem (&IdtEntryTable[ExceptionType], sizeof (IDT_ENTRY)); WriteInterruptFlag (OldIntFlagState); - return (Status); + return EFI_SUCCESS; } #endif @@ -405,7 +404,7 @@ Returns: ManageIdtEntryTable (NULL, ExceptionType); } - gBS->FreePool (IdtEntryTable); + FreePool (IdtEntryTable); return EFI_SUCCESS; }