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
This commit is contained in:
klu2 2008-09-03 08:04:48 +00:00
parent 22e6fe86ba
commit 5dd39dc655
3 changed files with 7 additions and 66 deletions

View File

@ -1,29 +0,0 @@
/** @file
Internal include file of PEI Services Table Pointer.
Copyright (c) 2006, Intel Corporation<BR>
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 <PiPei.h>
#include <Library/BaseLib.h>
#include <Library/PeiServicesTablePointerLib.h>
#include <Library/DebugLib.h>
#include <Library/PeiServicesLib.h>
#include <Library/BaseMemoryLib.h>
#endif

View File

@ -12,7 +12,11 @@
**/
#include "InternalPeiServicesTablePointer.h"
#include <PiPei.h>
#include <Library/BaseLib.h>
#include <Library/PeiServicesTablePointerLib.h>
#include <Library/DebugLib.h>
/**
@ -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);
}

View File

@ -33,13 +33,10 @@
[Sources]
PeiServicesTablePointer.c
InternalPeiServicesTablePointer.h
[LibraryClasses]
DebugLib
BaseMemoryLib
PeiServicesLib
BaseLib