Update all files to follow doxygen style file header.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5018 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2008-04-09 05:36:17 +00:00
parent 3b2dbece7c
commit 8dbae30dd7
23 changed files with 1152 additions and 1227 deletions

View File

@ -1,6 +1,7 @@
/*++ /** @file
Support for measurement of DXE performance
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -9,15 +10,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: **/
DxeCorePerformance.c
Abstract:
Support for measurement of DXE performance
--*/
#include <PiDxe.h> #include <PiDxe.h>

View File

@ -1,17 +1,18 @@
#/** @file #/** @file
# Component description file for DxeCore Performance Library #
# # Component description file for DxeCore Performance Library
# This library provides intrastructure for DxeCore to log performance. #
# Copyright (c) 2006, Intel Corporation. # This library provides intrastructure for DxeCore to log performance.
# #
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
#
#**/ #**/
[Defines] [Defines]

View File

@ -1,23 +1,16 @@
/*++ /** @file
Performance Library
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: **/
DxePerformanceLib.c
Abstract:
Performance Library
--*/
#include <PiDxe.h> #include <PiDxe.h>

View File

@ -1,17 +1,18 @@
#/** @file #/** @file
# Component description file for Dxe Performance Library #
# # Component description file for Dxe Performance Library
# This library provides intrastructure for Dxe driver to log performance. #
# Copyright (c) 2006 - 2007, Intel Corporation # This library provides intrastructure for Dxe driver to log performance.
# #
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
#
#**/ #**/
[Defines] [Defines]

View File

@ -1,14 +1,14 @@
/** @file /** @file
HII Library implementation that uses DXE protocols and services. HII Library implementation that uses DXE protocols and services.
Copyright (c) 2006, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/

View File

@ -1,17 +1,18 @@
#/** @file #/** @file
# Library instance for HII common routines. #
# # Library instance for HII common routines.
# This library instance implements the common HII routines. #
# Copyright (c) 2006, Intel Corporation # This library instance implements the common HII routines.
# #
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
#
#**/ #**/
[Defines] [Defines]

View File

@ -1,177 +1,169 @@
/** @file /** @file
Common Library Routines to assist handle HII elements.
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials Copyright (c) 2007 - 2008, Intel Corporation. <BR>
are licensed and made available under the terms and conditions of the BSD License All rights reserved. This program and the accompanying materials
which accompanies this distribution. The full text of the license may be found at are licensed and made available under the terms and conditions of the BSD License
http://opensource.org/licenses/bsd-license.php 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. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
**/
UefiIfrCommon.c
#include "LibraryInternal.h"
Abstract:
Common Library Routines to assist handle HII elements. //
// Hii relative protocols
//
**/
EFI_HII_DATABASE_PROTOCOL *gIfrLibHiiDatabase;
#include "LibraryInternal.h" EFI_HII_STRING_PROTOCOL *gIfrLibHiiString;
EFI_STATUS
// EFIAPI
// Hii relative protocols ExtendedIfrSupportLibConstructor (
// IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
EFI_HII_DATABASE_PROTOCOL *gIfrLibHiiDatabase; )
EFI_HII_STRING_PROTOCOL *gIfrLibHiiString; {
EFI_STATUS Status;
EFI_STATUS
EFIAPI Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gIfrLibHiiDatabase);
ExtendedIfrSupportLibConstructor ( ASSERT_EFI_ERROR (Status);
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gIfrLibHiiString);
) ASSERT_EFI_ERROR (Status);
{
EFI_STATUS Status; return EFI_SUCCESS;
}
Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gIfrLibHiiDatabase);
ASSERT_EFI_ERROR (Status);
Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gIfrLibHiiString); STATIC EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID;
ASSERT_EFI_ERROR (Status);
EFI_STATUS
return EFI_SUCCESS; EFIAPI
} IfrLibExtractClassFromHiiHandle (
IN EFI_HII_HANDLE Handle,
OUT UINT16 *Class,
OUT EFI_STRING_ID *FormSetTitle,
STATIC EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID; OUT EFI_STRING_ID *FormSetHelp
)
EFI_STATUS /*++
EFIAPI
IfrLibExtractClassFromHiiHandle ( Routine Description:
IN EFI_HII_HANDLE Handle, Extract formset class for given HII handle.
OUT UINT16 *Class,
OUT EFI_STRING_ID *FormSetTitle, Arguments:
OUT EFI_STRING_ID *FormSetHelp HiiHandle - Hii handle
) Class - Class of the formset
/*++ FormSetTitle - Formset title string
FormSetHelp - Formset help string
Routine Description:
Extract formset class for given HII handle. Returns:
EFI_SUCCESS - Successfully extract Class for specified Hii handle.
Arguments:
HiiHandle - Hii handle --*/
Class - Class of the formset {
FormSetTitle - Formset title string EFI_STATUS Status;
FormSetHelp - Formset help string UINTN BufferSize;
EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList;
Returns: UINT8 *Package;
EFI_SUCCESS - Successfully extract Class for specified Hii handle. UINT8 *OpCodeData;
UINT32 Offset;
--*/ UINT32 Offset2;
{ UINT32 PackageListLength;
EFI_STATUS Status; EFI_HII_PACKAGE_HEADER PackageHeader;
UINTN BufferSize;
EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList; ASSERT (Handle != NULL);
UINT8 *Package; ASSERT (Class != NULL);
UINT8 *OpCodeData; ASSERT (FormSetTitle != NULL);
UINT32 Offset; ASSERT (FormSetHelp != NULL);
UINT32 Offset2;
UINT32 PackageListLength; *Class = EFI_NON_DEVICE_CLASS;
EFI_HII_PACKAGE_HEADER PackageHeader; *FormSetTitle = 0;
*FormSetHelp = 0;
ASSERT (Handle != NULL);
ASSERT (Class != NULL); //
ASSERT (FormSetTitle != NULL); // Get HII PackageList
ASSERT (FormSetHelp != NULL); //
BufferSize = 0;
*Class = EFI_NON_DEVICE_CLASS; HiiPackageList = NULL;
*FormSetTitle = 0; Status = gIfrLibHiiDatabase->ExportPackageLists (gIfrLibHiiDatabase, Handle, &BufferSize, HiiPackageList);
*FormSetHelp = 0; ASSERT (Status != EFI_NOT_FOUND);
// if (Status == EFI_BUFFER_TOO_SMALL) {
// Get HII PackageList HiiPackageList = AllocatePool (BufferSize);
// ASSERT (HiiPackageList != NULL);
BufferSize = 0;
HiiPackageList = NULL; Status = gIfrLibHiiDatabase->ExportPackageLists (gIfrLibHiiDatabase, Handle, &BufferSize, HiiPackageList);
Status = gIfrLibHiiDatabase->ExportPackageLists (gIfrLibHiiDatabase, Handle, &BufferSize, HiiPackageList); }
ASSERT (Status != EFI_NOT_FOUND); if (EFI_ERROR (Status)) {
return Status;
if (Status == EFI_BUFFER_TOO_SMALL) { }
HiiPackageList = AllocatePool (BufferSize);
ASSERT (HiiPackageList != NULL); //
// Get Form package from this HII package List
Status = gIfrLibHiiDatabase->ExportPackageLists (gIfrLibHiiDatabase, Handle, &BufferSize, HiiPackageList); //
} Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
if (EFI_ERROR (Status)) { Offset2 = 0;
return Status; CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
}
while (Offset < PackageListLength) {
// Package = ((UINT8 *) HiiPackageList) + Offset;
// Get Form package from this HII package List CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
//
Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER); if (PackageHeader.Type == EFI_HII_PACKAGE_FORM) {
Offset2 = 0; //
CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32)); // Search Class Opcode in this Form Package
//
while (Offset < PackageListLength) { Offset2 = sizeof (EFI_HII_PACKAGE_HEADER);
Package = ((UINT8 *) HiiPackageList) + Offset; while (Offset2 < PackageHeader.Length) {
CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER)); OpCodeData = Package + Offset2;
if (PackageHeader.Type == EFI_HII_PACKAGE_FORM) { if (((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_FORM_SET_OP) {
// //
// Search Class Opcode in this Form Package // Find FormSet OpCode
// //
Offset2 = sizeof (EFI_HII_PACKAGE_HEADER); CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
while (Offset2 < PackageHeader.Length) { CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
OpCodeData = Package + Offset2; }
if (((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_FORM_SET_OP) { if ((((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_GUID_OP) &&
// CompareGuid (&mIfrVendorGuid, (EFI_GUID *)(OpCodeData + sizeof (EFI_IFR_OP_HEADER))) &&
// Find FormSet OpCode (((EFI_IFR_GUID_CLASS *) OpCodeData)->ExtendOpCode == EFI_IFR_EXTEND_OP_CLASS)
// ) {
CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID)); //
CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID)); // Find GUIDed Class OpCode
} //
CopyMem (Class, &((EFI_IFR_GUID_CLASS *) OpCodeData)->Class, sizeof (UINT16));
if ((((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_GUID_OP) &&
CompareGuid (&mIfrVendorGuid, (EFI_GUID *)(OpCodeData + sizeof (EFI_IFR_OP_HEADER))) && //
(((EFI_IFR_GUID_CLASS *) OpCodeData)->ExtendOpCode == EFI_IFR_EXTEND_OP_CLASS) // Till now, we ought to have found the formset Opcode
) { //
// break;
// Find GUIDed Class OpCode }
//
CopyMem (Class, &((EFI_IFR_GUID_CLASS *) OpCodeData)->Class, sizeof (UINT16)); Offset2 += ((EFI_IFR_OP_HEADER *) OpCodeData)->Length;
}
//
// Till now, we ought to have found the formset Opcode if (Offset2 < PackageHeader.Length) {
// //
break; // Target formset found
} //
break;
Offset2 += ((EFI_IFR_OP_HEADER *) OpCodeData)->Length; }
} }
if (Offset2 < PackageHeader.Length) { Offset += PackageHeader.Length;
// }
// Target formset found
// gBS->FreePool (HiiPackageList);
break;
} return EFI_SUCCESS;
} }
Offset += PackageHeader.Length;
}
gBS->FreePool (HiiPackageList);
return EFI_SUCCESS;
}

