summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-03 08:04:48 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-03 08:04:48 +0000
commit5dd39dc6556952b301eba6a2082acbbc5ea1fbca (patch)
tree2901f9c1adddd2933e2cafacfddb5a354973fe53
parent22e6fe86ba006b1bf48b41498a158f8a488474fc (diff)
downloadedk2-platforms-5dd39dc6556952b301eba6a2082acbbc5ea1fbca.tar.xz
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
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/InternalPeiServicesTablePointer.h29
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c41
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf3
3 files changed, 7 insertions, 66 deletions
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<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
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 <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);
-}
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