summaryrefslogtreecommitdiff
path: root/MdePkg/Library/PeiHobLib/HobLib.c
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-02-12 02:53:23 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-02-12 02:53:23 +0000
commitd958721a06dce3aa0fc941c115db86e3f91254f7 (patch)
tree8d50534635c77090ce448928efad69c012729bfb /MdePkg/Library/PeiHobLib/HobLib.c
parent2f714ebf9ae8c680be7b6f19a2529b4a5e684577 (diff)
downloadedk2-platforms-d958721a06dce3aa0fc941c115db86e3f91254f7.tar.xz
1) Added BIT0, BIT1, …, BIT63 to the Base Defines
2) Added MIN() and MAX() macros to the Base Macros 3) Added StrStr(), StrDecimalToUnitn(), StrDecimalToUint64(), StrHexToUintn(), StrHexToUintn64(), UnicodeToAscii(), AsciiStrStr(), AsciiStrDecimalToUnitn(), AsciiStrDecimalToUint64(), AsciiStrHexToUintn(), AsciiStrHexToUintn64(), and AsciiToUnicode() to the Base Library String Functions 4) Added the Base Library Checksum Functions which include CalculateSum8(), CaclculateCheckSum8(), CalculateSum16(), CalculateChecksum16(), CalculateSum32(), CalculateCheckSum32(), CalculateSum64(), CalculateChecksum64(). 5) Added MMIO Buffer functions to the I/O Library including MmioReadBuffer8(), MmioReadBuffer16(), MmioReadBuffer32(), MmioReadBuffer64(), MmioWriteBuffer8(), MmioWriteBuffer16(), MmioWriteBuffer32(), MmioWriteBuffer64(). 6) Changed the parameter name from SizeOfValue to SizeOfBuffer in PcdSetPtr(), PcdSetPtrEx(), PatchPcdSetPtr(), LibPcdSetPtr(), LibPcdSetPtrEx(), LibPatchPcdSetPtr() 7) Added RADIX_HEX flag to the Print Library to support the conversion of values to hexadecimal strings in UnicodeValueToString() and AsciiValueToString() 8) Added EfiGetCurrentTpl() UEFI Library. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2363 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiHobLib/HobLib.c')
-rw-r--r--MdePkg/Library/PeiHobLib/HobLib.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c
index 43490cc46b..fdefd0ea51 100644
--- a/MdePkg/Library/PeiHobLib/HobLib.c
+++ b/MdePkg/Library/PeiHobLib/HobLib.c
@@ -1,7 +1,7 @@
/** @file
HOB Library.
- Copyright (c) 2006, Intel Corporation<BR>
+ Copyright (c) 2006 - 2007, 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
@@ -168,6 +168,32 @@ GetFirstGuidHob (
}
/**
+ Get the Boot Mode from the HOB list.
+
+ This function returns the system boot mode information from the
+ PHIT HOB in HOB list.
+
+ @param VOID
+
+ @return The Boot Mode.
+
+**/
+EFI_BOOT_MODE
+EFIAPI
+GetBootModeHob (
+ VOID
+ )
+{
+ EFI_STATUS Status;
+ EFI_BOOT_MODE BootMode;
+
+ Status = PeiServicesGetBootMode (&BootMode);
+ ASSERT_EFI_ERROR (Status);
+
+ return BootMode;
+}
+
+/**
Adds a new HOB to the HOB List.
This internal function enables PEIMs to create various types of HOBs.