View File

@ -1,18 +1,16 @@
#/** @file #/** @file
# Component name for module UefiEfiIfrSupportLib #
# # Component name for module UefiEfiIfrSupportLib
# FIX ME! #
# Copyright (c) 2007, Intel Corporation. All rights reserved. # Copyright (c) 2007 - 2008, Intel Corporation. <BR>
#
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
# #
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
#
#**/ #**/
[Defines] [Defines]

View File

@ -1,441 +1,433 @@
/** @file /** @file
Common Library Routines to assist handle HII elements.
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials Copyright (c) 2007 - 2008, Intel Corporation. <BR>
are licensed and made available under the terms and conditions of the BSD License All rights reserved. This program and the accompanying materials
which accompanies this distribution. The full text of the license may be found at are licensed and made available under the terms and conditions of the BSD License
http://opensource.org/licenses/bsd-license.php 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. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
**/
UefiIfrForm.c
#include "LibraryInternal.h"
Abstract:
STATIC
Common Library Routines to assist handle HII elements. EFI_STATUS
GetPackageDataFromPackageList (
IN EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList,
**/ IN UINT32 PackageIndex,
OUT UINT32 *BufferLen,
#include "LibraryInternal.h" OUT EFI_HII_PACKAGE_HEADER **Buffer
)
STATIC {
EFI_STATUS UINT32 Index;
GetPackageDataFromPackageList ( EFI_HII_PACKAGE_HEADER *Package;
IN EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList, UINT32 Offset;
IN UINT32 PackageIndex, UINT32 PackageListLength;
OUT UINT32 *BufferLen, EFI_HII_PACKAGE_HEADER PackageHeader = {0, 0};
OUT EFI_HII_PACKAGE_HEADER **Buffer
) ASSERT(HiiPackageList != NULL);
{
UINT32 Index; if ((BufferLen == NULL) || (Buffer == NULL)) {
EFI_HII_PACKAGE_HEADER *Package; return EFI_INVALID_PARAMETER;
UINT32 Offset; }
UINT32 PackageListLength;
EFI_HII_PACKAGE_HEADER PackageHeader = {0, 0}; Package = NULL;
Index = 0;
ASSERT(HiiPackageList != NULL); Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
if ((BufferLen == NULL) || (Buffer == NULL)) { while (Offset < PackageListLength) {
return EFI_INVALID_PARAMETER; Package = (EFI_HII_PACKAGE_HEADER *) (((UINT8 *) HiiPackageList) + Offset);
} CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
if (Index == PackageIndex) {
Package = NULL; break;
Index = 0; }
Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER); Offset += PackageHeader.Length;
CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32)); Index++;
while (Offset < PackageListLength) { }
Package = (EFI_HII_PACKAGE_HEADER *) (((UINT8 *) HiiPackageList) + Offset); if (Offset >= PackageListLength) {
CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER)); //
if (Index == PackageIndex) { // no package found in this Package List
break; //
} return EFI_NOT_FOUND;
Offset += PackageHeader.Length; }
Index++;
} *BufferLen = PackageHeader.Length;
if (Offset >= PackageListLength) { *Buffer = Package;
// return EFI_SUCCESS;
// no package found in this Package List }
//
return EFI_NOT_FOUND; STATIC
} EFI_STATUS
EFIAPI
*BufferLen = PackageHeader.Length; UpdateFormPackageData (
*Buffer = Package; IN EFI_GUID *FormSetGuid,
return EFI_SUCCESS; IN EFI_FORM_ID FormId,
} IN EFI_HII_PACKAGE_HEADER *Package,
IN UINT32 PackageLength,
STATIC IN UINT16 Label,
EFI_STATUS IN BOOLEAN Insert,
EFIAPI IN EFI_HII_UPDATE_DATA *Data,
UpdateFormPackageData ( OUT UINT8 **TempBuffer,
IN EFI_GUID *FormSetGuid, OUT UINT32 *TempBufferSize
IN EFI_FORM_ID FormId, )
IN EFI_HII_PACKAGE_HEADER *Package, {
IN UINT32 PackageLength, UINTN AddSize;
IN UINT16 Label, UINT8 *BufferPos;
IN BOOLEAN Insert, EFI_HII_PACKAGE_HEADER PackageHeader;
IN EFI_HII_UPDATE_DATA *Data, UINTN Offset;
OUT UINT8 **TempBuffer, EFI_IFR_OP_HEADER *IfrOpHdr;
OUT UINT32 *TempBufferSize BOOLEAN GetFormSet;
) BOOLEAN GetForm;
{ UINT8 ExtendOpCode;
UINTN AddSize; UINT16 LabelNumber;
UINT8 *BufferPos; BOOLEAN Updated;
EFI_HII_PACKAGE_HEADER PackageHeader; EFI_IFR_OP_HEADER *AddOpCode;
UINTN Offset;
EFI_IFR_OP_HEADER *IfrOpHdr; if ((TempBuffer == NULL) || (TempBufferSize == NULL)) {
BOOLEAN GetFormSet; return EFI_INVALID_PARAMETER;
BOOLEAN GetForm; }
UINT8 ExtendOpCode;
UINT16 LabelNumber; *TempBufferSize = PackageLength;
BOOLEAN Updated; if (Data != NULL) {
EFI_IFR_OP_HEADER *AddOpCode; *TempBufferSize += Data->Offset;
}
if ((TempBuffer == NULL) || (TempBufferSize == NULL)) { *TempBuffer = AllocateZeroPool (*TempBufferSize);
return EFI_INVALID_PARAMETER; if (*TempBuffer == NULL) {
} return EFI_OUT_OF_RESOURCES;
}
*TempBufferSize = PackageLength;
if (Data != NULL) { CopyMem (*TempBuffer, Package, sizeof (EFI_HII_PACKAGE_HEADER));
*TempBufferSize += Data->Offset; *TempBufferSize = sizeof (EFI_HII_PACKAGE_HEADER);
} BufferPos = *TempBuffer + sizeof (EFI_HII_PACKAGE_HEADER);
*TempBuffer = AllocateZeroPool (*TempBufferSize);
if (*TempBuffer == NULL) { CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
return EFI_OUT_OF_RESOURCES; IfrOpHdr = (EFI_IFR_OP_HEADER *)((UINT8 *) Package + sizeof (EFI_HII_PACKAGE_HEADER));
} Offset = sizeof (EFI_HII_PACKAGE_HEADER);
GetFormSet = (BOOLEAN) ((FormSetGuid == NULL) ? TRUE : FALSE);
CopyMem (*TempBuffer, Package, sizeof (EFI_HII_PACKAGE_HEADER)); GetForm = FALSE;
*TempBufferSize = sizeof (EFI_HII_PACKAGE_HEADER); Updated = FALSE;
BufferPos = *TempBuffer + sizeof (EFI_HII_PACKAGE_HEADER);
while (Offset < PackageHeader.Length) {
CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER)); CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);
IfrOpHdr = (EFI_IFR_OP_HEADER *)((UINT8 *) Package + sizeof (EFI_HII_PACKAGE_HEADER)); BufferPos += IfrOpHdr->Length;
Offset = sizeof (EFI_HII_PACKAGE_HEADER); *TempBufferSize += IfrOpHdr->Length;
GetFormSet = (BOOLEAN) ((FormSetGuid == NULL) ? TRUE : FALSE);
GetForm = FALSE; switch (IfrOpHdr->OpCode) {
Updated = FALSE; case EFI_IFR_FORM_SET_OP :
if (FormSetGuid != NULL) {
while (Offset < PackageHeader.Length) { if (CompareMem (&((EFI_IFR_FORM_SET *) IfrOpHdr)->Guid, FormSetGuid, sizeof (EFI_GUID)) == 0) {
CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length); GetFormSet = TRUE;
BufferPos += IfrOpHdr->Length; }
*TempBufferSize += IfrOpHdr->Length; }
break;
switch (IfrOpHdr->OpCode) {
case EFI_IFR_FORM_SET_OP : case EFI_IFR_FORM_OP:
if (FormSetGuid != NULL) { if (CompareMem (&((EFI_IFR_FORM *) IfrOpHdr)->FormId, &FormId, sizeof (EFI_FORM_ID)) == 0) {
if (CompareMem (&((EFI_IFR_FORM_SET *) IfrOpHdr)->Guid, FormSetGuid, sizeof (EFI_GUID)) == 0) { GetForm = TRUE;
GetFormSet = TRUE; }
} break;
}
break; case EFI_IFR_GUID_OP :
if (!GetFormSet || !GetForm || Updated) {
case EFI_IFR_FORM_OP: //
if (CompareMem (&((EFI_IFR_FORM *) IfrOpHdr)->FormId, &FormId, sizeof (EFI_FORM_ID)) == 0) { // Go to the next Op-Code
GetForm = TRUE; //
} Offset += IfrOpHdr->Length;
break; IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
continue;
case EFI_IFR_GUID_OP : }
if (!GetFormSet || !GetForm || Updated) {
// ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;
// Go to the next Op-Code CopyMem (&LabelNumber, &((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Number, sizeof (UINT16));
// if ((ExtendOpCode != EFI_IFR_EXTEND_OP_LABEL) || (LabelNumber != Label)) {
Offset += IfrOpHdr->Length; //
IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length); // Go to the next Op-Code
continue; //
} Offset += IfrOpHdr->Length;
IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode; continue;
CopyMem (&LabelNumber, &((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Number, sizeof (UINT16)); }
if ((ExtendOpCode != EFI_IFR_EXTEND_OP_LABEL) || (LabelNumber != Label)) {
// if (Insert && (Data != NULL)) {
// Go to the next Op-Code //
// // insert the DataCount amount of opcodes to TempBuffer if Data is NULL remove
Offset += IfrOpHdr->Length; // DataCount amount of opcodes unless runing into a label.
IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length); //
continue; AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data;
} AddSize = 0;
while (AddSize < Data->Offset) {
if (Insert && (Data != NULL)) { CopyMem (BufferPos, AddOpCode, AddOpCode->Length);
// BufferPos += AddOpCode->Length;
// insert the DataCount amount of opcodes to TempBuffer if Data is NULL remove *TempBufferSize += AddOpCode->Length;
// DataCount amount of opcodes unless runing into a label.
// AddSize += AddOpCode->Length;
AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data; AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length);
AddSize = 0; }
while (AddSize < Data->Offset) { } else {
CopyMem (BufferPos, AddOpCode, AddOpCode->Length); //
BufferPos += AddOpCode->Length; // Search the next Label.
*TempBufferSize += AddOpCode->Length; //
while (TRUE) {
AddSize += AddOpCode->Length; Offset += IfrOpHdr->Length;
AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length); //
} // Search the next label and Fail if not label found.
} else { //
// if (Offset >= PackageHeader.Length) {
// Search the next Label. goto Fail;
// }
while (TRUE) { IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
Offset += IfrOpHdr->Length; if (IfrOpHdr->OpCode == EFI_IFR_GUID_OP) {
// ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;
// Search the next label and Fail if not label found. if (ExtendOpCode == EFI_IFR_EXTEND_OP_LABEL) {
// break;
if (Offset >= PackageHeader.Length) { }
goto Fail; }
} }
IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
if (IfrOpHdr->OpCode == EFI_IFR_GUID_OP) { if (Data != NULL) {
ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode; AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data;
if (ExtendOpCode == EFI_IFR_EXTEND_OP_LABEL) { AddSize = 0;
break; while (AddSize < Data->Offset) {
} CopyMem (BufferPos, AddOpCode, AddOpCode->Length);
} BufferPos += AddOpCode->Length;
} *TempBufferSize += AddOpCode->Length;
if (Data != NULL) { AddSize += AddOpCode->Length;
AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data; AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length);
AddSize = 0; }
while (AddSize < Data->Offset) { }
CopyMem (BufferPos, AddOpCode, AddOpCode->Length);
BufferPos += AddOpCode->Length; //
*TempBufferSize += AddOpCode->Length; // copy the next label
//
AddSize += AddOpCode->Length; CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);
AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length); BufferPos += IfrOpHdr->Length;
} *TempBufferSize += IfrOpHdr->Length;
} }
// Updated = TRUE;
// copy the next label break;
// default :
CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length); break;
BufferPos += IfrOpHdr->Length; }
*TempBufferSize += IfrOpHdr->Length;
} //
// Go to the next Op-Code
Updated = TRUE; //
break; Offset += IfrOpHdr->Length;
default : IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
break; }
}
//
// // Update the package length.
// Go to the next Op-Code //
// PackageHeader.Length = *TempBufferSize;
Offset += IfrOpHdr->Length; CopyMem (*TempBuffer, &PackageHeader, sizeof (EFI_HII_PACKAGE_HEADER));
IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
} Fail:
if (!Updated) {
// gBS->FreePool (*TempBuffer);
// Update the package length. *TempBufferSize = 0;
// return EFI_NOT_FOUND;
PackageHeader.Length = *TempBufferSize; }
CopyMem (*TempBuffer, &PackageHeader, sizeof (EFI_HII_PACKAGE_HEADER));
return EFI_SUCCESS;
Fail: }
if (!Updated) {
gBS->FreePool (*TempBuffer);
*TempBufferSize = 0; /**
return EFI_NOT_FOUND; This function allows the caller to update a form that has
} previously been registered with the EFI HII database.
return EFI_SUCCESS; @param Handle Hii Handle
} @param FormSetGuid The formset should be updated.
@param FormId The form should be updated.
@param Label Update information starting immediately after this
/** label in the IFR
This function allows the caller to update a form that has @param Insert If TRUE and Data is not NULL, insert data after
previously been registered with the EFI HII database. Label. If FALSE, replace opcodes between two
labels with Data
@param Handle Hii Handle @param Data The adding data; If NULL, remove opcodes between
@param FormSetGuid The formset should be updated. two Label.
@param FormId The form should be updated.
@param Label Update information starting immediately after this @retval EFI_SUCCESS Update success.
label in the IFR @retval Other Update fail.
@param Insert If TRUE and Data is not NULL, insert data after
Label. If FALSE, replace opcodes between two **/
labels with Data EFI_STATUS
@param Data The adding data; If NULL, remove opcodes between EFIAPI
two Label. IfrLibUpdateForm (
IN EFI_HII_HANDLE Handle,
@retval EFI_SUCCESS Update success. IN EFI_GUID *FormSetGuid, OPTIONAL
@retval Other Update fail. IN EFI_FORM_ID FormId,
IN UINT16 Label,
**/ IN BOOLEAN Insert,
EFI_STATUS IN EFI_HII_UPDATE_DATA *Data
EFIAPI )
IfrLibUpdateForm ( {
IN EFI_HII_HANDLE Handle, EFI_STATUS Status;
IN EFI_GUID *FormSetGuid, OPTIONAL EFI_HII_DATABASE_PROTOCOL *HiiDatabase;
IN EFI_FORM_ID FormId, EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList;
IN UINT16 Label, UINT32 Index;
IN BOOLEAN Insert, EFI_HII_PACKAGE_LIST_HEADER *UpdateBuffer;
IN EFI_HII_UPDATE_DATA *Data UINTN BufferSize;
) UINT8 *UpdateBufferPos;
{ EFI_HII_PACKAGE_HEADER PackageHeader;
EFI_STATUS Status; EFI_HII_PACKAGE_HEADER *Package;
EFI_HII_DATABASE_PROTOCOL *HiiDatabase; UINT32 PackageLength;
EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList; EFI_HII_PACKAGE_HEADER *TempBuffer;
UINT32 Index; UINT32 TempBufferSize;
EFI_HII_PACKAGE_LIST_HEADER *UpdateBuffer; BOOLEAN Updated;
UINTN BufferSize;
UINT8 *UpdateBufferPos; if (Data == NULL) {
EFI_HII_PACKAGE_HEADER PackageHeader; return EFI_INVALID_PARAMETER;
EFI_HII_PACKAGE_HEADER *Package; }
UINT32 PackageLength;
EFI_HII_PACKAGE_HEADER *TempBuffer; HiiDatabase = gIfrLibHiiDatabase;
UINT32 TempBufferSize;
BOOLEAN Updated; //
// Get the orginal package list
if (Data == NULL) { //
return EFI_INVALID_PARAMETER; BufferSize = 0;
} HiiPackageList = NULL;
Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);
HiiDatabase = gIfrLibHiiDatabase; if (Status == EFI_BUFFER_TOO_SMALL) {
HiiPackageList = AllocatePool (BufferSize);
// ASSERT (HiiPackageList != NULL);
// Get the orginal package list
// Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);
BufferSize = 0; if (EFI_ERROR (Status)) {
HiiPackageList = NULL; gBS->FreePool (HiiPackageList);
Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList); return Status;
if (Status == EFI_BUFFER_TOO_SMALL) { }
HiiPackageList = AllocatePool (BufferSize); }
ASSERT (HiiPackageList != NULL);
//
Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList); // Calculate and allocate space for retrieval of IFR data
if (EFI_ERROR (Status)) { //
gBS->FreePool (HiiPackageList); BufferSize += Data->Offset;
return Status; UpdateBuffer = AllocateZeroPool (BufferSize);
} if (UpdateBuffer == NULL) {
} return EFI_OUT_OF_RESOURCES;
}
//
// Calculate and allocate space for retrieval of IFR data UpdateBufferPos = (UINT8 *) UpdateBuffer;
//
BufferSize += Data->Offset; //
UpdateBuffer = AllocateZeroPool (BufferSize); // copy the package list header
if (UpdateBuffer == NULL) { //
return EFI_OUT_OF_RESOURCES; CopyMem (UpdateBufferPos, HiiPackageList, sizeof (EFI_HII_PACKAGE_LIST_HEADER));
} UpdateBufferPos += sizeof (EFI_HII_PACKAGE_LIST_HEADER);
UpdateBufferPos = (UINT8 *) UpdateBuffer; Updated = FALSE;
for (Index = 0; ; Index++) {
// Status = GetPackageDataFromPackageList (HiiPackageList, Index, &PackageLength, &Package);
// copy the package list header if (Status == EFI_SUCCESS) {
// CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
CopyMem (UpdateBufferPos, HiiPackageList, sizeof (EFI_HII_PACKAGE_LIST_HEADER)); if ((PackageHeader.Type == EFI_HII_PACKAGE_FORM) && !Updated) {
UpdateBufferPos += sizeof (EFI_HII_PACKAGE_LIST_HEADER); Status = UpdateFormPackageData (FormSetGuid, FormId, Package, PackageLength, Label, Insert, Data, (UINT8 **)&TempBuffer, &TempBufferSize);
if (!EFI_ERROR(Status)) {
Updated = FALSE; if (FormSetGuid == NULL) {
for (Index = 0; ; Index++) { Updated = TRUE;
Status = GetPackageDataFromPackageList (HiiPackageList, Index, &PackageLength, &Package); }
if (Status == EFI_SUCCESS) { CopyMem (UpdateBufferPos, TempBuffer, TempBufferSize);
CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER)); UpdateBufferPos += TempBufferSize;
if ((PackageHeader.Type == EFI_HII_PACKAGE_FORM) && !Updated) { gBS->FreePool (TempBuffer);
Status = UpdateFormPackageData (FormSetGuid, FormId, Package, PackageLength, Label, Insert, Data, (UINT8 **)&TempBuffer, &TempBufferSize); continue;
if (!EFI_ERROR(Status)) { }
if (FormSetGuid == NULL) { }
Updated = TRUE;
} CopyMem (UpdateBufferPos, Package, PackageLength);
CopyMem (UpdateBufferPos, TempBuffer, TempBufferSize); UpdateBufferPos += PackageLength;
UpdateBufferPos += TempBufferSize; } else if (Status == EFI_NOT_FOUND) {
gBS->FreePool (TempBuffer); break;
continue; } else {
} gBS->FreePool (HiiPackageList);
} return Status;
}
CopyMem (UpdateBufferPos, Package, PackageLength); }
UpdateBufferPos += PackageLength;
} else if (Status == EFI_NOT_FOUND) { //
break; // Update package list length
} else { //
gBS->FreePool (HiiPackageList); BufferSize = UpdateBufferPos - (UINT8 *) UpdateBuffer;
return Status; CopyMem (&UpdateBuffer->PackageLength, &BufferSize, sizeof (UINT32));
}
} gBS->FreePool (HiiPackageList);
// return HiiDatabase->UpdatePackageList (HiiDatabase, Handle, UpdateBuffer);
// Update package list length }
//
BufferSize = UpdateBufferPos - (UINT8 *) UpdateBuffer;
CopyMem (&UpdateBuffer->PackageLength, &BufferSize, sizeof (UINT32)); /**
Configure the buffer accrording to ConfigBody strings.
gBS->FreePool (HiiPackageList);
@param DefaultId the ID of default.
return HiiDatabase->UpdatePackageList (HiiDatabase, Handle, UpdateBuffer); @param Buffer the start address of buffer.
} @param BufferSize the size of buffer.
@param Number the number of the strings.
/** @retval EFI_BUFFER_TOO_SMALL the BufferSize is too small to operate.
Configure the buffer accrording to ConfigBody strings. @retval EFI_INVALID_PARAMETER Buffer is NULL or BufferSize is 0.
@retval EFI_SUCCESS Operation successful.
@param DefaultId the ID of default.
@param Buffer the start address of buffer. **/
@param BufferSize the size of buffer. EFI_STATUS
@param Number the number of the strings. EFIAPI
IfrLibExtractDefault(
@retval EFI_BUFFER_TOO_SMALL the BufferSize is too small to operate. IN VOID *Buffer,
@retval EFI_INVALID_PARAMETER Buffer is NULL or BufferSize is 0. IN UINTN *BufferSize,
@retval EFI_SUCCESS Operation successful. UINTN Number,
...
**/ )
EFI_STATUS {
EFIAPI VA_LIST Args;
IfrLibExtractDefault( UINTN Index;
IN VOID *Buffer, UINT32 TotalLen;
IN UINTN *BufferSize, UINT8 *BufCfgArray;
UINTN Number, UINT8 *BufferPos;
... UINT16 Offset;
) UINT16 Width;
{ UINT8 *Value;
VA_LIST Args;
UINTN Index; if ((Buffer == NULL) || (BufferSize == NULL)) {
UINT32 TotalLen; return EFI_INVALID_PARAMETER;
UINT8 *BufCfgArray; }
UINT8 *BufferPos;
UINT16 Offset; Offset = 0;
UINT16 Width; Width = 0;
UINT8 *Value; Value = NULL;
if ((Buffer == NULL) || (BufferSize == NULL)) { VA_START (Args, Number);
return EFI_INVALID_PARAMETER; for (Index = 0; Index < Number; Index++) {
} BufCfgArray = (UINT8 *) VA_ARG (Args, VOID *);
CopyMem (&TotalLen, BufCfgArray, sizeof (UINT32));
Offset = 0; BufferPos = BufCfgArray + sizeof (UINT32);
Width = 0;
Value = NULL; while ((UINT32)(BufferPos - BufCfgArray) < TotalLen) {
CopyMem (&Offset, BufferPos, sizeof (UINT16));
VA_START (Args, Number); BufferPos += sizeof (UINT16);
for (Index = 0; Index < Number; Index++) { CopyMem (&Width, BufferPos, sizeof (UINT16));
BufCfgArray = (UINT8 *) VA_ARG (Args, VOID *); BufferPos += sizeof (UINT16);
CopyMem (&TotalLen, BufCfgArray, sizeof (UINT32)); Value = BufferPos;
BufferPos = BufCfgArray + sizeof (UINT32); BufferPos += Width;
while ((UINT32)(BufferPos - BufCfgArray) < TotalLen) { if ((UINTN)(Offset + Width) > *BufferSize) {
CopyMem (&Offset, BufferPos, sizeof (UINT16)); return EFI_BUFFER_TOO_SMALL;
BufferPos += sizeof (UINT16); }
CopyMem (&Width, BufferPos, sizeof (UINT16));
BufferPos += sizeof (UINT16); CopyMem ((UINT8 *)Buffer + Offset, Value, Width);
Value = BufferPos; }
BufferPos += Width; }
VA_END (Args);
if ((UINTN)(Offset + Width) > *BufferSize) {
return EFI_BUFFER_TOO_SMALL; *BufferSize = (UINTN)Offset;
}
return EFI_SUCCESS;
CopyMem ((UINT8 *)Buffer + Offset, Value, Width); }
}
}
VA_END (Args);
*BufferSize = (UINTN)Offset;
return EFI_SUCCESS;
}

