summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-22 07:06:49 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-22 07:06:49 +0000
commit6812ef9feaa052ba669bccd43cd22238240d049d (patch)
tree812963c7df165f0d145cb9040ff02c09824cbd2b
parent36a975ddbd95717401fb2efbfdd78ff887aba7f5 (diff)
downloadedk2-platforms-6812ef9feaa052ba669bccd43cd22238240d049d.tar.xz
Update Hob Instance to remove the unused InternalHobLib.h file.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5710 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf3
-rw-r--r--MdePkg/Library/DxeCoreHobLib/HobLib.c9
-rw-r--r--MdePkg/Library/DxeCoreHobLib/InternalHobLib.h20
-rw-r--r--MdePkg/Library/DxeHobLib/HobLib.c13
-rw-r--r--MdePkg/Library/DxeHobLib/HobLibInternal.h36
-rw-r--r--MdePkg/Library/PeiHobLib/HobLib.c17
6 files changed, 18 insertions, 80 deletions
diff --git a/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf b/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
index 3e1504559a..07b02fbff7 100644
--- a/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
+++ b/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
@@ -31,10 +31,8 @@
#
[Sources.common]
- InternalHobLib.h
HobLib.c
-
[Packages]
MdePkg/MdePkg.dec
@@ -42,4 +40,5 @@
[LibraryClasses]
BaseMemoryLib
DebugLib
+ DxeCoreEntryPoint
diff --git a/MdePkg/Library/DxeCoreHobLib/HobLib.c b/MdePkg/Library/DxeCoreHobLib/HobLib.c
index 1cce53e2d7..b941bde19c 100644
--- a/MdePkg/Library/DxeCoreHobLib/HobLib.c
+++ b/MdePkg/Library/DxeCoreHobLib/HobLib.c
@@ -1,7 +1,7 @@
/** @file
- HOB Library.
+ HOB Library implementation for DxeCore driver.
- 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
@@ -16,12 +16,10 @@
#include <PiDxe.h>
-
#include <Library/HobLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
-
-#include "InternalHobLib.h"
+#include <Library/DxeCoreEntryPoint.h>
/**
Returns the pointer to the HOB list.
@@ -187,6 +185,7 @@ GetBootModeHob (
EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob;
HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList ();
+ ASSERT (HandOffHob != NULL);
return HandOffHob->BootMode;
}
diff --git a/MdePkg/Library/DxeCoreHobLib/InternalHobLib.h b/MdePkg/Library/DxeCoreHobLib/InternalHobLib.h
deleted file mode 100644
index 8d29da179c..0000000000
--- a/MdePkg/Library/DxeCoreHobLib/InternalHobLib.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/** @file
- Internal include file of DXE Entry Point HOB Library.
-
- Copyright (c) 2006 - 2007, 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 __DXE_ENTRY_POINT_HOB_LIB_H__
-#define __DXE_ENTRY_POINT_HOB_LIB_H__
-
-extern VOID *gHobList;
-
-#endif
diff --git a/MdePkg/Library/DxeHobLib/HobLib.c b/MdePkg/Library/DxeHobLib/HobLib.c
index 605d42f80c..e13469534a 100644
--- a/MdePkg/Library/DxeHobLib/HobLib.c
+++ b/MdePkg/Library/DxeHobLib/HobLib.c
@@ -1,7 +1,7 @@
/** @file
- HOB Library.
+ HOB Library implemenation for Dxe Phase.
- 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
@@ -22,7 +22,6 @@
#include <Library/UefiLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
-#include "HobLibInternal.h"
STATIC VOID *mHobList = NULL;
@@ -47,10 +46,11 @@ HobLibConstructor (
{
EFI_STATUS Status;
- Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, &mHobList);
+ Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, &mHobList);
ASSERT_EFI_ERROR (Status);
ASSERT (mHobList != NULL);
- return Status;
+
+ return EFI_SUCCESS;
}
/**
@@ -201,7 +201,7 @@ GetFirstGuidHob (
Get the Boot Mode from the HOB list.
This function returns the system boot mode information from the
- PHIT HOB in HOB list.
+ PHIT HOB in HOB list. If PHIT HOB is NULL, then ASSERT().
@param VOID
@@ -217,6 +217,7 @@ GetBootModeHob (
EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob;
HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList ();
+ ASSERT (HandOffHob != NULL);
return HandOffHob->BootMode;
}
diff --git a/MdePkg/Library/DxeHobLib/HobLibInternal.h b/MdePkg/Library/DxeHobLib/HobLibInternal.h
deleted file mode 100644
index 2a2fb8c47d..0000000000
--- a/MdePkg/Library/DxeHobLib/HobLibInternal.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/** @file
- Internal include file of DXE Entry Point HOB Library.
-
- Copyright (c) 2006 - 2007, 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 _DXE_HOB_LIB_INTERNAL_H__
-#define _DXE_HOB_LIB_INTERNAL_H__
-
-/**
-
- Initialize Hob list.
-
- @param ImageHandle ImageHandle of the loaded driver.
- @param SystemTable Pointer to the EFI System Table.
-
- @retval EFI_SUCCESS One or more of the drivers returned a success code.
- @retval !EFI_SUCESS The return status from the last driver entry point in the list.
-**/
-EFI_STATUS
-EFIAPI
-HobLibConstructor (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-;
-
-#endif
diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c
index aa54e4fbe3..cbaf028963 100644
--- a/MdePkg/Library/PeiHobLib/HobLib.c
+++ b/MdePkg/Library/PeiHobLib/HobLib.c
@@ -1,7 +1,7 @@
/** @file
- HOB Library.
+ Provide Hob Library functions for Pei phase.
- Copyright (c) 2006 - 2007, Intel Corporation<BR>
+ Copyright (c) 2007 - 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
@@ -176,8 +176,8 @@ GetFirstGuidHob (
/**
Get the Boot Mode from the HOB list.
- This function returns the system boot mode information from the
- PHIT HOB in HOB list.
+ This function returns the system boot mode information
+ by PeiCore GetBootMode Service.
@param VOID
@@ -443,13 +443,8 @@ BuildFv2Hob (
/**
Builds a Capsule Volume HOB.
- This function builds a Capsule Volume HOB.
- It can only be invoked during PEI phase;
- for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
- If there is no additional space for HOB creation, then ASSERT().
-
- @param BaseAddress The base address of the Capsule Volume.
- @param Length The size of the Capsule Volume in bytes.
+ This function is not supported, because Capsule Volume Hob is the platform
+ specific. It is not the common defintion in PI and UEFI spec.
**/
VOID