From: klu2 Date: Wed, 3 Sep 2008 08:04:48 +0000 (+0000) Subject: 1, remove MigrateIdt interface, 2, remove unused library class X-Git-Tag: edk2-stable201903~20427 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=5dd39dc6556952b301eba6a2082acbbc5ea1fbca 1, remove MigrateIdt interface, 2, remove unused library class git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5793 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/InternalPeiServicesTablePointer.h b/MdePkg/Library/PeiServicesTablePointerLibIdt/InternalPeiServicesTablePointer.h deleted file mode 100644 index 61bc1ebf41..0000000000 --- a/MdePkg/Library/PeiServicesTablePointerLibIdt/InternalPeiServicesTablePointer.h +++ /dev/null @@ -1,29 +0,0 @@ -/** @file - Internal include file of PEI Services Table Pointer. - - Copyright (c) 2006, 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 - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - - -#ifndef __INTERNAL_PEI_SERVICES_TABLE_POINTER_H__ -#define __INTERNAL_PEI_SERVICES_TABLE_POINTER_H__ - - -#include - -#include -#include -#include -#include -#include - - -#endif diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c index 97abaa4aeb..a1959e121d 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c @@ -12,7 +12,11 @@ **/ -#include "InternalPeiServicesTablePointer.h" +#include + +#include +#include +#include /** @@ -37,7 +41,7 @@ GetPeiServicesTablePointer ( IA32_DESCRIPTOR Idtr; AsmReadIdtr (&Idtr); - PeiServices = (EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.Base - 4)); + PeiServices = (EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.Base - sizeof (UINTN))); ASSERT (PeiServices != NULL); return PeiServices; } @@ -64,38 +68,7 @@ SetPeiServicesTablePointer ( IA32_DESCRIPTOR Idtr; AsmReadIdtr (&Idtr); - (*(UINTN*)(Idtr.Base - 4)) = (UINTN)PeiServicesTablePointer; + (*(UINTN*)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer; } -/** - After memory initialization in PEI phase, the IDT table in temporary memory should - be migrated to memory, and the address of PeiServicesPointer also need to be updated - immediately preceding the new IDT table. - - @param PeiServices The address of PeiServices pointer. -**/ -VOID -EFIAPI -MigrateIdtTable ( - IN EFI_PEI_SERVICES **PeiServices - ) -{ - UINTN Size; - VOID *NewBase; - EFI_STATUS Status; - IA32_DESCRIPTOR Idtr; - - AsmReadIdtr (&Idtr); - - Size = sizeof(UINTN) + (Idtr.Limit + 1); - - Status = PeiServicesAllocatePool (Size, &NewBase); - ASSERT_EFI_ERROR (Status); - - CopyMem ((VOID*)((UINTN)NewBase + sizeof(UINTN)), (VOID*)Idtr.Base, (Idtr.Limit + 1)); - - Idtr.Base = (UINTN)NewBase + sizeof(UINTN); - AsmWriteIdtr (&Idtr); - SetPeiServicesTablePointer(PeiServices); -} diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf index 6baad7a600..8d5f430939 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf +++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf @@ -33,13 +33,10 @@ [Sources] PeiServicesTablePointer.c - InternalPeiServicesTablePointer.h [LibraryClasses] DebugLib - BaseMemoryLib - PeiServicesLib BaseLib