View File

@ -1,63 +1,53 @@
/** @file /** @file
Library Routines to create IFR independent of string data - assume tokens already exist
Copyright (c) 2007, Intel Corporation Primarily to be used for exporting op-codes at a label in pre-defined forms.
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License Copyright (c) 2007 - 2008, Intel Corporation. <BR>
which accompanies this distribution. The full text of the license may be found at All rights reserved. This program and the accompanying materials
http://opensource.org/licenses/bsd-license.php 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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, http://opensource.org/licenses/bsd-license.php
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
Module Name: WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
UefiIfrOpCodeCreation.c **/
Abstract: #include "LibraryInternal.h"
Library Routines to create IFR independent of string data - assume tokens already exist STATIC EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID;
Primarily to be used for exporting op-codes at a label in pre-defined forms.
EFI_STATUS
Revision History: EFIAPI
CreateBannerOpCode (
IN EFI_STRING_ID Title,
**/ IN UINT16 LineNumber,
IN UINT8 Alignment,
#include "LibraryInternal.h" IN OUT EFI_HII_UPDATE_DATA *Data
)
STATIC EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID; {
EFI_IFR_GUID_BANNER Banner;
EFI_STATUS UINT8 *LocalBuffer;
EFIAPI
CreateBannerOpCode ( ASSERT (Data != NULL && Data->Data != NULL);
IN EFI_STRING_ID Title,
IN UINT16 LineNumber, if (Data->Offset + sizeof (EFI_IFR_GUID_BANNER) > Data->BufferSize) {
IN UINT8 Alignment, return EFI_BUFFER_TOO_SMALL;
IN OUT EFI_HII_UPDATE_DATA *Data }
)
{ Banner.Header.OpCode = EFI_IFR_GUID_OP;
EFI_IFR_GUID_BANNER Banner; Banner.Header.Length = sizeof (EFI_IFR_GUID_BANNER);
UINT8 *LocalBuffer; Banner.Header.Scope = 0;
CopyMem (&Banner.Guid, &mIfrVendorGuid, sizeof (EFI_IFR_GUID));
ASSERT (Data != NULL && Data->Data != NULL); Banner.ExtendOpCode = EFI_IFR_EXTEND_OP_BANNER;
Banner.Title = Title;
if (Data->Offset + sizeof (EFI_IFR_GUID_BANNER) > Data->BufferSize) { Banner.LineNumber = LineNumber;
return EFI_BUFFER_TOO_SMALL; Banner.Alignment = Alignment;
}
LocalBuffer = (UINT8 *) Data->Data + Data->Offset;
Banner.Header.OpCode = EFI_IFR_GUID_OP; CopyMem (LocalBuffer, &Banner, sizeof (EFI_IFR_GUID_BANNER));
Banner.Header.Length = sizeof (EFI_IFR_GUID_BANNER); Data->Offset += sizeof (EFI_IFR_GUID_BANNER);
Banner.Header.Scope = 0;
CopyMem (&Banner.Guid, &mIfrVendorGuid, sizeof (EFI_IFR_GUID)); return EFI_SUCCESS;
Banner.ExtendOpCode = EFI_IFR_EXTEND_OP_BANNER; }
Banner.Title = Title;
Banner.LineNumber = LineNumber;
Banner.Alignment = Alignment;
LocalBuffer = (UINT8 *) Data->Data + Data->Offset;
CopyMem (LocalBuffer, &Banner, sizeof (EFI_IFR_GUID_BANNER));
Data->Offset += sizeof (EFI_IFR_GUID_BANNER);
return EFI_SUCCESS;
}

