]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Add PeiDxeDebugLibReportStatusCode.inf and UefiLibFramework/UefiLib.inf
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 28 Jun 2007 05:58:38 +0000 (05:58 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 28 Jun 2007 05:58:38 +0000 (05:58 +0000)
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

IntelFrameworkPkg/Include/Common/DataHubRecords.h
IntelFrameworkPkg/Include/Common/FrameworkDxeCis.h
IntelFrameworkPkg/IntelFrameworkPkg.dsc
IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c [new file with mode: 0644]
IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf [new file with mode: 0644]
IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.msa [new file with mode: 0644]
IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.c
IntelFrameworkPkg/Library/UefiLibFramework/UefiLib.inf [new file with mode: 0644]
IntelFrameworkPkg/Library/UefiLibFramework/UefiLibFramework.h
IntelFrameworkPkg/Library/UefiLibFramework/UefiLibPrint.c
IntelFrameworkPkg/Library/UefiLibFramework/UefiNotTiano.c

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