diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-10-17 08:41:06 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-10-17 08:41:06 +0000 |
commit | 5240b97c9c9e76994e86db11ff7cf140a74f2bd0 (patch) | |
tree | 344dda1cd4499363eb538981ddb811f78cf3eae1 /MdePkg | |
parent | b5793f469e82a3d65cd890a9c29bfd8a25b9bf54 (diff) | |
download | edk2-5240b97c9c9e76994e86db11ff7cf140a74f2bd0.tar.gz edk2-5240b97c9c9e76994e86db11ff7cf140a74f2bd0.tar.bz2 edk2-5240b97c9c9e76994e86db11ff7cf140a74f2bd0.zip |
Base on PI spec, GetPeiServicesTablePointer is updated to return CONST EFI_PEI_SERVICES**. This is a incompatible changes. All file that reference this must be updated.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6126 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
7 files changed, 47 insertions, 47 deletions
diff --git a/MdePkg/Include/Library/PeiServicesTablePointerLib.h b/MdePkg/Include/Library/PeiServicesTablePointerLib.h index 015d9723be..6fb87949f3 100644 --- a/MdePkg/Include/Library/PeiServicesTablePointerLib.h +++ b/MdePkg/Include/Library/PeiServicesTablePointerLib.h @@ -1,7 +1,7 @@ /** @file
PEI Services Table Pointer Library services
- Copyright (c) 2006, Intel Corporation
+ Copyright (c) 2006 - 2008, 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
@@ -24,7 +24,7 @@ @retval The pointer to PeiServices.
**/
-EFI_PEI_SERVICES **
+CONST EFI_PEI_SERVICES **
EFIAPI
GetPeiServicesTablePointer (
VOID
diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoLib.c b/MdePkg/Library/PeiIoLibCpuIo/IoLib.c index 066ceddbfb..5d94b56124 100644 --- a/MdePkg/Library/PeiIoLibCpuIo/IoLib.c +++ b/MdePkg/Library/PeiIoLibCpuIo/IoLib.c @@ -1,7 +1,7 @@ /** @file
I/O Library. The implementations are based on EFI_PEI_SERVICE->CpuIo interface.
- Copyright (c) 2006, Intel Corporation<BR>
+ Copyright (c) 2006 - 2008, 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
@@ -43,7 +43,7 @@ IoRead8 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
@@ -75,7 +75,7 @@ IoWrite8 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
@@ -106,7 +106,7 @@ IoRead16 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -141,7 +141,7 @@ IoWrite16 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -175,7 +175,7 @@ IoRead32 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -210,7 +210,7 @@ IoWrite32 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -244,7 +244,7 @@ IoRead64 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -279,7 +279,7 @@ IoWrite64 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -313,7 +313,7 @@ MmioRead8 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
@@ -344,7 +344,7 @@ MmioWrite8 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
@@ -375,7 +375,7 @@ MmioRead16 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -411,7 +411,7 @@ MmioWrite16 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -445,7 +445,7 @@ MmioRead32 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -481,7 +481,7 @@ MmioWrite32 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -515,7 +515,7 @@ MmioRead64 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
@@ -550,7 +550,7 @@ MmioWrite64 ( CONST EFI_PEI_SERVICES **PeiServices;
EFI_PEI_CPU_IO_PPI *CpuIo;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
CpuIo = (*PeiServices)->CpuIo;
ASSERT (CpuIo != NULL);
//
diff --git a/MdePkg/Library/PeiPalCallLib/PalCallLib.c b/MdePkg/Library/PeiPalCallLib/PalCallLib.c index aa423c94bd..07f9f38ad0 100644 --- a/MdePkg/Library/PeiPalCallLib/PalCallLib.c +++ b/MdePkg/Library/PeiPalCallLib/PalCallLib.c @@ -70,7 +70,7 @@ PalCall ( //
// Get PEI Service Table Pointer
//
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
//
// Locate SEC Platform Information PPI
diff --git a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c index 0d495601f1..c525195877 100644 --- a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c +++ b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c @@ -1,7 +1,7 @@ /** @file
Implementation for PEI Services Library.
- Copyright (c) 2006 - 2007, Intel Corporation<BR>
+ Copyright (c) 2006 - 2008, 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
@@ -39,7 +39,7 @@ PeiServicesInstallPpi ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->InstallPpi (PeiServices, PpiList);
}
@@ -67,7 +67,7 @@ PeiServicesReInstallPpi ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->ReInstallPpi (PeiServices, OldPpi, NewPpi);
}
@@ -95,7 +95,7 @@ PeiServicesLocatePpi ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->LocatePpi (PeiServices, Guid, Instance, PpiDescriptor, Ppi);
}
@@ -121,7 +121,7 @@ PeiServicesNotifyPpi ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->NotifyPpi (PeiServices, NotifyList);
}
@@ -142,7 +142,7 @@ PeiServicesGetBootMode ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->GetBootMode (PeiServices, BootMode);
}
@@ -162,7 +162,7 @@ PeiServicesSetBootMode ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->SetBootMode (PeiServices, BootMode);
}
@@ -183,7 +183,7 @@ PeiServicesGetHobList ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->GetHobList (PeiServices, HobList);
}
@@ -208,7 +208,7 @@ PeiServicesCreateHob ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->CreateHob (PeiServices, Type, Length, Hob);
}
@@ -233,7 +233,7 @@ PeiServicesFfsFindNextVolume ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->FfsFindNextVolume (PeiServices, Instance, VolumeHandle);
}
@@ -260,7 +260,7 @@ PeiServicesFfsFindNextFile ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->FfsFindNextFile (PeiServices, SearchType, VolumeHandle, FileHandle);
}
@@ -286,7 +286,7 @@ PeiServicesFfsFindSectionData ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->FfsFindSectionData (PeiServices, SectionType, FfsFileHeader, SectionData);
}
@@ -311,7 +311,7 @@ PeiServicesInstallPeiMemory ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->InstallPeiMemory (PeiServices, MemoryBegin, MemoryLength);
}
@@ -339,7 +339,7 @@ PeiServicesAllocatePages ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->AllocatePages (PeiServices, MemoryType, Pages, Memory);
}
@@ -363,7 +363,7 @@ PeiServicesAllocatePool ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->AllocatePool (PeiServices, Size, Buffer);
}
@@ -384,7 +384,7 @@ PeiServicesResetSystem ( {
CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
+ PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->ResetSystem (PeiServices);
}
@@ -411,7 +411,7 @@ PeiServicesRegisterForShadow ( IN EFI_PEI_FILE_HANDLE FileHandle
)
{
- EFI_PEI_SERVICES **PeiServices;
+ CONST EFI_PEI_SERVICES **PeiServices;
PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->RegisterForShadow (FileHandle);
@@ -442,7 +442,7 @@ PeiServicesFfsGetFileInfo ( OUT EFI_FV_FILE_INFO *FileInfo
)
{
- EFI_PEI_SERVICES **PeiServices;
+ CONST EFI_PEI_SERVICES **PeiServices;
PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->FfsGetFileInfo (FileHandle, FileInfo);
diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c index b601545b8c..fd5bbe7192 100644 --- a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c @@ -4,7 +4,7 @@ This library is used for PEIM which does executed from flash device directly but
executed in memory.
- Copyright (c) 2006, Intel Corporation<BR>
+ Copyright (c) 2006 - 2008, 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
@@ -44,13 +44,13 @@ SetPeiServicesTablePointer ( @retval The pointer to PeiServices.
**/
-EFI_PEI_SERVICES **
+CONST EFI_PEI_SERVICES **
GetPeiServicesTablePointer (
VOID
)
{
ASSERT (gPeiServices != NULL);
- return gPeiServices;
+ return (CONST EFI_PEI_SERVICES **) gPeiServices;
}
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c index ba2f9d6cad..bf331bc87e 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c @@ -34,17 +34,17 @@ @return The pointer to PeiServices.
**/
-EFI_PEI_SERVICES **
+CONST EFI_PEI_SERVICES **
EFIAPI
GetPeiServicesTablePointer (
VOID
)
{
- EFI_PEI_SERVICES **PeiServices;
+ CONST EFI_PEI_SERVICES **PeiServices;
IA32_DESCRIPTOR Idtr;
AsmReadIdtr (&Idtr);
- PeiServices = (EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.Base - sizeof (UINTN)));
+ PeiServices = (CONST EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.Base - sizeof (UINTN)));
ASSERT (PeiServices != NULL);
return PeiServices;
}
diff --git a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c index 1939de8ce2..8601c7326c 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c @@ -26,15 +26,15 @@ @return The pointer to PeiServices.
**/
-EFI_PEI_SERVICES **
+CONST EFI_PEI_SERVICES **
EFIAPI
GetPeiServicesTablePointer (
VOID
)
{
- EFI_PEI_SERVICES **PeiServices;
+ CONST EFI_PEI_SERVICES **PeiServices;
- PeiServices = (EFI_PEI_SERVICES **)(UINTN)AsmReadKr7 ();
+ PeiServices = (CONST EFI_PEI_SERVICES **)(UINTN)AsmReadKr7 ();
ASSERT (PeiServices != NULL);
return PeiServices;
}
|