View File

@ -1,46 +1,38 @@
/** @file /** @file
The file contain all library function for Ifr Operations.
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials Copyright (c) 2007 - 2008, Intel Corporation. <BR>
are licensed and made available under the terms and conditions of the BSD License All rights reserved. This program and the accompanying materials
which accompanies this distribution. The full text of the license may be found at are licensed and made available under the terms and conditions of the BSD License
http://opensource.org/licenses/bsd-license.php 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. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
**/
UefiIfrLibraryInternal
#ifndef _IFRLIBRARY_INTERNAL_H
Abstract: #define _IFRLIBRARY_INTERNAL_H
The file contain all library function for Ifr Operations.
#include <PiDxe.h>
**/ #include <Guid/GlobalVariable.h>
#include <Protocol/DevicePath.h>
#ifndef _IFRLIBRARY_INTERNAL_H
#define _IFRLIBRARY_INTERNAL_H #include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <PiDxe.h> #include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Guid/GlobalVariable.h> #include <Library/DevicePathLib.h>
#include <Protocol/DevicePath.h> #include <Library/MemoryAllocationLib.h>
#include <Library/IfrSupportLib.h>
#include <Library/DebugLib.h> #include <Library/PcdLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiRuntimeServicesTableLib.h> #include <MdeModuleHii.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h> #include "R8Lib.h"
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h> #endif
#include <Library/IfrSupportLib.h>
#include <Library/PcdLib.h>
#include <MdeModuleHii.h>
#include "R8Lib.h"
#endif

