From: vanjeff Date: Mon, 16 Jul 2007 03:28:26 +0000 (+0000) Subject: Modules clean up. X-Git-Tag: edk2-stable201903~22719 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=ececc2eb4b589cc55eabcabbafbd067ff3432df0 Modules clean up. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3242 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc index 7aff781e7b..6d47bcfd0b 100644 --- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc +++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc @@ -186,13 +186,13 @@ $(WORKSPACE)/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf $(WORKSPACE)/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.inf $(WORKSPACE)/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/SetupBrowser.inf - $(WORKSPACE)/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.inf + $(WORKSPACE)/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf $(WORKSPACE)/IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPortDxe.inf -[Components.IA32] +[Components.IA32] $(WORKSPACE)/IntelFrameworkModulePkg/PcatCompatible/RealTimeClockRuntimeDxe/PcRtc.inf -[Components.X64] +[Components.X64] $(WORKSPACE)/IntelFrameworkModulePkg/PcatCompatible/RealTimeClockRuntimeDxe/PcRtc.inf diff --git a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/CommonHeader.h b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/CommonHeader.h deleted file mode 100644 index e6af6a2461..0000000000 --- a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/CommonHeader.h +++ /dev/null @@ -1,42 +0,0 @@ -/**@file - Common header file shared by all source files. - - This file includes package header files, library classes and protocol, PPI & GUID definitions. - - 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 __COMMON_HEADER_H_ -#define __COMMON_HEADER_H_ - - -// -// The package level header files this module uses -// -#include -// -// The protocols, PPI and GUID defintions for this module -// -#include -#include -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.c b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.c index 74156430af..6514aa70d4 100644 --- a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -1,28 +1,23 @@ /*++ -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. +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. Module Name: DriverSample.c Abstract: - This is an example of how a driver might export data to the HII protocol to be + This is an example of how a driver might export data to the HII protocol to be later utilized by the Setup Protocol --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "DriverSample.h" #define DISPLAY_ONLY_MY_ITEM 0x0001 @@ -33,7 +28,7 @@ Abstract: } EFI_GUID mFormSetGuid = FORMSET_GUID; -EFI_GUID mStringPackGuid = STRING_PACK_GUID; +EFI_GUID mStringPackGuid = STRING_PACK_GUID; STATIC EFI_STATUS @@ -50,7 +45,7 @@ Routine Description: This is the function that is called to provide results data to the driver. This data consists of a unique key which is used to identify what data is either being passed back - or being asked for. + or being asked for. Arguments: @@ -60,7 +55,7 @@ Arguments: Data - A pointer to the data being sent to the original exporting driver. -Returns: +Returns: --*/ { @@ -507,7 +502,7 @@ DriverSampleInit ( CallbackInfo->CallbackHandle = Handle; - PackageList = PreparePackages (1, &mStringPackGuid, DriverSampleStrings); + PackageList = PreparePackages (1, &mStringPackGuid, DriverSampleDxeStrings); Status = Hii->NewPack (Hii, PackageList, &HiiHandle); FreePool (PackageList); diff --git a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.dxs b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.dxs deleted file mode 100644 index 500e32e238..0000000000 --- a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.dxs +++ /dev/null @@ -1,31 +0,0 @@ -/*++ - -Copyright (c) 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. - -Module Name: - - DriverSample.dxs - -Abstract: - - Dependency expression source file. - ---*/ - -// -// Include common header file for this module. -// -#include "CommonHeader.h" - -#include - -DEPENDENCY_START - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID -DEPENDENCY_END diff --git a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.h b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.h index ba3a50d9b2..c02c24488d 100644 --- a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.h +++ b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.h @@ -25,9 +25,27 @@ Revision History // -// Include common header file for this module. +// The package level header files this module uses // -#include "CommonHeader.h" +#include +// +// The protocols, PPI and GUID defintions for this module +// +#include +#include +// +// The Library classes this module consumes +// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "NVDataStruc.h" @@ -43,7 +61,7 @@ extern UINT8 InventoryBin[]; // // extern UINT8 InventoryStringsStr[]; // -extern UINT8 DriverSampleStrings[]; +extern UINT8 DriverSampleDxeStrings[]; #define SAMPLE_STRING L"This is an error!" diff --git a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.inf b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.inf deleted file mode 100644 index f9d45cd3b8..0000000000 --- a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.inf +++ /dev/null @@ -1,108 +0,0 @@ -#/** @file -# Component description file for DriverSample module. -# -# This is an example driver to introduce how to export data to the HII protocol to be later utilized by the Setup Protocol. -# 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. -# -# -#**/ - -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = DriverSample - FILE_GUID = FE3542FE-C1D3-4EF8-657C-8048606FF670 - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - EDK_RELEASE_VERSION = 0x00020000 - EFI_SPECIFICATION_VERSION = 0x00020000 - - ENTRY_POINT = DriverSampleInit - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# - -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ - -[Sources.common] - DriverSample.h - NVDataStruc.h - DriverSample.c - Vfr.vfr - VfrStrings.uni - Inventory.vfr - InventoryStrings.uni - CommonHeader.h - - -################################################################################ -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -################################################################################ - -[Packages] - MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ - -[LibraryClasses] - HiiLibFramework - MemoryAllocationLib - BaseMemoryLib - IfrSupportLibFramework - PrintLib - BaseLib - UefiDriverEntryPoint - DebugLib - UefiRuntimeServicesTableLib - UefiBootServicesTableLib - - - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ - -[Protocols] - gEfiFormCallbackProtocolGuid # PROTOCOL ALWAYS_PRODUCED - gEfiHiiProtocolGuid # PROTOCOL ALWAYS_CONSUMED - -################################################################################ -# -# Dependency Expression Section - list of Dependency expressions that are required for -# this module. -# -################################################################################ - -[Depex] - gEfiSimpleTextOutProtocolGuid \ No newline at end of file diff --git a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.msa b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.msa deleted file mode 100644 index 4c96b5eedb..0000000000 --- a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSample.msa +++ /dev/null @@ -1,101 +0,0 @@ - - - - DriverSample - DXE_DRIVER - FE3542FE-C1D3-4EF8-657C-8048606FF670 - 1.0 - Component description file for DriverSample module. - This is an example driver to introduce how to export data to the HII protocol to be later utilized by the Setup Protocol. - 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. - FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 - - - IA32 X64 IPF EBC - false - DriverSample - - - - UefiBootServicesTableLib - - - UefiRuntimeServicesTableLib - - - DebugLib - Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. - - - UefiDriverEntryPoint - - - BaseLib - - - PrintLib - Recommended libary Instance is BasePrintLib instance in MdePkg. - - - EdkIfrSupportLib - - - BaseMemoryLib - - - MemoryAllocationLib - - - HiiLib - - - - InventoryStrings.uni - Inventory.vfr - VfrStrings.uni - Vfr.vfr - DriverSample.c - NVDataStruc.h - DriverSample.h - DriverSample.dxs - - - - - - - - gEfiHiiProtocolGuid - - - gEfiFormCallbackProtocolGuid - - - - - DriverSampleStrings - EFI_HII_STRING type string package from UNI file. - - - InventoryBin - EFI_HII_IFR type form package from VFR file. - - - VfrBin - EFI_HII_IFR type form package from VFR file. - - - - EFI_SPECIFICATION_VERSION 0x00020000 - EDK_RELEASE_VERSION 0x00020000 - - DriverSampleInit - - - \ No newline at end of file diff --git a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf new file mode 100644 index 0000000000..d16000538e --- /dev/null +++ b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf @@ -0,0 +1,106 @@ +#/** @file +# Component description file for DriverSample module. +# +# This is an example driver to introduce how to export data to the HII protocol to be later utilized by the Setup Protocol. +# 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. +# +# +#**/ + +################################################################################ +# +# Defines Section - statements that will be processed to create a Makefile. +# +################################################################################ +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = DriverSampleDxe + FILE_GUID = FE3542FE-C1D3-4EF8-657C-8048606FF670 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + EDK_RELEASE_VERSION = 0x00020000 + EFI_SPECIFICATION_VERSION = 0x00020000 + + ENTRY_POINT = DriverSampleInit + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 IPF EBC +# + +################################################################################ +# +# Sources Section - list of files that are required for the build to succeed. +# +################################################################################ + +[Sources.common] + DriverSample.h + NVDataStruc.h + DriverSample.c + Vfr.vfr + VfrStrings.uni + Inventory.vfr + InventoryStrings.uni + +################################################################################ +# +# Package Dependency Section - list of Package files that are required for +# this module. +# +################################################################################ + +[Packages] + MdePkg/MdePkg.dec + IntelFrameworkPkg/IntelFrameworkPkg.dec + + +################################################################################ +# +# Library Class Section - list of Library Classes that are required for +# this module. +# +################################################################################ + +[LibraryClasses] + HiiLibFramework + MemoryAllocationLib + BaseMemoryLib + IfrSupportLibFramework + PrintLib + BaseLib + UefiDriverEntryPoint + DebugLib + UefiRuntimeServicesTableLib + UefiBootServicesTableLib + + + +################################################################################ +# +# Protocol C Name Section - list of Protocol and Protocol Notify C Names +# that this module uses or produces. +# +################################################################################ + +[Protocols] + gEfiFormCallbackProtocolGuid # PROTOCOL ALWAYS_PRODUCED + gEfiHiiProtocolGuid # PROTOCOL ALWAYS_CONSUMED + +################################################################################ +# +# Dependency Expression Section - list of Dependency expressions that are required for +# this module. +# +################################################################################ + +[Depex] + gEfiSimpleTextOutProtocolGuid \ No newline at end of file diff --git a/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.msa b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.msa new file mode 100644 index 0000000000..4facd06ec0 --- /dev/null +++ b/IntelFrameworkModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.msa @@ -0,0 +1,101 @@ + + + + DriverSampleDxe + DXE_DRIVER + FE3542FE-C1D3-4EF8-657C-8048606FF670 + 1.0 + Component description file for DriverSample module. + This is an example driver to introduce how to export data to the HII protocol to be later utilized by the Setup Protocol. + 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. + FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 + + + IA32 X64 IPF EBC + false + DriverSampleDxe + + + + UefiBootServicesTableLib + + + UefiRuntimeServicesTableLib + + + DebugLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. + + + UefiDriverEntryPoint + + + BaseLib + + + PrintLib + Recommended libary Instance is BasePrintLib instance in MdePkg. + + + EdkIfrSupportLib + + + BaseMemoryLib + + + MemoryAllocationLib + + + HiiLib + + + + InventoryStrings.uni + Inventory.vfr + VfrStrings.uni + Vfr.vfr + DriverSample.c + NVDataStruc.h + DriverSample.h + DriverSample.dxs + + + + + + + + gEfiHiiProtocolGuid + + + gEfiFormCallbackProtocolGuid + + + + + DriverSampleStrings + EFI_HII_STRING type string package from UNI file. + + + InventoryBin + EFI_HII_IFR type form package from VFR file. + + + VfrBin + EFI_HII_IFR type form package from VFR file. + + + + EFI_SPECIFICATION_VERSION 0x00020000 + EDK_RELEASE_VERSION 0x00020000 + + DriverSampleInit + + + \ No newline at end of file diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/CommonHeader.h b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/CommonHeader.h deleted file mode 100644 index f318a4d05e..0000000000 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/CommonHeader.h +++ /dev/null @@ -1,41 +0,0 @@ -/**@file - Common header file shared by all source files. - - This file includes package header files, library classes and protocol, PPI & GUID definitions. - - 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 __COMMON_HEADER_H_ -#define __COMMON_HEADER_H_ - - -// -// The package level header files this module uses -// -#include -// -// The protocols, PPI and GUID defintions for this module -// -#include -#include -#include -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Fonts.c b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Fonts.c index 2c3980da63..65a19e043a 100644 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Fonts.c +++ b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Fonts.c @@ -1,13 +1,13 @@ /*++ -Copyright (c) 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 +Copyright (c) 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. + +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: @@ -20,11 +20,6 @@ Abstract: --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "HiiDatabase.h" // @@ -85,7 +80,7 @@ HiiGetGlyph ( /*++ Routine Description: - Translates a Unicode character into the corresponding font glyph. + Translates a Unicode character into the corresponding font glyph. If the Source was pointing to a non-spacing character, the next Source[*Index] character will be parsed and OR'd to the GlyphBuffer until a spacing character is found in the Source. Since non-spacing characters are considered to be the @@ -98,7 +93,7 @@ Routine Description: Arguments: -Returns: +Returns: --*/ { @@ -222,7 +217,7 @@ Returns: Attributes = GlobalData->NarrowGlyphs[Character].Attributes & EFI_GLYPH_NON_SPACING; } else { for (Value = 0; Value != Count; Value++) { - *GlyphBuffer[Location + Value] = (UINT8) (*GlyphBuffer[Location + Value] | + *GlyphBuffer[Location + Value] = (UINT8) (*GlyphBuffer[Location + Value] | GlobalData->WideGlyphs[Character].GlyphCol1[Value]); *GlyphBuffer[Location + Value + Count] = (UINT8) (*GlyphBuffer[Location + Value + Count] | GlobalData->WideGlyphs[Character].GlyphCol2[Value]); diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Forms.c b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Forms.c index c9a8d9aaf4..ab39d8a84e 100644 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Forms.c +++ b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Forms.c @@ -1,22 +1,17 @@ /**@file This file contains the form processing code to the HII database. - + 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. +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 common header file for this module. -// -#include "CommonHeader.h" #include "HiiDatabase.h" @@ -27,24 +22,24 @@ Ascii2Unicode ( IN CHAR8 *AsciiStr ) /*++ - + Routine Description: This function converts ASCII string to Unicode string. - + Arguments: UnicodeStr - NULL terminated Unicode output string. AsciieStr - NULL terminated ASCII input string. - - Returns: + + Returns: Start of the Unicode ouput string. - + --*/ { - CHAR16 *Str = UnicodeStr; + CHAR16 *Str = UnicodeStr; while (TRUE) { *(UnicodeStr++) = (CHAR16) *AsciiStr; if (*(AsciiStr++) == '\0') { @@ -60,24 +55,24 @@ Unicode2Ascii ( IN CHAR16 *UnicodeStr ) /*++ - + Routine Description: This function converts Unicode string to ASCII string. - + Arguments: AsciieStr - NULL terminated ASCII output string. UnicodeStr - NULL terminated Unicode input string. - - Returns: + + Returns: Start of the ASCII ouput string. - + --*/ { - CHAR8 *Str = AsciiStr; + CHAR8 *Str = AsciiStr; while (TRUE) { *(AsciiStr++) = (CHAR8) *UnicodeStr; if (*(UnicodeStr++) == '\0') { @@ -96,10 +91,10 @@ ExtractDevicePathData ( /*++ Routine Description: - + Arguments: -Returns: +Returns: --*/ { @@ -141,22 +136,22 @@ ExtractVariableData ( Routine Description: - This function extract the EFI_HII_VARIABLE_PACK portion from the + This function extract the EFI_HII_VARIABLE_PACK portion from the each of the EFI_HII_PACKAGE_INSTANCE in HII handle database. - + Arguments: DataTable - On input, this parameter point to the EFI_HII_DATA_TABLE structure of the final data buffer for the EFI_HII_EXPORT interface. This function update the NumberOfVariableData attribute. IfrData - It points to a staring address of a EFI_HII_IFR_PACK structure. - ExportBufferPtr - On input, it points the starting address of the data buffer to + ExportBufferPtr - On input, it points the starting address of the data buffer to host the variable pack. On output, it is the starting address of data buffer for the next extraction operation. -Returns: +Returns: VOID - + --*/ { EFI_HII_VARIABLE_PACK *VariableContents; @@ -356,13 +351,13 @@ HiiExportDatabase ( /*++ Routine Description: - - This function allows a program to extract a form or form package that has + + This function allows a program to extract a form or form package that has previously been registered with the EFI HII database. Arguments: -Returns: +Returns: --*/ { @@ -414,7 +409,7 @@ Returns: // // Extract Size of Export Package // - SizeNeeded = SizeNeeded + PackageInstance->IfrSize + SizeNeeded = SizeNeeded + PackageInstance->IfrSize + PackageInstance->StringSize + sizeof (EFI_HII_DATA_TABLE) + sizeof (EFI_HII_DEVICE_PATH_PACK); @@ -696,35 +691,35 @@ HiiGetForms ( /*++ Routine Description: - - This function allows a program to extract a form or form package that has + + This function allows a program to extract a form or form package that has previously been registered with the EFI HII database. Arguments: This - A pointer to the EFI_HII_PROTOCOL instance. - - Handle - Handle on which the form resides. Type EFI_HII_HANDLE is defined in + + Handle - Handle on which the form resides. Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack() in the Packages section. - + FormId - The ID of the form to return. If the ID is zero, the entire form package is returned. Type EFI_FORM_ID is defined in "Related Definitions" below. - + BufferLength - On input, the length of the Buffer. On output, the length of the returned buffer, if the length was sufficient and, if it was not, the length that is required to fit the requested form(s). - + Buffer - The buffer designed to receive the form(s). -Returns: +Returns: EFI_SUCCESS - Buffer filled with the requested forms. BufferLength was updated. - + EFI_INVALID_PARAMETER - The handle is unknown. - + EFI_NOT_FOUND - A form on the requested handle cannot be found with the requested FormId. - + EFI_BUFFER_TOO_SMALL - The buffer provided was not large enough to allow the form to be stored. --*/ @@ -824,7 +819,7 @@ Returns: *BufferLengthTemp = FormLength; return EFI_BUFFER_TOO_SMALL; } - + // // Rewind to start offset of the found Form // @@ -857,21 +852,21 @@ HiiGetDefaultImageInitPack ( IN EFI_IFR_VARSTORE *VarStore ) /*++ - + Routine Description: Initialize the EFI_HII_VARIABLE_PACK_LIST structure and prepare it ready to be used by HiiGetDefaultImagePopulateMap (). - + Arguments: VariablePackItem - Variable Package List. VarStore - IFR variable storage. - - Returns: + + Returns: Return the pointer to the Map space. - + --*/ { CHAR16 *Name16; @@ -900,7 +895,7 @@ HiiGetDefaultImageInitPack ( VariablePack->VariableId = VarStore->VarId; CopyMem (&VariablePack->VariableGuid, &VarStore->Guid, sizeof (EFI_GUID)); VariablePack->VariableNameLength = (UINT32) ((StrLen (Name16) + 1) * 2); - VariablePack->Header.Length = sizeof (*VariablePack) + VariablePack->Header.Length = sizeof (*VariablePack) + VariablePack->VariableNameLength + VarStore->Size; // @@ -914,28 +909,28 @@ HiiGetDefaultImageInitPack ( STATIC VOID HiiGetDefaultImagePopulateMap ( - IN OUT UINT8 *Map, + IN OUT UINT8 *Map, IN EFI_IFR_OP_HEADER *FormSet, IN EFI_IFR_VARSTORE *VarStore, IN UINTN DefaultMask ) /*++ - + Routine Description: Fill the Map with all the default values either from NV or Hii database. - + Arguments: Map - Memory pointer to hold the default values. FormSet - The starting EFI_IFR_OP_HEADER to begin retriving default values. VarStore - IFR variable storage. DefaultMask - The mask used to get the default variable. - - Returns: + + Returns: VOID - + --*/ { EFI_STATUS Status; @@ -950,7 +945,7 @@ HiiGetDefaultImagePopulateMap ( EFI_IFR_NV_DATA *IfrNvData; EFI_GUID Guid; CHAR16 *Name16; - CHAR8 *Name8; + CHAR8 *Name8; EFI_HANDLE CallbackHandle; EFI_FORM_CALLBACK_PROTOCOL *FormCallbackProt; @@ -993,7 +988,7 @@ HiiGetDefaultImagePopulateMap ( } if (!EFI_ERROR (Status)) { // - // Either Defaults/Manufacturing variable exists and appears to be valid. + // Either Defaults/Manufacturing variable exists and appears to be valid. // The map is read, exit w/ success now. // FreePool (Name16); @@ -1002,10 +997,10 @@ HiiGetDefaultImagePopulateMap ( // // First, prime the map with what already is in the NV. - // This is needed to cover a situation where the IFR does not contain all the + // This is needed to cover a situation where the IFR does not contain all the // defaults; either deliberately not having appropriate IFR, or in case of IFR_STRING, there is no default. - // Ignore status. Either it gets read or not. - // + // Ignore status. Either it gets read or not. + // FormCallbackProt = NULL; CopyMem (&CallbackHandle, &((EFI_IFR_FORM_SET*) FormSet)->CallbackHandle, sizeof (CallbackHandle)); if (CallbackHandle != NULL) { @@ -1042,7 +1037,7 @@ HiiGetDefaultImagePopulateMap ( } } else { // - // No callback available for this formset, read straight from NV. Deliberately ignore the Status. + // No callback available for this formset, read straight from NV. Deliberately ignore the Status. // The buffer will only be written if variable exists nd has correct size. // Status = EfiLibHiiVariableRetrieveFromNv ( @@ -1056,8 +1051,8 @@ HiiGetDefaultImagePopulateMap ( // // Iterate all IFR statements and for applicable, retrieve the default into the Map. // - for (IfrItem = FormSet, VarId = 0; - IfrItem->OpCode != EFI_IFR_END_FORM_SET_OP; + for (IfrItem = FormSet, VarId = 0; + IfrItem->OpCode != EFI_IFR_END_FORM_SET_OP; IfrItem = (EFI_IFR_OP_HEADER *) ((UINT8*) IfrItem + IfrItem->Length) ) { @@ -1073,11 +1068,11 @@ HiiGetDefaultImagePopulateMap ( // // Skip opcodes that reference other VarStore than that specific to current map. - // + // if (VarId != VarStore->VarId) { continue; } - + // // Extract the default value from this opcode if applicable, and apply it to the map. // @@ -1089,7 +1084,7 @@ HiiGetDefaultImagePopulateMap ( // // Get to the first EFI_IFR_ONE_OF_OPTION_OP // - IfrItem = (EFI_IFR_OP_HEADER *) ((UINT8*) IfrItem + IfrItem->Length); + IfrItem = (EFI_IFR_OP_HEADER *) ((UINT8*) IfrItem + IfrItem->Length); ASSERT (EFI_IFR_ONE_OF_OPTION_OP == IfrItem->OpCode); OneOfOpt = (EFI_IFR_ONE_OF_OPTION *)IfrItem; @@ -1126,7 +1121,7 @@ HiiGetDefaultImagePopulateMap ( case EFI_IFR_CHECKBOX_OP: ASSERT (IfrNvData->QuestionId + IfrNvData->StorageWidth <= VarStore->Size); - CheckBox = (EFI_IFR_CHECK_BOX *)IfrItem; + CheckBox = (EFI_IFR_CHECK_BOX *)IfrItem; if (DefaultMask == EFI_IFR_FLAG_MANUFACTURING) { if (0 != (CheckBox->Flags & EFI_IFR_FLAG_MANUFACTURING)) { *(UINT8 *) (Map + IfrNvData->QuestionId) = TRUE; @@ -1168,25 +1163,25 @@ HiiGetDefaultImage ( OUT EFI_HII_VARIABLE_PACK_LIST **VariablePackList ) /*++ - + Routine Description: - This function allows a program to extract the NV Image + This function allows a program to extract the NV Image that represents the default storage image - + Arguments: This - A pointer to the EFI_HII_PROTOCOL instance. Handle - The HII handle from which will have default data retrieved. UINTN - Mask used to retrieve the default image. - VariablePackList - Callee allocated, tightly-packed, link list data + VariablePackList - Callee allocated, tightly-packed, link list data structure that contain all default varaible packs from the Hii Database. - - Returns: + + Returns: EFI_NOT_FOUND - If Hii database does not contain any default images. EFI_INVALID_PARAMETER - Invalid input parameter. EFI_SUCCESS - Operation successful. - + --*/ { EFI_HII_HANDLE_DATABASE *HandleDatabase; @@ -1198,7 +1193,7 @@ HiiGetDefaultImage ( UINTN SetupMapNameSize; UINTN SizeOfMaps; EFI_HII_VARIABLE_PACK_LIST *PackList; - EFI_HII_VARIABLE_PACK_LIST *PackListNext; + EFI_HII_VARIABLE_PACK_LIST *PackListNext; EFI_HII_VARIABLE_PACK_LIST *PackListLast; UINT8 *Map; @@ -1232,26 +1227,26 @@ HiiGetDefaultImage ( // // Size of the map // - SizeOfMaps += VarStore->Size; + SizeOfMaps += VarStore->Size; // // add the size of the string, in Unicode // - SizeOfMaps += (VarStore->Header.Length - sizeof (*VarStore)) * 2; + SizeOfMaps += (VarStore->Header.Length - sizeof (*VarStore)) * 2; // // Space for node // - SizeOfMaps += sizeof (EFI_HII_VARIABLE_PACK); + SizeOfMaps += sizeof (EFI_HII_VARIABLE_PACK); // - // Space for linked list node + // Space for linked list node // - SizeOfMaps += sizeof (EFI_HII_VARIABLE_PACK_LIST); + SizeOfMaps += sizeof (EFI_HII_VARIABLE_PACK_LIST); } IfrItem = (EFI_IFR_OP_HEADER *) ((UINT8 *) IfrItem + IfrItem->Length); } // - // If the FormSet OpCode has a non-zero NvDataSize. There is a default + // If the FormSet OpCode has a non-zero NvDataSize. There is a default // NvMap with ID=0, GUID that of the formset itself and "Setup" as name. // SetupMapNameSize = StrLen (SETUP_MAP_NAME) + 1; @@ -1269,33 +1264,33 @@ HiiGetDefaultImage ( // // Size of the map // - SizeOfMaps += VarStoreDefault->Size; + SizeOfMaps += VarStoreDefault->Size; // // add the size of the string // - SizeOfMaps += sizeof (SETUP_MAP_NAME); + SizeOfMaps += sizeof (SETUP_MAP_NAME); // // Space for node // - SizeOfMaps += sizeof (EFI_HII_VARIABLE_PACK); + SizeOfMaps += sizeof (EFI_HII_VARIABLE_PACK); // - // Space for linked list node + // Space for linked list node // - SizeOfMaps += sizeof (EFI_HII_VARIABLE_PACK_LIST); + SizeOfMaps += sizeof (EFI_HII_VARIABLE_PACK_LIST); } if (0 == SizeOfMaps) { // // The IFR does not have any explicit or default map(s). // - return EFI_NOT_FOUND; + return EFI_NOT_FOUND; } // // Allocate the return buffer // PackList = AllocateZeroPool (SizeOfMaps); - ASSERT (NULL != PackList); + ASSERT (NULL != PackList); PackListNext = PackList; PackListLast = PackList; @@ -1337,7 +1332,7 @@ HiiGetDefaultImage ( PackListLast->NextVariablePack = NULL; *VariablePackList = PackList; - + return EFI_SUCCESS; } @@ -1354,7 +1349,7 @@ HiiUpdateForm ( /*++ Routine Description: - This function allows the caller to update a form that has + This function allows the caller to update a form that has previously been registered with the EFI HII database. Arguments: @@ -1363,7 +1358,7 @@ Arguments: AddData - If TRUE, add data. If FALSE, remove data Data - If adding data, this is the pointer to the data to add -Returns: +Returns: EFI_SUCCESS - Update success. Other - Update fail. diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.c b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.c index cac37e58ca..f72a787240 100644 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.c +++ b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.c @@ -1,13 +1,13 @@ /*++ -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 +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. + +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: @@ -19,11 +19,6 @@ Abstract: --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "HiiDatabase.h" EFI_STATUS @@ -36,11 +31,11 @@ InitializeHiiDatabase ( Routine Description: Initialize HII Database - + Arguments: (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT) -Returns: +Returns: EFI_SUCCESS - Setup loaded. other - Setup Error @@ -152,10 +147,10 @@ HiiFindHandles ( Routine Description: Determines the handles that are currently active in the database. - + Arguments: -Returns: +Returns: --*/ { @@ -221,12 +216,12 @@ HiiGetPrimaryLanguages ( /*++ Routine Description: - + This function allows a program to determine what the primary languages that are supported on a given handle. Arguments: -Returns: +Returns: --*/ { @@ -319,13 +314,13 @@ HiiGetSecondaryLanguages ( /*++ Routine Description: - - This function allows a program to determine which secondary languages are supported + + This function allows a program to determine which secondary languages are supported on a given handle for a given primary language. Arguments: -Returns: +Returns: --*/ { diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.dxs b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.dxs deleted file mode 100644 index 3e1fa13af6..0000000000 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.dxs +++ /dev/null @@ -1,30 +0,0 @@ -/*++ - -Copyright (c) 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: - - HiiDatabase.dxs - -Abstract: - - Dependency expression source file. - ---*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - -#include - -DEPENDENCY_START - TRUE -DEPENDENCY_END diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.h b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.h index adfc31c0c8..b35dc17a74 100644 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.h +++ b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.h @@ -1,13 +1,13 @@ /*++ -Copyright (c) 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. +Copyright (c) 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: @@ -15,7 +15,7 @@ Module Name: Abstract: - This file contains global defines and prototype definitions + This file contains global defines and prototype definitions for the HII database. --*/ @@ -24,9 +24,26 @@ Abstract: #define _HIIDATABASE_H // -// Include common header file for this module. +// The package level header files this module uses +// +#include +// +// The protocols, PPI and GUID defintions for this module +// +#include +#include +#include +// +// The Library classes this module consumes // -#include "CommonHeader.h" +#include +#include +#include +#include +#include +#include +#include +#include // // HII Database Global data diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.inf b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.inf index 3d46b87188..f082caa7df 100644 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.inf +++ b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/HiiDatabase.inf @@ -50,7 +50,6 @@ Forms.c HiiDatabase.h HiiDatabase.c - CommonHeader.h ################################################################################ diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Keyboard.c b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Keyboard.c index be91d40129..a790f6e495 100644 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Keyboard.c +++ b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Keyboard.c @@ -1,12 +1,12 @@ /*++ -Copyright (c) 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, +Copyright (c) 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: @@ -20,11 +20,6 @@ Abstract: --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "HiiDatabase.h" EFI_STATUS @@ -37,10 +32,10 @@ HiiGetKeyboardLayout ( /*++ Routine Description: - + Arguments: -Returns: +Returns: --*/ { diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Package.c b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Package.c index 91f5a3a3db..3ddaf4ee71 100644 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Package.c +++ b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Package.c @@ -1,13 +1,13 @@ /*++ -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 +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. + +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: @@ -20,11 +20,6 @@ Abstract: --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "HiiDatabase.h" EFI_STATUS @@ -37,10 +32,10 @@ GetPackSize ( Routine Description: Determines the passed in Pack's size and returns the value. - + Arguments: -Returns: +Returns: --*/ { @@ -111,10 +106,10 @@ ValidatePack ( Routine Description: Verifies that the package instance is using the correct handle for string operations. - + Arguments: -Returns: +Returns: --*/ { @@ -227,14 +222,14 @@ HiiNewPack ( Routine Description: Extracts the various packs from a package list. - + Arguments: This - Pointer of HII protocol. Packages - Pointer of HII packages. Handle - Handle value to be returned. -Returns: +Returns: EFI_SUCCESS - Pacakges has added to HII database successfully. EFI_INVALID_PARAMETER - Invalid parameter. @@ -610,10 +605,10 @@ HiiRemovePack ( Routine Description: Removes the various packs from a Handle - + Arguments: -Returns: +Returns: --*/ { diff --git a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Strings.c b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Strings.c index a8b04c0884..5928f1b330 100644 --- a/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Strings.c +++ b/IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Strings.c @@ -1,13 +1,13 @@ /*++ -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 +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. + +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: @@ -20,11 +20,6 @@ Abstract: --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "HiiDatabase.h" STATIC @@ -56,10 +51,10 @@ HiiTestString ( Routine Description: Test if all of the characters in a string have corresponding font characters. - + Arguments: -Returns: +Returns: --*/ { @@ -75,7 +70,7 @@ Returns: HiiData = EFI_HII_DATA_FROM_THIS (This); GlobalData = HiiData->GlobalData; - + // // Rewind through the string looking for a glyph width identifier // If no width identifier exists, we assume string has narrow width identifier @@ -155,18 +150,18 @@ Routine Description: We will make a buffer the size of the package + EfiStrSize of the new string. We will copy the string package that first gets changed and the following language packages until we encounter the NULL string package. All this time we will ensure that the offsets have - been adjusted. + been adjusted. Arguments: - + This - Pointer to the HII protocol. Language - Pointer to buffer which contains the language code of this NewString. Handle - Handle of the package instance to be processed. Reference - The token number for the string. If 0, new string token to be returned through this parameter. - NewString - Buffer pointer for the new string. + NewString - Buffer pointer for the new string. ResetStrings - Indicate if we are resetting a string. - -Returns: + +Returns: EFI_SUCCESS - The string has been added or reset to Hii database. EFI_INVALID_PARAMETER - Some parameter passed in is invalid. @@ -661,11 +656,11 @@ Routine Description: We will make a buffer the size of the package + StrSize of the new string. We will copy the string package that first gets changed and the following language packages until we encounter the NULL string package. All this time we will ensure that the offsets have - been adjusted. + been adjusted. Arguments: - -Returns: + +Returns: --*/ { @@ -730,12 +725,12 @@ HiiResetStrings ( /*++ Routine Description: - + This function removes any new strings that were added after the initial string export for this handle. Arguments: -Returns: +Returns: --*/ { @@ -787,7 +782,7 @@ HiiGetString ( /*++ Routine Description: - + This function extracts a string from a package already registered with the EFI HII database. Arguments: @@ -795,7 +790,7 @@ Arguments: Handle - The HII handle on which the string resides. Token - The string token assigned to the string. Raw - If TRUE, the string is returned unedited in the internal storage format described - above. If false, the string returned is edited by replacing with + above. If false, the string returned is edited by replacing with and by removing special characters such as the prefix. LanguageString - Pointer to a NULL-terminated string containing a single ISO 639-2 language identifier, indicating the language to print. If the LanguageString is empty (starts @@ -805,11 +800,11 @@ Arguments: StringBuffer - The buffer designed to receive the characters in the string. Type EFI_STRING is defined in String. -Returns: +Returns: EFI_INVALID_PARAMETER - If input parameter is invalid. EFI_BUFFER_TOO_SMALL - If the *BufferLength is too small. EFI_SUCCESS - Operation is successful. - + --*/ { EFI_HII_PACKAGE_INSTANCE *PackageInstance; @@ -930,11 +925,11 @@ LangNotFound: // // Back to the start of package. // - StringPack = (VOID*)(((UINT8*)StringPack) - Length); + StringPack = (VOID*)(((UINT8*)StringPack) - Length); // // Terminating zero sub-pack. // - Length += sizeof (EFI_HII_STRING_PACK); + Length += sizeof (EFI_HII_STRING_PACK); // // If trying to get the entire string package and have insufficient space. Return error. @@ -1009,11 +1004,11 @@ LangNotFound: // Skip "Narraw, Wide, NoBreak" // if (CompareMem (Local, &Narrow, 2) && - CompareMem (Local, &Wide, 2) && - CompareMem (Local, &NoBreak, 2)) { - CopyMem (&StringBuffer[Count++], Local, 2); - } - } + CompareMem (Local, &Wide, 2) && + CompareMem (Local, &NoBreak, 2)) { + CopyMem (&StringBuffer[Count++], Local, 2); + } + } // // Add "NULL" at the end. // @@ -1051,13 +1046,13 @@ HiiGetLine ( Routine Description: - This function allows a program to extract a part of a string of not more than a given width. - With repeated calls, this allows a calling program to extract "lines" of text that fit inside + This function allows a program to extract a part of a string of not more than a given width. + With repeated calls, this allows a calling program to extract "lines" of text that fit inside columns. The effort of measuring the fit of strings inside columns is localized to this call. Arguments: -Returns: +Returns: --*/ { diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Boolean.c b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Boolean.c index b0af07ecbe..f5450b436d 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Boolean.c +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Boolean.c @@ -20,10 +20,6 @@ Abstract: --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" #include "Setup.h" #include "Ui.h" diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Colors.h b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Colors.h index 2ad2aa9c17..d47838f643 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Colors.h +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Colors.h @@ -1,13 +1,13 @@ /*++ -Copyright (c) 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 +Copyright (c) 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. + +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: @@ -23,11 +23,6 @@ Revision History #ifndef _COLORS_H #define _COLORS_H -// -// Include common header file for this module. -// -#include "CommonHeader.h" - // // Screen Color Settings // diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/CommonHeader.h b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/CommonHeader.h deleted file mode 100644 index 56934c5034..0000000000 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/CommonHeader.h +++ /dev/null @@ -1,44 +0,0 @@ -/**@file - Common header file shared by all source files. - - This file includes package header files, library classes and protocol, PPI & GUID definitions. - - 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 __COMMON_HEADER_H_ -#define __COMMON_HEADER_H_ - - -// -// The package level header files this module uses -// -#include -// -// The protocols, PPI and GUID defintions for this module -// -#include -#include -#include -#include -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/InputHandler.c index 4c2189c476..85e1a0cf98 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/InputHandler.c +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/InputHandler.c @@ -21,11 +21,6 @@ Revision History --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "Setup.h" #include "Ui.h" #include "Colors.h" diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Presentation.c b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Presentation.c index be5ba57ef7..6bbe810ee2 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -19,11 +19,6 @@ Revision History: --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "Setup.h" #include "Ui.h" #include "Colors.h" diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Print.c b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Print.c index 5752066419..9e08f96993 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Print.c +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Print.c @@ -32,11 +32,6 @@ Abstract: --*/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "Print.h" STATIC diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Print.h b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Print.h index 8ce993b765..76f8977f56 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Print.h +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Print.h @@ -1,12 +1,12 @@ /*++ -Copyright (c) 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, +Copyright (c) 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: @@ -22,11 +22,6 @@ Abstract: #ifndef _PRINT_H_ #define _PRINT_H_ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "Setup.h" #define LEFT_JUSTIFY 0x01 diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c index fd6addf518..a2dc808346 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c @@ -12,11 +12,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "Setup.h" #include "Ui.h" diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Setup.c b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Setup.c index 58698c82cd..e2f4634cf1 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -12,10 +12,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" #include "Setup.h" #include "Ui.h" diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Setup.h b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Setup.h index 6cfcf68c3a..cca053b03b 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Setup.h +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Setup.h @@ -24,9 +24,30 @@ Revision History #define _SETUP_H // -// Include common header file for this module. +// The package level header files this module uses // -#include "CommonHeader.h" +#include +// +// The protocols, PPI and GUID defintions for this module +// +#include +#include +#include +#include +// +// The Library classes this module consumes +// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + // // This is the generated header file which includes whatever needs to be exported (strings + IFR) diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/SetupBrowser.inf b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/SetupBrowser.inf index e1828b8a87..5399873090 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/SetupBrowser.inf +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/SetupBrowser.inf @@ -57,8 +57,6 @@ Setup.h Setup.c SetupBrowserStr.uni - CommonHeader.h - ################################################################################ # @@ -68,10 +66,9 @@ ################################################################################ [Packages] - IntelFrameworkPkg/IntelFrameworkPkg.dec MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - + IntelFrameworkPkg/IntelFrameworkPkg.dec ################################################################################ # diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Ui.c b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Ui.c index 8a514a000a..127b550262 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Ui.c +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Ui.c @@ -12,10 +12,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" #include "Setup.h" #include "Ui.h" diff --git a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Ui.h b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Ui.h index 78a51d08c8..784e04b135 100644 --- a/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Ui.h +++ b/IntelFrameworkModulePkg/Universal/SetupBrowserDxe/Ui.h @@ -1,13 +1,13 @@ /*++ -Copyright (c) 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. +Copyright (c) 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: @@ -24,10 +24,6 @@ Revision History #ifndef _UI_H #define _UI_H -// -// Include common header file for this module. -// -#include "CommonHeader.h" // // Globals diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h b/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h index 288e398805..9762313e6e 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h @@ -1,13 +1,13 @@ /*++ - Copyright (c) 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. + Copyright (c) 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. --*/ @@ -46,7 +46,7 @@ #include // -// Data hub worker definition +// Data hub worker definition // #define MAX_NUMBER_DATAHUB_RECORDS 1000 #define DATAHUB_BYTES_PER_RECORD EFI_STATUS_CODE_DATA_MAX_SIZE @@ -56,8 +56,8 @@ // // Address type of pointer. // The point type always equal to PHYSICAL_MODE on IA32/X64/EBC architecture -// Otherwise, VIRTUAL_MODE/PHYSICAL_MODE would be used on Ipf architecture, -// +// Otherwise, VIRTUAL_MODE/PHYSICAL_MODE would be used on Ipf architecture, +// typedef enum { PHYSICAL_MODE, VIRTUAL_MODE @@ -72,8 +72,8 @@ typedef struct { // -// Runtime memory status code worker definition -// +// Runtime memory status code worker definition +// typedef struct { UINT32 RecordIndex; UINT32 NumberOfRecords; @@ -83,22 +83,22 @@ typedef struct { typedef struct { // - // Report operation nest status. + // Report operation nest status. // If it is set, then the report operation has nested. - // + // UINT32 StatusCodeNestStatus; // // Runtime status code management header, the records buffer is following it. - // + // RUNTIME_MEMORY_STATUSCODE_HEADER *RtMemoryStatusCodeTable[2]; } DXE_STATUS_CODE_CONTROLLER; /** - - Dispatch initialization request to sub status code devices based on + + Dispatch initialization request to sub status code devices based on customized feature flags. - + **/ VOID InitializationDispatcherWorker ( @@ -108,7 +108,7 @@ InitializationDispatcherWorker ( /** Initialize serial status code worker. - + @return The function always return EFI_SUCCESS **/ @@ -120,29 +120,29 @@ EfiSerialStatusCodeInitializeWorker ( /** Convert status code value and extended data to readable ASCII string, send string to serial I/O device. - + @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - - @param Value Describes the current status of a hardware or software entity. - This included information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + + @param Value Describes the current status of a hardware or software entity. + This included information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, + + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. - This parameter allows the status code driver to apply different rules to different callers. + @param CallerId This optional parameter may be used to identify the caller. + This parameter allows the status code driver to apply different rules to different callers. Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification. @param Data This optional parameter may be used to pass additional data - + @retval EFI_SUCCESS Success to report status code to serial I/O. @retval EFI_DEVICE_ERROR EFI serial device can not work after ExitBootService() is called . @@ -158,7 +158,7 @@ SerialStatusCodeReportWorker ( /** Initialize runtime memory status code. - + @return The function always return EFI_SUCCESS **/ @@ -168,26 +168,26 @@ RtMemoryStatusCodeInitializeWorker ( ); /** - Report status code into runtime memory. If the runtime pool is full, roll back to the + Report status code into runtime memory. If the runtime pool is full, roll back to the first record and overwrite it. - - @param RtMemoryStatusCodeTable + + @param RtMemoryStatusCodeTable Point to Runtime memory table header. @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - - @param Value Describes the current status of a hardware or software entity. - This included information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + + @param Value Describes the current status of a hardware or software entity. + This included information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, + + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - + @return The function always return EFI_SUCCESS. **/ @@ -202,7 +202,7 @@ RtMemoryStatusCodeReportWorker ( /** Initialize data hubstatus code. Create a data hub listener. - + @return The function always return EFI_SUCCESS **/ @@ -214,29 +214,29 @@ DataHubStatusCodeInitializeWorker ( /** Report status code into DataHub. - + @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - - @param Value Describes the current status of a hardware or software entity. - This included information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + + @param Value Describes the current status of a hardware or software entity. + This included information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, + + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. - This parameter allows the status code driver to apply different rules to different callers. + @param CallerId This optional parameter may be used to identify the caller. + This parameter allows the status code driver to apply different rules to different callers. Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification. @param Data This optional parameter may be used to pass additional data - + @retval EFI_OUT_OF_RESOURCES Can not acquire record buffer. @retval EFI_DEVICE_ERROR EFI serial device can not work after ExitBootService() is called . @retval EFI_SUCCESS Success to cache status code and signal log data event. @@ -274,7 +274,7 @@ DxeStatusCodeDriverEntry ( // // declaration of DXE status code controller. -// +// extern DXE_STATUS_CODE_CONTROLLER gDxeStatusCode; #endif diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.inf b/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.inf index 7ada24d727..f504e586fa 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.inf +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.inf @@ -30,7 +30,7 @@ EDK_RELEASE_VERSION = 0x00020000 EFI_SPECIFICATION_VERSION = 0x00020000 - ENTRY_POINT = InitializeDxeStatusCode + ENTRY_POINT = DxeStatusCodeDriverEntry # # The following information is for reference only and not required by the build tools. @@ -52,7 +52,6 @@ DataHubStatusCodeWorker.c DxeStatusCode.c DxeStatusCode.h - EntryPoint.c [Sources.Ia32] DxeStatusCodeCommon.c diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCodeCommon.c b/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCodeCommon.c index 5740d6f78a..eecf38db58 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCodeCommon.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/DxeStatusCodeCommon.c @@ -1,48 +1,52 @@ /** @file Status code driver for IA32/X64/EBC architecture. - Copyright (c) 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. + Copyright (c) 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. **/ #include "DxeStatusCode.h" +// +// Event for Exit Boot Services Callback +// +STATIC EFI_EVENT mExitBootServicesEvent = NULL; /** - Report status code to all supported device. + Report status code to all supported device. Calls into the workers which dispatches the platform specific - listeners. + listeners. - @param Type Indicates the type of status code being reported. + @param Type Indicates the type of status code being reported. The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - @param Value Describes the current status of a hardware or software entity. - This includes information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + @param Value Describes the current status of a hardware or software entity. + This includes information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. + @param CallerId This optional parameter may be used to identify the caller. This parameter allows the status code driver to apply different rules to different callers. - @param Data This optional parameter may be used to pass additional data. - Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below. - The contents of this data type may have additional GUID-specific data. The standard GUIDs and + @param Data This optional parameter may be used to pass additional data. + Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below. + The contents of this data type may have additional GUID-specific data. The standard GUIDs and their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification. @return Always return EFI_SUCCESS. **/ -EFI_STATUS +EFI_STATUS EFIAPI ReportDispatcher ( IN EFI_STATUS_CODE_TYPE Type, @@ -61,12 +65,12 @@ EFI_STATUS_CODE_PROTOCOL mEfiStatusCodeProtocol = { }; // -// Delaration of DXE status code controller +// Delaration of DXE status code controller // DXE_STATUS_CODE_CONTROLLER gDxeStatusCode = { // - // Initialize nest status as non nested. - // + // Initialize nest status as non nested. + // 0, {NULL, NULL} }; @@ -74,7 +78,7 @@ DXE_STATUS_CODE_CONTROLLER gDxeStatusCode = { /** Install the ReportStatusCode runtime service. - + @param ImageHandle Image handle of the loaded driver @param SystemTable Pointer to the System Table @@ -107,37 +111,46 @@ DxeStatusCodeDriverEntry ( ); ASSERT_EFI_ERROR (Status); + Status = gBS->CreateEvent ( + EVT_SIGNAL_EXIT_BOOT_SERVICES, + TPL_NOTIFY, + VirtualAddressChangeCallBack, + NULL, + &mExitBootServicesEvent + ); + ASSERT_EFI_ERROR (Status); + return Status; } /** - Report status code to all supported device. + Report status code to all supported device. Calls into the workers which dispatches the platform specific - listeners. + listeners. - @param CodeType Indicates the type of status code being reported. + @param CodeType Indicates the type of status code being reported. The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - @param Value Describes the current status of a hardware or software entity. - This includes information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + @param Value Describes the current status of a hardware or software entity. + This includes information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. + @param CallerId This optional parameter may be used to identify the caller. This parameter allows the status code driver to apply different rules to different callers. - @param Data This optional parameter may be used to pass additional data. - Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below. - The contents of this data type may have additional GUID-specific data. The standard GUIDs and + @param Data This optional parameter may be used to pass additional data. + Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below. + The contents of this data type may have additional GUID-specific data. The standard GUIDs and their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification. @return Always return EFI_SUCCESS. **/ -EFI_STATUS +EFI_STATUS EFIAPI ReportDispatcher ( IN EFI_STATUS_CODE_TYPE CodeType, @@ -201,7 +214,7 @@ ReportDispatcher ( /** - Virtual address change notification call back. It converts global pointer + Virtual address change notification call back. It converts global pointer to virtual address. @param Event Event whose notification function is being invoked. @@ -220,7 +233,7 @@ VirtualAddressChangeCallBack ( // Convert memory status code table to virtual address; // EfiConvertPointer ( - 0, + 0, (VOID **) &gDxeStatusCode.RtMemoryStatusCodeTable[PHYSICAL_MODE] ); } diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/EntryPoint.c b/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/EntryPoint.c deleted file mode 100644 index 61722f8d59..0000000000 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Dxe/EntryPoint.c +++ /dev/null @@ -1,58 +0,0 @@ -/**@file - Entry Point Source file. - - This file contains the user entry point - - Copyright (c) 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. - -**/ - -#include "DxeStatusCode.h" - -// -// Event for Exit Boot Services Callback -// -STATIC EFI_EVENT mExitBootServicesEvent = NULL; - -/** - The user Entry Point for module DxeStatusCode. The user code starts with this function. - - @param[in] ImageHandle The firmware allocated handle for the EFI image. - @param[in] SystemTable A pointer to the EFI System Table. - - @retval EFI_SUCCESS The entry point is executed successfully. - @retval other Some error occurs when executing this entry point. - -**/ -EFI_STATUS -EFIAPI -InitializeDxeStatusCode( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - - Status = gBS->CreateEvent ( - EVT_SIGNAL_EXIT_BOOT_SERVICES, - TPL_NOTIFY, - VirtualAddressChangeCallBack, - NULL, - &mExitBootServicesEvent - ); - ASSERT_EFI_ERROR (Status); - - // - // Call the original Entry Point - // - Status = DxeStatusCodeDriverEntry (ImageHandle, SystemTable); - - return Status; -} diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/CommonHeader.h b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/CommonHeader.h deleted file mode 100644 index 2521548f6f..0000000000 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/CommonHeader.h +++ /dev/null @@ -1,44 +0,0 @@ -/**@file - Common header file shared by all source files. - - This file includes package header files, library classes and protocol, PPI & GUID definitions. - - Copyright (c) 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. -**/ - -#ifndef __COMMON_HEADER_H_ -#define __COMMON_HEADER_H_ - - -// -// The package level header files this module uses -// -#include -// -// The protocols, PPI and GUID defintions for this module -// -#include -#include -#include -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c index 195e3e2183..23b5130c7d 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c @@ -1,32 +1,27 @@ /** @file Memory status code worker in PEI. - Copyright (c) 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. + Copyright (c) 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: MemoryStatusCodeWorker.c **/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "PeiStatusCode.h" /** - Create one memory status code GUID'ed HOB, use PacketIndex + Create one memory status code GUID'ed HOB, use PacketIndex to identify the packet. - @param PacketIndex Index of records packet. - + @param PacketIndex Index of records packet. + @return Always return pointer of memory status code packet. **/ @@ -43,8 +38,8 @@ CreateMemoryStatusCodePacket ( // PacketHeader = (MEMORY_STATUSCODE_PACKET_HEADER *) BuildGuidHob ( - &gMemoryStatusCodeRecordGuid, - PcdGet16 (PcdStatusCodeMemorySize) * + &gMemoryStatusCodeRecordGuid, + PcdGet16 (PcdStatusCodeMemorySize) * 1024 + sizeof (MEMORY_STATUSCODE_PACKET_HEADER) ); @@ -61,9 +56,9 @@ CreateMemoryStatusCodePacket ( /** Initialize memory status code. - Create one GUID'ed HOB with PCD defined size. If create required size + Create one GUID'ed HOB with PCD defined size. If create required size GUID'ed HOB failed, then ASSERT(). - + @return The function always return EFI_SUCCESS **/ @@ -83,21 +78,21 @@ MemoryStatusCodeInitializeWorker ( /** Report status code into GUID'ed HOB.. - + @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - - @param Value Describes the current status of a hardware or software entity. - This included information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + + @param Value Describes the current status of a hardware or software entity. + This included information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, + + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - + @return The function always return EFI_SUCCESS. **/ @@ -140,11 +135,11 @@ MemoryStatusCodeReportWorker ( if (NULL == Record) { // - // In order to save status code , create new packet. + // In order to save status code , create new packet. // PacketHeader = CreateMemoryStatusCodePacket (PacketIndex); - Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1); + Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1); Record = &Record[PacketHeader->RecordIndex++]; } diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c index 0a697cc211..7c0fdc6077 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c @@ -2,28 +2,23 @@ /** @file Generic PeiStatusCode Module. - Copyright (c) 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. + Copyright (c) 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: PeiStatusCode.c **/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "PeiStatusCode.h" STATIC -EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi = { +EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi = { ReportDispatcher }; @@ -36,27 +31,27 @@ EFI_PEI_PPI_DESCRIPTOR mStatusCodePpiDescriptor = { /** Report status code to all supported device. - - + + @param PeiServices - @param CodeType Indicates the type of status code being reported. + @param CodeType Indicates the type of status code being reported. The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - @param Value Describes the current status of a hardware or software entity. - This includes information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + @param Value Describes the current status of a hardware or software entity. + This includes information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. + @param CallerId This optional parameter may be used to identify the caller. This parameter allows the status code driver to apply different rules to different callers. - @param Data This optional parameter may be used to pass additional data. - Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below. - The contents of this data type may have additional GUID-specific data. The standard GUIDs and + @param Data This optional parameter may be used to pass additional data. + Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below. + The contents of this data type may have additional GUID-specific data. The standard GUIDs and their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification. @return Always return EFI_SUCCESS. @@ -103,12 +98,12 @@ ReportDispatcher ( } /** - Initialize PEI status codes and publish the status code + Initialize PEI status codes and publish the status code PPI. @param FfsHeader FV this PEIM was loaded from. @param PeiServices General purpose services available to every PEIM. - + @return The function always returns success. **/ @@ -140,12 +135,12 @@ PeiStatusCodeDriverEntry ( } // - // Install PeiStatusCodePpi. + // Install PeiStatusCodePpi. // PeiServices use this Ppi to output status code. // use library Status = PeiServicesInstallPpi (&mStatusCodePpiDescriptor); ASSERT_EFI_ERROR (Status); - + return EFI_SUCCESS; } diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h index c8c004d6cd..48675056e1 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h @@ -2,14 +2,14 @@ /** @file Heade file of status code PEIM - Copyright (c) 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. + Copyright (c) 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: PeiStatusCode.h @@ -20,35 +20,55 @@ // -// Include common header file for this module. +// The package level header files this module uses +// +#include +// +// The protocols, PPI and GUID defintions for this module +// +#include +#include +#include +// +// The Library classes this module consumes // -#include "CommonHeader.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /** Convert status code value and extended data to readable ASCII string, send string to serial I/O device. - + @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - - @param Value Describes the current status of a hardware or software entity. - This included information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + + @param Value Describes the current status of a hardware or software entity. + This included information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, + + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. - This parameter allows the status code driver to apply different rules to different callers. + @param CallerId This optional parameter may be used to identify the caller. + This parameter allows the status code driver to apply different rules to different callers. Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification. @param Data This optional parameter may be used to pass additional data - + @return The function always return EFI_SUCCESS. **/ @@ -64,9 +84,9 @@ SerialStatusCodeReportWorker ( /** Initialize memory status code. - Create one GUID'ed HOB with PCD defined size. If create required size + Create one GUID'ed HOB with PCD defined size. If create required size GUID'ed HOB failed, then ASSERT(). - + @return The function always return EFI_SUCCESS **/ @@ -77,21 +97,21 @@ MemoryStatusCodeInitializeWorker ( /** Report status code into GUID'ed HOB. - + @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - - @param Value Describes the current status of a hardware or software entity. - This included information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + + @param Value Describes the current status of a hardware or software entity. + This included information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, + + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - + @return The function always return EFI_SUCCESS. **/ @@ -104,27 +124,27 @@ MemoryStatusCodeReportWorker ( /** Report status code to all supported device. - - + + @param PeiServices - @param Type Indicates the type of status code being reported. + @param Type Indicates the type of status code being reported. The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - @param Value Describes the current status of a hardware or software entity. - This includes information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + @param Value Describes the current status of a hardware or software entity. + This includes information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. + @param CallerId This optional parameter may be used to identify the caller. This parameter allows the status code driver to apply different rules to different callers. - @param Data This optional parameter may be used to pass additional data. - Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below. - The contents of this data type may have additional GUID-specific data. The standard GUIDs and + @param Data This optional parameter may be used to pass additional data. + Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below. + The contents of this data type may have additional GUID-specific data. The standard GUIDs and their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification. @return Always return EFI_SUCCESS. diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf index b27d1cbb33..fd247138f8 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf @@ -47,7 +47,6 @@ MemoryStausCodeWorker.c SerialStatusCodeWorker.c PeiStatusCode.h - CommonHeader.h ################################################################################ diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c index 2efc23ceac..9f84b01391 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c @@ -2,51 +2,46 @@ /** @file Serial I/O status code reporting worker. - Copyright (c) 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. + Copyright (c) 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: SerialStatusCodeWorker.c **/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "PeiStatusCode.h" /** Convert status code value and extended data to readable ASCII string, send string to serial I/O device. - + @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below. - - @param Value Describes the current status of a hardware or software entity. - This included information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. + + @param Value Describes the current status of a hardware or software entity. + This included information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below. Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification. - - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, + + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. - This parameter allows the status code driver to apply different rules to different callers. + @param CallerId This optional parameter may be used to identify the caller. + This parameter allows the status code driver to apply different rules to different callers. Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification. @param Data This optional parameter may be used to pass additional data - + @return The function always return EFI_SUCCESS. **/ @@ -90,12 +85,12 @@ SerialStatusCodeReportWorker ( // Print DEBUG() information into output buffer. // CharCount = AsciiVSPrint ( - Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, - Format, + Buffer, + EFI_STATUS_CODE_DATA_MAX_SIZE, + Format, Marker ); - } else if (Data != NULL && + } else if (Data != NULL && CompareGuid (&Data->Type, &gEfiStatusCodeSpecificDataGuid) && (CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) { // @@ -111,18 +106,18 @@ SerialStatusCodeReportWorker ( // Print ERROR information into output buffer. // CharCount = AsciiSPrint ( - Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, - "ERROR: C%x:V%x I%x", - CodeType, - Value, + Buffer, + EFI_STATUS_CODE_DATA_MAX_SIZE, + "ERROR: C%x:V%x I%x", + CodeType, + Value, Instance ); // // Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers. // - + if (CallerId != NULL) { CharCount += AsciiSPrint ( &Buffer[CharCount - 1], @@ -148,19 +143,19 @@ SerialStatusCodeReportWorker ( ); } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) { CharCount = AsciiSPrint ( - Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, - "PROGRESS CODE: V%x I%x\n\r", - Value, + Buffer, + EFI_STATUS_CODE_DATA_MAX_SIZE, + "PROGRESS CODE: V%x I%x\n\r", + Value, Instance ); } else { CharCount = AsciiSPrint ( - Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, - "Undefined: C%x:V%x I%x\n\r", - CodeType, - Value, + Buffer, + EFI_STATUS_CODE_DATA_MAX_SIZE, + "Undefined: C%x:V%x I%x\n\r", + CodeType, + Value, Instance ); }