diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-28 05:58:38 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-28 05:58:38 +0000 |
commit | b51e6bc460faece1e936a247fcbc0680bf487d2d (patch) | |
tree | c2eb46cd643a7d1b0a2bdd84643e58fbe6bfe970 /IntelFrameworkPkg | |
parent | 564995cdf55ca9dc057d0c966947caa7ace20e21 (diff) | |
download | edk2-platforms-b51e6bc460faece1e936a247fcbc0680bf487d2d.tar.xz |
1. Add PeiDxeDebugLibReportStatusCode.inf and UefiLibFramework/UefiLib.inf
2. Add FRAMEWORK_MIDIA_FW_VOL_FILEPATH_DEVICE_PATH definition in FrameworkDxeCis.h
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2830 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkPkg')
11 files changed, 681 insertions, 48 deletions
diff --git a/IntelFrameworkPkg/Include/Common/DataHubRecords.h b/IntelFrameworkPkg/Include/Common/DataHubRecords.h index eeb6794edf..bac5915361 100644 --- a/IntelFrameworkPkg/Include/Common/DataHubRecords.h +++ b/IntelFrameworkPkg/Include/Common/DataHubRecords.h @@ -26,6 +26,7 @@ #define EFI_PROCESSOR_SUBCLASS_VERSION 0x00010000
+#include <Protocol/DevicePath.h>
#pragma pack(1)
diff --git a/IntelFrameworkPkg/Include/Common/FrameworkDxeCis.h b/IntelFrameworkPkg/Include/Common/FrameworkDxeCis.h index 197fa7c5d2..08af44fe9f 100644 --- a/IntelFrameworkPkg/Include/Common/FrameworkDxeCis.h +++ b/IntelFrameworkPkg/Include/Common/FrameworkDxeCis.h @@ -66,6 +66,20 @@ typedef struct { #define EFI_EVENT_SIGNAL_READY_TO_BOOT 0x00000203
#define EFI_EVENT_SIGNAL_LEGACY_BOOT 0x00000204
+
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID TianoSpecificDevicePath;
+ UINT32 Type;
+} TIANO_DEVICE_PATH;
+
+#define TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE 0x01
+typedef struct {
+ TIANO_DEVICE_PATH Tiano;
+ EFI_GUID NameGuid;
+} FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
+
+
//
// Function prototype for invoking a function on an Application Processor
// Used by both the SMM infrastructure and the MP Services Protocol
diff --git a/IntelFrameworkPkg/IntelFrameworkPkg.dsc b/IntelFrameworkPkg/IntelFrameworkPkg.dsc index 990edc7033..5e5cc9a0cc 100644 --- a/IntelFrameworkPkg/IntelFrameworkPkg.dsc +++ b/IntelFrameworkPkg/IntelFrameworkPkg.dsc @@ -61,9 +61,9 @@ [Components.Ia32]
-# ${WORKSPACE}/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
+ ${WORKSPACE}/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
${WORKSPACE}/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf
-# ${WORKSPACE}/IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.inf
+ ${WORKSPACE}/IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.inf
${WORKSPACE}/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.inf
${WORKSPACE}/IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.inf
${WORKSPACE}/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
diff --git a/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c b/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c new file mode 100644 index 0000000000..1c1ead22ee --- /dev/null +++ b/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c @@ -0,0 +1,304 @@ +/** @file
+ Debug Library that fowards all messages to ReportStatusCode()
+
+ Copyright (c) 2006, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+
+//
+// The package level header files this module uses
+//
+#include <FrameworkPei.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Guid/StatusCodeDataTypeId.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/DebugLib.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/ReportStatusCodeLib.h>
+#include <Library/PcdLib.h>
+
+/**
+
+ Prints a debug message to the debug output device if the specified error level is enabled.
+
+ If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print
+ the message specified by Format and the associated variable argument list to
+ the debug output device.
+
+ If Format is NULL, then ASSERT().
+
+ @param ErrorLevel The error level of the debug message.
+ @param Format Format string for the debug message to print.
+
+**/
+VOID
+EFIAPI
+DebugPrint (
+ IN UINTN ErrorLevel,
+ IN CONST CHAR8 *Format,
+ ...
+ )
+{
+ UINT64 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE / sizeof (UINT64)];
+ EFI_DEBUG_INFO *DebugInfo;
+ UINTN TotalSize;
+ UINTN Index;
+ VA_LIST Marker;
+ UINT64 *ArgumentPointer;
+
+ //
+ // If Format is NULL, then ASSERT().
+ //
+ ASSERT (Format != NULL);
+
+ //
+ // Check driver Debug Level value and global debug level
+ //
+ if ((ErrorLevel & PcdGet32(PcdDebugPrintErrorLevel)) == 0) {
+ return;
+ }
+
+ TotalSize = sizeof (EFI_DEBUG_INFO) + 12 * sizeof (UINT64) + AsciiStrLen (Format) + 1;
+ if (TotalSize > EFI_STATUS_CODE_DATA_MAX_SIZE) {
+ return;
+ }
+
+ //
+ // Then EFI_DEBUG_INFO
+ //
+ DebugInfo = (EFI_DEBUG_INFO *)Buffer;
+ DebugInfo->ErrorLevel = (UINT32)ErrorLevel;
+
+ //
+ // 256 byte mini Var Arg stack. That is followed by the format string.
+ //
+ VA_START (Marker, Format);
+ for (Index = 0, ArgumentPointer = (UINT64 *)(DebugInfo + 1); Index < 12; Index++, ArgumentPointer++) {
+ WriteUnaligned64(ArgumentPointer, VA_ARG (Marker, UINT64));
+ }
+ VA_END (Marker);
+ AsciiStrCpy ((CHAR8 *)ArgumentPointer, Format);
+
+ REPORT_STATUS_CODE_EX (
+ EFI_DEBUG_CODE,
+ (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_DC_UNSPECIFIED),
+ 0,
+ NULL,
+ &gEfiStatusCodeDataTypeDebugGuid,
+ DebugInfo,
+ TotalSize
+ );
+}
+
+
+/**
+
+ Prints an assert message containing a filename, line number, and description.
+ This may be followed by a breakpoint or a dead loop.
+
+ Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
+ to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
+ PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
+ DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
+ CpuDeadLoop() is called. If neither of these bits are set, then this function
+ returns immediately after the message is printed to the debug output device.
+ DebugAssert() must actively prevent recusrsion. If DebugAssert() is called while
+ processing another DebugAssert(), then DebugAssert() must return immediately.
+
+ If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.
+
+ If Description is NULL, then a <Description> string of "(NULL) Description" is printed.
+
+ @param FileName Pointer to the name of the source file that generated the assert condition.
+ @param LineNumber The line number in the source file that generated the assert condition
+ @param Description Pointer to the description of the assert condition.
+
+**/
+VOID
+EFIAPI
+DebugAssert (
+ IN CONST CHAR8 *FileName,
+ IN UINTN LineNumber,
+ IN CONST CHAR8 *Description
+ )
+{
+ UINT64 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE / sizeof(UINT64)];
+ EFI_DEBUG_ASSERT_DATA *AssertData;
+ UINTN TotalSize;
+ CHAR8 *Temp;
+ UINTN FileNameLength;
+ UINTN DescriptionLength;
+
+ //
+ // Make sure it will all fit in the passed in buffer
+ //
+ FileNameLength = AsciiStrLen (FileName);
+ DescriptionLength = AsciiStrLen (Description);
+ TotalSize = sizeof (EFI_DEBUG_ASSERT_DATA) + FileNameLength + 1 + DescriptionLength + 1;
+ if (TotalSize <= EFI_STATUS_CODE_DATA_MAX_SIZE) {
+ //
+ // Fill in EFI_DEBUG_ASSERT_DATA
+ //
+ AssertData = (EFI_DEBUG_ASSERT_DATA *)Buffer;
+ AssertData->LineNumber = (UINT32)LineNumber;
+
+ //
+ // Copy Ascii FileName including NULL.
+ //
+ Temp = AsciiStrCpy ((CHAR8 *)(AssertData + 1), FileName);
+
+ //
+ // Copy Ascii Description
+ //
+ AsciiStrCpy (Temp + AsciiStrLen (FileName) + 1, Description);
+
+ REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
+ (EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED),
+ (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE),
+ AssertData,
+ TotalSize
+ );
+ }
+
+ //
+ // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings
+ //
+ if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {
+ CpuBreakpoint ();
+ } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {
+ CpuDeadLoop ();
+ }
+}
+
+
+/**
+
+ Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
+
+ This function fills Length bytes of Buffer with the value specified by
+ PcdDebugClearMemoryValue, and returns Buffer.
+
+ If Buffer is NULL, then ASSERT().
+
+ If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
+
+ @param Buffer Pointer to the target buffer to fill with PcdDebugClearMemoryValue.
+ @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
+
+ @return Buffer
+
+**/
+VOID *
+EFIAPI
+DebugClearMemory (
+ OUT VOID *Buffer,
+ IN UINTN Length
+ )
+{
+ //
+ // If Buffer is NULL, then ASSERT().
+ //
+ ASSERT (Buffer != NULL);
+
+ //
+ // SetMem() checks for the the ASSERT() condition on Length and returns Buffer
+ //
+ return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
+}
+
+
+/**
+
+ Returns TRUE if ASSERT() macros are enabled.
+
+ This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
+ PcdDebugProperyMask is set. Otherwise FALSE is returned.
+
+ @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.
+ @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear.
+
+**/
+BOOLEAN
+EFIAPI
+DebugAssertEnabled (
+ VOID
+ )
+{
+ return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);
+}
+
+
+/**
+
+ Returns TRUE if DEBUG()macros are enabled.
+
+ This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
+ PcdDebugProperyMask is set. Otherwise FALSE is returned.
+
+ @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.
+ @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear.
+
+**/
+BOOLEAN
+EFIAPI
+DebugPrintEnabled (
+ VOID
+ )
+{
+ return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);
+}
+
+
+/**
+
+ Returns TRUE if DEBUG_CODE()macros are enabled.
+
+ This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
+ PcdDebugProperyMask is set. Otherwise FALSE is returned.
+
+ @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.
+ @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear.
+
+**/
+BOOLEAN
+EFIAPI
+DebugCodeEnabled (
+ VOID
+ )
+{
+ return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);
+}
+
+
+/**
+
+ Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.
+
+ This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of
+ PcdDebugProperyMask is set. Otherwise FALSE is returned.
+
+ @retval TRUE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.
+ @retval FALSE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.
+
+**/
+BOOLEAN
+EFIAPI
+DebugClearMemoryEnabled (
+ VOID
+ )
+{
+ return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
+}
diff --git a/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf b/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf new file mode 100644 index 0000000000..30d28b5ff3 --- /dev/null +++ b/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf @@ -0,0 +1,104 @@ +#/** @file
+# Debug Library based on report status code library
+#
+# Debug Library for PEIMs and DXE drivers that send debug messages to ReportStatusCode
+# 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.
+#
+#
+#**/
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PeiDxeDebugLibReportStatusCode
+ FILE_GUID = bda39d3a-451b-4350-8266-81ab10fa0523
+ MODULE_TYPE = PEIM
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER PEIM PEI_CORE UEFI_APPLICATION UEFI_DRIVER
+ EDK_RELEASE_VERSION = 0x00020000
+ EFI_SPECIFICATION_VERSION = 0x00020000
+
+
+#
+# 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]
+ DebugLib.c
+
+
+################################################################################
+#
+# Includes Section - list of Include locations that are required for
+# this module.
+#
+################################################################################
+
+[Includes]
+ $(WORKSPACE)/MdePkg/Include/Library
+ $(WORKSPACE)/IntelFrameworkPkg/Include
+
+################################################################################
+#
+# Package Dependency Section - list of Package files that are required for
+# this module.
+#
+################################################################################
+
+[Packages]
+ $(WORKSPACE)/MdePkg/MdePkg.dec
+ $(WORKSPACE)/IntelFrameworkPkg/IntelFrameworkPkg.dec
+
+################################################################################
+#
+# Library Class Section - list of Library Classes that are required for
+# this module.
+#
+################################################################################
+
+[LibraryClasses]
+ PcdLib
+ ReportStatusCodeLib
+ BaseMemoryLib
+ BaseLib
+
+
+################################################################################
+#
+# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.
+#
+################################################################################
+
+[PcdsFixedAtBuild.common]
+ PcdDebugClearMemoryValue|gEfiMdePkgTokenSpaceGuid
+ PcdDebugPropertyMask|gEfiMdePkgTokenSpaceGuid
+
+
+################################################################################
+#
+# Pcd DYNAMIC - list of PCDs that this module is coded for.
+#
+################################################################################
+
+[PcdsDynamic.common]
+ PcdDebugPrintErrorLevel|gEfiMdePkgTokenSpaceGuid
+
diff --git a/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.msa b/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.msa new file mode 100644 index 0000000000..cd0052e0ef --- /dev/null +++ b/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.msa @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <MsaHeader>
+ <ModuleName>PeiDxeDebugLibReportStatusCode</ModuleName>
+ <ModuleType>PEIM</ModuleType>
+ <GuidValue>bda39d3a-451b-4350-8266-81ab10fa0523</GuidValue>
+ <Version>1.0</Version>
+ <Abstract>Debug Library based on report status code library</Abstract>
+ <Description>Debug Library for PEIMs and DXE drivers that send debug messages to ReportStatusCode</Description>
+ <Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
+ <License>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.</License>
+ <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
+ </MsaHeader>
+ <ModuleDefinitions>
+ <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
+ <BinaryModule>false</BinaryModule>
+ <OutputFileBasename>PeiDxeDebugLibReportStatusCode</OutputFileBasename>
+ </ModuleDefinitions>
+ <LibraryClassDefinitions>
+ <LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER PEIM PEI_CORE UEFI_APPLICATION UEFI_DRIVER">
+ <Keyword>DebugLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>BaseLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>BaseMemoryLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>ReportStatusCodeLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>PcdLib</Keyword>
+ </LibraryClass>
+ </LibraryClassDefinitions>
+ <SourceFiles>
+ <Filename>DebugLib.c</Filename>
+ </SourceFiles>
+ <PackageDependencies>
+ <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+ </PackageDependencies>
+ <Guids>
+ <GuidCNames Usage="ALWAYS_CONSUMED">
+ <GuidCName>gEfiStatusCodeDataTypeDebugGuid</GuidCName>
+ </GuidCNames>
+ </Guids>
+ <Externs>
+ <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
+ <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
+ </Externs>
+ <PcdCoded>
+ <PcdEntry PcdItemType="FIXED_AT_BUILD">
+ <C_Name>PcdDebugPropertyMask</C_Name>
+ <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <HelpText>The bitmask of flags that specify the enable/disable of Debug + Assert, Debug Print, Debug Code, Clear Memory, Assert + Breakpoint and Assert Deadloop.</HelpText>
+ </PcdEntry>
+ <PcdEntry PcdItemType="FIXED_AT_BUILD">
+ <C_Name>PcdDebugClearMemoryValue</C_Name>
+ <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <HelpText>The value used by DebugClearMemory () to fill a certain range + of memory.</HelpText>
+ </PcdEntry>
+ <PcdEntry PcdItemType="DYNAMIC">
+ <C_Name>PcdDebugPrintErrorLevel</C_Name>
+ <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <HelpText>The bitmask of flags that specify the kind of debug message + output when Debug Print is enabled.</HelpText>
+ </PcdEntry>
+ </PcdCoded>
+</ModuleSurfaceArea>
\ No newline at end of file diff --git a/IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.c b/IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.c index 9dd79af0cb..65c7641b74 100644 --- a/IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.c +++ b/IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.c @@ -384,28 +384,28 @@ EfiReleaseLock ( gBS->RestoreTPL (Tpl);
}
-/** - Tests whether a controller handle is being managed by a specific driver. - +/**
+ Tests whether a controller handle is being managed by a specific driver.
+
This function tests whether the driver specified by DriverBindingHandle is
currently managing the controller specified by ControllerHandle. This test
is performed by evaluating if the the protocol specified by ProtocolGuid is
present on ControllerHandle and is was opened by DriverBindingHandle with an
attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
If ProtocolGuid is NULL, then ASSERT().
- - @param ControllerHandle A handle for a controller to test. - @param DriverBindingHandle Specifies the driver binding handle for the - driver. - @param ProtocolGuid Specifies the protocol that the driver specified - by DriverBindingHandle opens in its Start() - function. - - @retval EFI_SUCCESS ControllerHandle is managed by the driver - specifed by DriverBindingHandle. - @retval EFI_UNSUPPORTED ControllerHandle is not managed by the driver - specifed by DriverBindingHandle. - +
+ @param ControllerHandle A handle for a controller to test.
+ @param DriverBindingHandle Specifies the driver binding handle for the
+ driver.
+ @param ProtocolGuid Specifies the protocol that the driver specified
+ by DriverBindingHandle opens in its Start()
+ function.
+
+ @retval EFI_SUCCESS ControllerHandle is managed by the driver
+ specifed by DriverBindingHandle.
+ @retval EFI_UNSUPPORTED ControllerHandle is not managed by the driver
+ specifed by DriverBindingHandle.
+
**/
EFI_STATUS
EFIAPI
@@ -445,24 +445,24 @@ EfiTestManagedDevice ( return EFI_SUCCESS;
}
-/** - Tests whether a child handle is a child device of the controller. - +/**
+ Tests whether a child handle is a child device of the controller.
+
This function tests whether ChildHandle is one of the children of
ControllerHandle. This test is performed by checking to see if the protocol
specified by ProtocolGuid is present on ControllerHandle and opened by
ChildHandle with an attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
If ProtocolGuid is NULL, then ASSERT().
- +
@param ControllerHandle A handle for a (parent) controller to test.
- @param ChildHandle A child handle to test. - @param ConsumsedGuid Supplies the protocol that the child controller + @param ChildHandle A child handle to test.
+ @param ConsumsedGuid Supplies the protocol that the child controller
opens on its parent controller.
- - @retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle. - @retval EFI_UNSUPPORTED ChildHandle is not a child of the - ControllerHandle. - +
+ @retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle.
+ @retval EFI_UNSUPPORTED ChildHandle is not a child of the
+ ControllerHandle.
+
**/
EFI_STATUS
EFIAPI
diff --git a/IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.inf b/IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.inf new file mode 100644 index 0000000000..d91ec2e02d --- /dev/null +++ b/IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.inf @@ -0,0 +1,114 @@ +#/** @file
+# Component description file for the entry point to a EFIDXE Drivers
+#
+# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification
+#
+# Help Port Framework/Tinao code that has conflicts with UEFI 2.0 by hiding the oldconflicts with library functions and supporting implementations of the old
+# (EDK/EFI 1.10) and new (EDK II/UEFI 2.0) way. This module is a DXE driver as it contains DXE enum extensions for EFI event services.
+# 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.
+#
+#
+#**/
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = UefiLib
+ FILE_GUID = 3a004ba5-efe0-4a61-9f1a-267a46ae5ba9
+ MODULE_TYPE = DXE_DRIVER
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = UefiLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
+ EDK_RELEASE_VERSION = 0x00020000
+ EFI_SPECIFICATION_VERSION = 0x00020000
+
+
+#
+# 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]
+ UefiLibPrint.c
+ UefiNotTiano.c
+ Console.c
+ UefiLib.c
+
+
+################################################################################
+#
+# Includes Section - list of Include locations that are required for
+# this module.
+#
+################################################################################
+
+[Includes]
+ $(WORKSPACE)/MdePkg/Include/Library
+ $(WORKSPACE)/IntelFrameworkPkg/Include
+
+################################################################################
+#
+# Package Dependency Section - list of Package files that are required for
+# this module.
+#
+################################################################################
+
+[Packages]
+ MdePkg/MdePkg.dec
+
+
+################################################################################
+#
+# Library Class Section - list of Library Classes that are required for
+# this module.
+#
+################################################################################
+
+[LibraryClasses]
+ PrintLib
+ PcdLib
+ MemoryAllocationLib
+ DebugLib
+ BaseMemoryLib
+ BaseLib
+ UefiBootServicesTableLib
+
+
+################################################################################
+#
+# Guid C Name Section - list of Guids that this module uses or produces.
+#
+################################################################################
+
+[Guids]
+ gEfiFrameworkDevicePathGuid # ALWAYS_CONSUMED
+ gEfiEventReadyToBootGuid # ALWAYS_CONSUMED
+ gEfiEventLegacyBootGuid # ALWAYS_CONSUMED
+
+
+################################################################################
+#
+# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.
+#
+################################################################################
+
+[PcdsFixedAtBuild.common]
+ PcdUefiLibMaxPrintBufferSize|gEfiMdePkgTokenSpaceGuid
+
diff --git a/IntelFrameworkPkg/Library/UefiLibFramework/UefiLibFramework.h b/IntelFrameworkPkg/Library/UefiLibFramework/UefiLibFramework.h index 4bdc4b1edc..9d91611cd6 100644 --- a/IntelFrameworkPkg/Library/UefiLibFramework/UefiLibFramework.h +++ b/IntelFrameworkPkg/Library/UefiLibFramework/UefiLibFramework.h @@ -18,7 +18,20 @@ #ifndef _UEFI_LIB_FRAMEWORK_H_
#define _UEFI_LIB_FRAMEWORK_H_
+//
+// The package level header files this module uses
+//
#include <FrameworkDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Guid/EventGroup.h>
+#include <Guid/EventLegacyBios.h>
+#include <Guid/FrameworkDevicePath.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
@@ -26,6 +39,5 @@ #include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/PrintLib.h>
-#include <Library/UefiLib.h>
#endif
diff --git a/IntelFrameworkPkg/Library/UefiLibFramework/UefiLibPrint.c b/IntelFrameworkPkg/Library/UefiLibFramework/UefiLibPrint.c index 7b539be501..9a7592e9e6 100644 --- a/IntelFrameworkPkg/Library/UefiLibFramework/UefiLibPrint.c +++ b/IntelFrameworkPkg/Library/UefiLibFramework/UefiLibPrint.c @@ -36,9 +36,9 @@ STATIC
UINTN
InternalPrint (
- IN CONST CHAR16 *Format,
- IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *Console,
- IN VA_LIST Marker
+ IN CONST CHAR16 *Format,
+ IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Console,
+ IN VA_LIST Marker
)
{
UINTN Return;
@@ -159,9 +159,9 @@ ErrorPrint ( STATIC
UINTN
AsciiInternalPrint (
- IN CONST CHAR8 *Format,
- IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *Console,
- IN VA_LIST Marker
+ IN CONST CHAR8 *Format,
+ IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Console,
+ IN VA_LIST Marker
)
{
UINTN Return;
diff --git a/IntelFrameworkPkg/Library/UefiLibFramework/UefiNotTiano.c b/IntelFrameworkPkg/Library/UefiLibFramework/UefiNotTiano.c index ee679e6ba6..59c533d8ba 100644 --- a/IntelFrameworkPkg/Library/UefiLibFramework/UefiNotTiano.c +++ b/IntelFrameworkPkg/Library/UefiLibFramework/UefiNotTiano.c @@ -289,16 +289,19 @@ EfiGetNameGuidFromFwVolDevicePathNode ( IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode
)
{
+ FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FrameworkFvDevicePathNode;
+
ASSERT (FvDevicePathNode != NULL);
+ FrameworkFvDevicePathNode = (FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) FvDevicePathNode;
//
// Use the new Device path that does not conflict with the UEFI
//
- if (FvDevicePathNode->Tiano.Header.Type == MEDIA_DEVICE_PATH ||
- FvDevicePathNode->Tiano.Header.SubType == MEDIA_VENDOR_DP) {
- if (CompareGuid (&gEfiFrameworkDevicePathGuid, &FvDevicePathNode->Tiano.TianoSpecificDevicePath)) {
- if (FvDevicePathNode->Tiano.Type == TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE) {
- return (EFI_GUID *) &FvDevicePathNode->NameGuid;
+ if (FrameworkFvDevicePathNode->Tiano.Header.Type == MEDIA_DEVICE_PATH ||
+ FrameworkFvDevicePathNode->Tiano.Header.SubType == MEDIA_VENDOR_DP) {
+ if (CompareGuid (&gEfiFrameworkDevicePathGuid, &FrameworkFvDevicePathNode->Tiano.TianoSpecificDevicePath)) {
+ if (FrameworkFvDevicePathNode->Tiano.Type == TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE) {
+ return (EFI_GUID *) &FrameworkFvDevicePathNode->NameGuid;
}
}
}
@@ -325,29 +328,33 @@ VOID EFIAPI
EfiInitializeFwVolDevicepathNode (
IN OUT MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode,
- IN CONST EFI_GUID *NameGuid
+ IN CONST EFI_GUID *NameGuid
)
{
+ FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FrameworkFvDevicePathNode;
+
ASSERT (FvDevicePathNode != NULL);
ASSERT (NameGuid != NULL);
+ FrameworkFvDevicePathNode = (FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) FvDevicePathNode;
+
//
// Use the new Device path that does not conflict with the UEFI
//
- FvDevicePathNode->Tiano.Header.Type = MEDIA_DEVICE_PATH;
- FvDevicePathNode->Tiano.Header.SubType = MEDIA_VENDOR_DP;
- SetDevicePathNodeLength (&FvDevicePathNode->Tiano.Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH));
+ FrameworkFvDevicePathNode->Tiano.Header.Type = MEDIA_DEVICE_PATH;
+ FrameworkFvDevicePathNode->Tiano.Header.SubType = MEDIA_VENDOR_DP;
+ SetDevicePathNodeLength (&FrameworkFvDevicePathNode->Tiano.Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH));
//
// Add the GUID for generic Tiano device paths
//
- CopyGuid (&FvDevicePathNode->Tiano.TianoSpecificDevicePath, &gEfiFrameworkDevicePathGuid);
+ CopyGuid (&FrameworkFvDevicePathNode->Tiano.TianoSpecificDevicePath, &gEfiFrameworkDevicePathGuid);
//
// Add in the FW Vol File Path Tiano defined information
//
- FvDevicePathNode->Tiano.Type = TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE;
+ FrameworkFvDevicePathNode->Tiano.Type = TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE;
- CopyGuid (&FvDevicePathNode->NameGuid, NameGuid);
+ CopyGuid (&FrameworkFvDevicePathNode->NameGuid, NameGuid);
}
|