View File

@ -1,241 +1,241 @@
/**@file /** @file
Copyright (c) 2007, Intel Corporation <Todo: Add file description>
All rights reserved. This program and the accompanying materials Copyright (c) 2007 - 2008, Intel Corporation. <BR>
are licensed and made available under the terms and conditions of the BSD License All rights reserved. This program and the accompanying materials
which accompanies this distribution. The full text of the license may be found at are licensed and made available under the terms and conditions of the BSD License
http://opensource.org/licenses/bsd-license.php 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. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#include "LibraryInternal.h" #include "LibraryInternal.h"
CHAR16 CHAR16
InternalNibbleToHexChar ( InternalNibbleToHexChar (
IN UINT8 Nibble IN UINT8 Nibble
) )
/*++ /*++
Routine Description: Routine Description:
Converts the low nibble of a byte to hex unicode character. Converts the low nibble of a byte to hex unicode character.
Arguments: Arguments:
Nibble - lower nibble of a byte. Nibble - lower nibble of a byte.
Returns: Returns:
Hex unicode character. Hex unicode character.
--*/ --*/
{ {
Nibble &= 0x0F; Nibble &= 0x0F;
if (Nibble <= 0x9) { if (Nibble <= 0x9) {
return (CHAR16)(Nibble + L'0'); return (CHAR16)(Nibble + L'0');
} }
return (CHAR16)(Nibble - 0xA + L'A'); return (CHAR16)(Nibble - 0xA + L'A');
} }
/** /**
Converts binary buffer to Unicode string. Converts binary buffer to Unicode string.
At a minimum, any blob of data could be represented as a hex string. At a minimum, any blob of data could be represented as a hex string.
@param Str Pointer to the string. @param Str Pointer to the string.
@param HexStringBufferLength Length in bytes of buffer to hold the hex string. @param HexStringBufferLength Length in bytes of buffer to hold the hex string.
Includes tailing '\0' character. If routine return Includes tailing '\0' character. If routine return
with EFI_SUCCESS, containing length of hex string with EFI_SUCCESS, containing length of hex string
buffer. If routine return with buffer. If routine return with
EFI_BUFFER_TOO_SMALL, containg length of hex EFI_BUFFER_TOO_SMALL, containg length of hex
string buffer desired. string buffer desired.
@param Buf Buffer to be converted from. @param Buf Buffer to be converted from.
@param Len Length in bytes of the buffer to be converted. @param Len Length in bytes of the buffer to be converted.
@retval EFI_SUCCESS Routine success. @retval EFI_SUCCESS Routine success.
@retval EFI_BUFFER_TOO_SMALL The hex string buffer is too small. @retval EFI_BUFFER_TOO_SMALL The hex string buffer is too small.
**/ **/
EFI_STATUS EFI_STATUS
R8_BufToHexString ( R8_BufToHexString (
IN OUT CHAR16 *Str, IN OUT CHAR16 *Str,
IN OUT UINTN *HexStringBufferLength, IN OUT UINTN *HexStringBufferLength,
IN UINT8 *Buf, IN UINT8 *Buf,
IN UINTN Len IN UINTN Len
) )
{ {
// //
// Porting Guide: // Porting Guide:
// This library interface is simply obsolete. // This library interface is simply obsolete.
// Include the source code to user code. // Include the source code to user code.
// //
UINTN Idx; UINTN Idx;
UINT8 Byte; UINT8 Byte;
UINTN StrLen; UINTN StrLen;
// //
// Make sure string is either passed or allocate enough. // Make sure string is either passed or allocate enough.
// It takes 2 Unicode characters (4 bytes) to represent 1 byte of the binary buffer. // It takes 2 Unicode characters (4 bytes) to represent 1 byte of the binary buffer.
// Plus the Unicode termination character. // Plus the Unicode termination character.
// //
StrLen = Len * 2; StrLen = Len * 2;
if (StrLen > ((*HexStringBufferLength) - 1)) { if (StrLen > ((*HexStringBufferLength) - 1)) {
*HexStringBufferLength = StrLen + 1; *HexStringBufferLength = StrLen + 1;
return EFI_BUFFER_TOO_SMALL; return EFI_BUFFER_TOO_SMALL;
} }
*HexStringBufferLength = StrLen + 1; *HexStringBufferLength = StrLen + 1;
// //
// Ends the string. // Ends the string.
// //
Str[StrLen] = L'\0'; Str[StrLen] = L'\0';
for (Idx = 0; Idx < Len; Idx++) { for (Idx = 0; Idx < Len; Idx++) {
Byte = Buf[Idx]; Byte = Buf[Idx];
Str[StrLen - 1 - Idx * 2] = InternalNibbleToHexChar (Byte); Str[StrLen - 1 - Idx * 2] = InternalNibbleToHexChar (Byte);
Str[StrLen - 2 - Idx * 2] = InternalNibbleToHexChar ((UINT8)(Byte >> 4)); Str[StrLen - 2 - Idx * 2] = InternalNibbleToHexChar ((UINT8)(Byte >> 4));
} }
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
Converts Unicode string to binary buffer. Converts Unicode string to binary buffer.
The conversion may be partial. The conversion may be partial.
The first character in the string that is not hex digit stops the conversion. The first character in the string that is not hex digit stops the conversion.
At a minimum, any blob of data could be represented as a hex string. At a minimum, any blob of data could be represented as a hex string.
@param Buf Pointer to buffer that receives the data. @param Buf Pointer to buffer that receives the data.
@param Len Length in bytes of the buffer to hold converted @param Len Length in bytes of the buffer to hold converted
data. If routine return with EFI_SUCCESS, data. If routine return with EFI_SUCCESS,
containing length of converted data. If routine containing length of converted data. If routine
return with EFI_BUFFER_TOO_SMALL, containg length return with EFI_BUFFER_TOO_SMALL, containg length
of buffer desired. of buffer desired.
@param Str String to be converted from. @param Str String to be converted from.
@param ConvertedStrLen Length of the Hex String consumed. @param ConvertedStrLen Length of the Hex String consumed.
@retval EFI_SUCCESS Routine Success. @retval EFI_SUCCESS Routine Success.
@retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold converted data. @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold converted data.
**/ **/
EFI_STATUS EFI_STATUS
R8_HexStringToBuf ( R8_HexStringToBuf (
IN OUT UINT8 *Buf, IN OUT UINT8 *Buf,
IN OUT UINTN *Len, IN OUT UINTN *Len,
IN CHAR16 *Str, IN CHAR16 *Str,
OUT UINTN *ConvertedStrLen OPTIONAL OUT UINTN *ConvertedStrLen OPTIONAL
) )
{ {
// //
// Porting Guide: // Porting Guide:
// This library interface is simply obsolete. // This library interface is simply obsolete.
// Include the source code to user code. // Include the source code to user code.
// //
UINTN HexCnt; UINTN HexCnt;
UINTN Idx; UINTN Idx;
UINTN BufferLength; UINTN BufferLength;
UINT8 Digit; UINT8 Digit;
UINT8 Byte; UINT8 Byte;
// //
// Find out how many hex characters the string has. // Find out how many hex characters the string has.
// //
for (Idx = 0, HexCnt = 0; R8_IsHexDigit (&Digit, Str[Idx]); Idx++, HexCnt++); for (Idx = 0, HexCnt = 0; R8_IsHexDigit (&Digit, Str[Idx]); Idx++, HexCnt++);
if (HexCnt == 0) { if (HexCnt == 0) {
*Len = 0; *Len = 0;
return EFI_SUCCESS; return EFI_SUCCESS;
} }
// //
// Two Unicode characters make up 1 buffer byte. Round up. // Two Unicode characters make up 1 buffer byte. Round up.
// //
BufferLength = (HexCnt + 1) / 2; BufferLength = (HexCnt + 1) / 2;
// //
// Test if buffer is passed enough. // Test if buffer is passed enough.
// //
if (BufferLength > (*Len)) { if (BufferLength > (*Len)) {
*Len = BufferLength; *Len = BufferLength;
return EFI_BUFFER_TOO_SMALL; return EFI_BUFFER_TOO_SMALL;
} }
*Len = BufferLength; *Len = BufferLength;
for (Idx = 0; Idx < HexCnt; Idx++) { for (Idx = 0; Idx < HexCnt; Idx++) {
R8_IsHexDigit (&Digit, Str[HexCnt - 1 - Idx]); R8_IsHexDigit (&Digit, Str[HexCnt - 1 - Idx]);
// //
// For odd charaters, write the lower nibble for each buffer byte, // For odd charaters, write the lower nibble for each buffer byte,
// and for even characters, the upper nibble. // and for even characters, the upper nibble.
// //
if ((Idx & 1) == 0) { if ((Idx & 1) == 0) {
Byte = Digit; Byte = Digit;
} else { } else {
Byte = Buf[Idx / 2]; Byte = Buf[Idx / 2];
Byte &= 0x0F; Byte &= 0x0F;
Byte = (UINT8) (Byte | Digit << 4); Byte = (UINT8) (Byte | Digit << 4);
} }
Buf[Idx / 2] = Byte; Buf[Idx / 2] = Byte;
} }
if (ConvertedStrLen != NULL) { if (ConvertedStrLen != NULL) {
*ConvertedStrLen = HexCnt; *ConvertedStrLen = HexCnt;
} }
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
Determines if a Unicode character is a hexadecimal digit. Determines if a Unicode character is a hexadecimal digit.
The test is case insensitive. The test is case insensitive.
@param Digit Pointer to byte that receives the value of the hex @param Digit Pointer to byte that receives the value of the hex
character. character.
@param Char Unicode character to test. @param Char Unicode character to test.
@retval TRUE If the character is a hexadecimal digit. @retval TRUE If the character is a hexadecimal digit.
@retval FALSE Otherwise. @retval FALSE Otherwise.
**/ **/
BOOLEAN BOOLEAN
R8_IsHexDigit ( R8_IsHexDigit (
OUT UINT8 *Digit, OUT UINT8 *Digit,
IN CHAR16 Char IN CHAR16 Char
) )
{ {
// //
// Porting Guide: // Porting Guide:
// This library interface is simply obsolete. // This library interface is simply obsolete.
// Include the source code to user code. // Include the source code to user code.
// //
if ((Char >= L'0') && (Char <= L'9')) { if ((Char >= L'0') && (Char <= L'9')) {
*Digit = (UINT8) (Char - L'0'); *Digit = (UINT8) (Char - L'0');
return TRUE; return TRUE;
} }
if ((Char >= L'A') && (Char <= L'F')) { if ((Char >= L'A') && (Char <= L'F')) {
*Digit = (UINT8) (Char - L'A' + 0x0A); *Digit = (UINT8) (Char - L'A' + 0x0A);
return TRUE; return TRUE;
} }
if ((Char >= L'a') && (Char <= L'f')) { if ((Char >= L'a') && (Char <= L'f')) {
*Digit = (UINT8) (Char - L'a' + 0x0A); *Digit = (UINT8) (Char - L'a' + 0x0A);
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }

View File

@ -1,93 +1,93 @@
/**@file /** @file
Copyright (c) 2007, Intel Corporation <Todo: Add file description>
All rights reserved. This program and the accompanying materials Copyright (c) 2007 - 2008, Intel Corporation. <BR>
are licensed and made available under the terms and conditions of the BSD License All rights reserved. This program and the accompanying materials
which accompanies this distribution. The full text of the license may be found at are licensed and made available under the terms and conditions of the BSD License
http://opensource.org/licenses/bsd-license.php 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. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
/** /**
Converts binary buffer to Unicode string. Converts binary buffer to Unicode string.
At a minimum, any blob of data could be represented as a hex string. At a minimum, any blob of data could be represented as a hex string.
@param Str Pointer to the string. @param Str Pointer to the string.
@param HexStringBufferLength Length in bytes of buffer to hold the hex string. @param HexStringBufferLength Length in bytes of buffer to hold the hex string.
Includes tailing '\0' character. If routine return Includes tailing '\0' character. If routine return
with EFI_SUCCESS, containing length of hex string with EFI_SUCCESS, containing length of hex string
buffer. If routine return with buffer. If routine return with
EFI_BUFFER_TOO_SMALL, containg length of hex EFI_BUFFER_TOO_SMALL, containg length of hex
string buffer desired. string buffer desired.
@param Buf Buffer to be converted from. @param Buf Buffer to be converted from.
@param Len Length in bytes of the buffer to be converted. @param Len Length in bytes of the buffer to be converted.
@retval EFI_SUCCESS Routine success. @retval EFI_SUCCESS Routine success.
@retval EFI_BUFFER_TOO_SMALL The hex string buffer is too small. @retval EFI_BUFFER_TOO_SMALL The hex string buffer is too small.
**/ **/
EFI_STATUS EFI_STATUS
R8_BufToHexString ( R8_BufToHexString (
IN OUT CHAR16 *Str, IN OUT CHAR16 *Str,
IN OUT UINTN *HexStringBufferLength, IN OUT UINTN *HexStringBufferLength,
IN UINT8 *Buf, IN UINT8 *Buf,
IN UINTN Len IN UINTN Len
) )
; ;
/** /**
Converts Unicode string to binary buffer. Converts Unicode string to binary buffer.
The conversion may be partial. The conversion may be partial.
The first character in the string that is not hex digit stops the conversion. The first character in the string that is not hex digit stops the conversion.
At a minimum, any blob of data could be represented as a hex string. At a minimum, any blob of data could be represented as a hex string.
@param Buf Pointer to buffer that receives the data. @param Buf Pointer to buffer that receives the data.
@param Len Length in bytes of the buffer to hold converted @param Len Length in bytes of the buffer to hold converted
data. If routine return with EFI_SUCCESS, data. If routine return with EFI_SUCCESS,
containing length of converted data. If routine containing length of converted data. If routine
return with EFI_BUFFER_TOO_SMALL, containg length return with EFI_BUFFER_TOO_SMALL, containg length
of buffer desired. of buffer desired.
@param Str String to be converted from. @param Str String to be converted from.
@param ConvertedStrLen Length of the Hex String consumed. @param ConvertedStrLen Length of the Hex String consumed.
@retval EFI_SUCCESS Routine Success. @retval EFI_SUCCESS Routine Success.
@retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold converted data. @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold converted data.
**/ **/
EFI_STATUS EFI_STATUS
R8_HexStringToBuf ( R8_HexStringToBuf (
IN OUT UINT8 *Buf, IN OUT UINT8 *Buf,
IN OUT UINTN *Len, IN OUT UINTN *Len,
IN CHAR16 *Str, IN CHAR16 *Str,
OUT UINTN *ConvertedStrLen OPTIONAL OUT UINTN *ConvertedStrLen OPTIONAL
) )
; ;
/** /**
Determines if a Unicode character is a hexadecimal digit. Determines if a Unicode character is a hexadecimal digit.
The test is case insensitive. The test is case insensitive.
@param Digit Pointer to byte that receives the value of the hex @param Digit Pointer to byte that receives the value of the hex
character. character.
@param Char Unicode character to test. @param Char Unicode character to test.
@retval TRUE If the character is a hexadecimal digit. @retval TRUE If the character is a hexadecimal digit.
@retval FALSE Otherwise. @retval FALSE Otherwise.
**/ **/
BOOLEAN BOOLEAN
R8_IsHexDigit ( R8_IsHexDigit (
OUT UINT8 *Digit, OUT UINT8 *Digit,
IN CHAR16 Char IN CHAR16 Char
) )
; ;

View File

@ -1,6 +1,7 @@
/*++ /** @file
Performance Library
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -9,15 +10,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: **/
PeiPerformanceLib.c
Abstract:
Performance Library
--*/
#include <PiPei.h> #include <PiPei.h>

View File

@ -1,17 +1,18 @@
#/** @file #/** @file
# Memory-only library functions with no library constructor/destructor #
# # Memory-only library functions with no library constructor/destructor
# This module provides the performance measurement interfaces in PEI phase, it is one instance of Performance Libarary. #
# Copyright (c) 2006, Intel Corporation # This module provides the performance measurement interfaces in PEI phase, it is one instance of Performance Libarary.
# #
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
#
#**/ #**/
[Defines] [Defines]

View File

@ -1,7 +1,7 @@
/**@file /** @file
Recovery Library. This library class defines a set of methods related do recovery. Recovery Library. This library class defines a set of methods related do recovery.
Copyright (c) 2006 - 2007 Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at

View File

@ -1,16 +1,16 @@
#/** @file #/** @file
# Recovery for PEIM #
# # Recovery for PEIM
# Copyright (c) 2006 - 2007, Intel Corporation. #
# # Copyright (c) 2006 - 2008, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
#
#**/ #**/
[Defines] [Defines]

View File

@ -1,7 +1,7 @@
/**@file /** @file
S3 Library. This library class defines a set of methods related do S3 mode S3 Library. This library class defines a set of methods related do S3 mode
Copyright (c) 2006 - 2007 Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at

View File

@ -1,17 +1,18 @@
#/** @file #/** @file
# Graphics Library for UEFI drivers #
# # Graphics Library for UEFI drivers
# This library provides supports for basic graphic functions. #
# Copyright (c) 2006 - 2007, Intel Corporation. # This library provides supports for basic graphic functions.
# #
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
#
#**/ #**/
[Defines] [Defines]

View File

@ -1,24 +1,17 @@
/*++ /** @file
Copyright (c) 2004 - 2006, 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.
Module Name:
BdsPlatform.c
Abstract:
This file include all platform action which can be customized This file include all platform action which can be customized
by IBV/OEM. by IBV/OEM.
--*/ Copyright (c) 2004 - 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
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.
**/
#include "BdsPlatform.h" #include "BdsPlatform.h"

View File

@ -1,23 +1,16 @@
/*++ /** @file
Copyright (c) 2004 - 2006, 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.
Module Name:
BdsPlatform.h
Abstract:
Head file for BDS Platform specific code Head file for BDS Platform specific code
--*/ Copyright (c) 2004 - 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
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 _BDS_PLATFORM_H #ifndef _BDS_PLATFORM_H
#define _BDS_PLATFORM_H #define _BDS_PLATFORM_H

View File

@ -1,18 +1,16 @@
#/** @file #/** @file
# Component name for module GenericBdsLib
#
# FIX ME!
# Copyright (c) 2007, Intel Corporation. All rights reserved.
#
# 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, # Component name for module GenericBdsLib
#
# 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
# 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. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
#
#**/ #**/
[Defines] [Defines]

View File

@ -1,24 +1,17 @@
/*++ /** @file
Copyright (c) 2004 - 2006, 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.
Module Name:
PlatformData.c
Abstract:
Defined the platform specific device path which will be used by Defined the platform specific device path which will be used by
platform Bbd to perform the platform policy connect. platform Bbd to perform the platform policy connect.
--*/ Copyright (c) 2004 - 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
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.
**/
#include "BdsPlatform.h" #include "BdsPlatform.h"