]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Code scrub DxeIpl, Runtime, DevicePath, FvbServicesLib, DiskIo, Partition, English...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Dec 2008 16:20:43 +0000 (16:20 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Dec 2008 16:20:43 +0000 (16:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7105 6f19259b-4bc3-4df7-8a09-765794883524

38 files changed:
MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
MdeModulePkg/Core/DxeIplPeim/Ebc/DxeLoadFunc.c
MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
MdeModulePkg/Core/DxeIplPeim/Ia32/ImageRead.c
MdeModulePkg/Core/DxeIplPeim/Ia32/VirtualMemory.c
MdeModulePkg/Core/DxeIplPeim/Ia32/VirtualMemory.h
MdeModulePkg/Core/DxeIplPeim/Ipf/DxeLoadFunc.c
MdeModulePkg/Core/DxeIplPeim/Ipf/ImageRead.c
MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h
MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
MdeModulePkg/Core/RuntimeDxe/Crc32.c
MdeModulePkg/Core/RuntimeDxe/Runtime.c
MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf
MdeModulePkg/Library/EdkFvbServiceLib/Fvb.c
MdeModulePkg/Universal/DevicePathDxe/DevicePath.c
MdeModulePkg/Universal/DevicePathDxe/DevicePath.h
MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c
MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c
MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.h
MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.c
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.h
MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
MdeModulePkg/Universal/EbcDxe/EbcExecute.c
MdeModulePkg/Universal/EbcDxe/EbcExecute.h
MdeModulePkg/Universal/EbcDxe/EbcInt.h

index ae3c451a885140029f8795d11a59470ce5880353..149592857db13691ce5c2d64fa2376662fc564f5 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
   Master header file for DxeIpl PEIM. All source files in this module should\r
-  include this file for common defininitions.\r
+  include this file for common definitions.\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
@@ -49,17 +49,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define BSP_STORE_SIZE  0x4000\r
 \r
 \r
-//\r
-// This macro aligns the ActualSize with a given alignment and is used to \r
-// calculate the size an image occupies.\r
-//\r
-#define GET_OCCUPIED_SIZE(ActualSize, Alignment) ((ActualSize + (Alignment - 1)) & ~(Alignment - 1))\r
-\r
-//\r
-// Indicate whether DxeIpl has been shadowed to memory.\r
-//\r
-extern BOOLEAN gInMemory;\r
-\r
 //\r
 // This PPI is installed to indicate the end of the PEI usage of memory \r
 //\r
@@ -103,18 +92,24 @@ DxeIplFindDxeCore (
 \r
 \r
 /**\r
-   This function simply retrieves the function pointer of ImageRead in\r
-   ImageContext structure.\r
-    \r
-   @param ImageContext       A pointer to the structure of \r
-                             PE_COFF_LOADER_IMAGE_CONTEXT\r
-   \r
-   @retval EFI_SUCCESS       This function always return EFI_SUCCESS.\r
+  Support routine for the PE/COFF Loader that reads a buffer from a PE/COFF file\r
+\r
+  @param  FileHandle   The handle to the PE/COFF file \r
+  @param  FileOffset   The offset, in bytes, into the file to read \r
+  @param  ReadSize     The number of bytes to read from the file starting at \r
+                       FileOffset \r
+  @param  Buffer       A pointer to the buffer to read the data into. \r
+\r
+  @retval EFI_SUCCESS  ReadSize bytes of data were read into Buffer from the \r
+                       PE/COFF file starting at FileOffset\r
 \r
 **/\r
 EFI_STATUS\r
-GetImageReadFunction (\r
-  IN      PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
+PeiImageRead (\r
+  IN     VOID    *FileHandle,\r
+  IN     UINTN   FileOffset,\r
+  IN OUT UINTN   *ReadSize,\r
+  OUT    VOID    *Buffer\r
   );\r
 \r
 \r
@@ -144,9 +139,9 @@ DxeLoadCore (
 \r
    This function performs a CPU architecture specific operations to execute\r
    the entry point of DxeCore with the parameters of HobList.\r
-   It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
+   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
 \r
-   @param DxeCoreEntryPoint         The entrypoint of DxeCore.\r
+   @param DxeCoreEntryPoint         The entry point of DxeCore.\r
    @param HobList                   The start of HobList passed to DxeCore.\r
 \r
 **/\r
@@ -241,7 +236,7 @@ CustomGuidedSectionExtract (
 /**\r
    Decompresses a section to the output buffer.\r
 \r
-   This function lookes up the compression type field in the input section and\r
+   This function looks up the compression type field in the input section and\r
    applies the appropriate compression algorithm to compress the section to a\r
    callee allocated buffer.\r
     \r
index ab5d1846b17b05676204c5865491c6b463d6caf2..d3b57e84c9ee9869d0534eb150be090676f83eec 100644 (file)
@@ -1,8 +1,10 @@
 #/** @file\r
+#  Last PEIM executed in PEI phase to load DXE Core from a Firmware Volume.\r
 #  \r
-#  The responsibility of this module is to load the DXE Core from a Firmware Volume.\r
-#  This implementation is used to load a 32-bit DXE Core.\r
-#  \r
+#  This module produces a special PPI named the DXE Initial Program Load (IPL)\r
+#  PPI to discover and dispatch the DXE Foundation and components that are\r
+#  needed to run the DXE Foundation.\r
+#\r
 #  Copyright (c) 2006 - 2008, 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
@@ -79,8 +81,8 @@
 [Ppis]\r
   gEfiEndOfPeiSignalPpiGuid                     # PPI SOMETIMES_PRODUCED\r
   gEfiDxeIplPpiGuid                             # PPI SOMETIMES_PRODUCED\r
-  gEfiPeiDecompressPpiGuid\r
-  gEfiPeiReadOnlyVariable2PpiGuid\r
+  gEfiPeiDecompressPpiGuid                      # PPI SOMETIMES_PRODUCED\r
+  gEfiPeiReadOnlyVariable2PpiGuid               # PPI SOMETIMES_CONSUMED\r
 \r
 [Guids]\r
   gEfiMemoryTypeInformationGuid\r
index d2f7521bcd6d6ec7c5fd5ca85ee613f14ac944aa..f5a384f6020940a0f398c842cee18d59ee5c6d31 100644 (file)
@@ -15,14 +15,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "DxeIpl.h"\r
 \r
-//\r
-// This global variable indicates whether this module has been shadowed\r
-// to memory.\r
-//\r
-BOOLEAN gInMemory = FALSE;\r
 \r
 //\r
-// Module Globals used in the DXE to PEI handoff\r
+// Module Globals used in the DXE to PEI hand off\r
 // These must be module globals, so the stack can be switched\r
 //\r
 CONST EFI_DXE_IPL_PPI mDxeIplPpi = {\r
@@ -37,7 +32,7 @@ CONST EFI_PEI_DECOMPRESS_PPI mDecompressPpi = {
   Decompress\r
 };\r
 \r
-CONST EFI_PEI_PPI_DESCRIPTOR     mPpiList[] = {\r
+CONST EFI_PEI_PPI_DESCRIPTOR mPpiList[] = {\r
   {\r
     EFI_PEI_PPI_DESCRIPTOR_PPI,\r
     &gEfiDxeIplPpiGuid,\r
@@ -50,19 +45,24 @@ CONST EFI_PEI_PPI_DESCRIPTOR     mPpiList[] = {
   }\r
 };\r
 \r
-CONST EFI_PEI_PPI_DESCRIPTOR     gEndOfPeiSignalPpi = {\r
+CONST EFI_PEI_PPI_DESCRIPTOR gEndOfPeiSignalPpi = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiEndOfPeiSignalPpiGuid,\r
   NULL\r
 };\r
 \r
 /**\r
-  Initializes the Dxe Ipl PPI\r
+  Entry point of DXE IPL PEIM.\r
+  \r
+  This function installs DXE IPL PPI and Decompress PPI.  It also reloads\r
+  itself to memory on non-S3 resume boot path.\r
 \r
   @param  FileHandle  Handle of the file being invoked.\r
   @param  PeiServices Describes the list of possible PEI Services.\r
 \r
-  @return EFI_SUCESS\r
+  @retval EFI_SUCESS  The entry point of DXE IPL PEIM executes successfully.\r
+  @retval Others      Some error occurs during the execution of this function. \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -83,33 +83,36 @@ PeimInitializeDxeIpl (
     Status = PeiServicesRegisterForShadow (FileHandle);\r
     if (Status == EFI_SUCCESS) {\r
       //\r
-      // EFI_SUCESS means the first time call register for shadow \r
+      // EFI_SUCESS means it is the first time to call register for shadow. \r
       // \r
       return Status;\r
-    } else if (Status == EFI_ALREADY_STARTED) {\r
+    }\r
+    \r
+    //\r
+    // Ensure that DXE IPL is shadowed to permanent memory.\r
+    //\r
+    ASSERT (Status == EFI_ALREADY_STARTED);\r
      \r
-      //\r
-      // Get custom extract guided section method guid list \r
-      //\r
-      ExtractHandlerNumber = ExtractGuidedSectionGetGuidList (&ExtractHandlerGuidTable);\r
-      \r
-      //\r
-      // Install custom extraction guid ppi\r
-      //\r
-      if (ExtractHandlerNumber > 0) {\r
-        GuidPpi = (EFI_PEI_PPI_DESCRIPTOR *) AllocatePool (ExtractHandlerNumber * sizeof (EFI_PEI_PPI_DESCRIPTOR));\r
-        ASSERT (GuidPpi != NULL);\r
-        while (ExtractHandlerNumber-- > 0) {\r
-          GuidPpi->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;\r
-          GuidPpi->Ppi   = (VOID *) &mCustomGuidedSectionExtractionPpi;\r
-          GuidPpi->Guid  = &(ExtractHandlerGuidTable [ExtractHandlerNumber]);\r
-          Status = PeiServicesInstallPpi (GuidPpi++);\r
-          ASSERT_EFI_ERROR(Status);\r
-        }\r
+    //\r
+    // Get custom extract guided section method guid list \r
+    //\r
+    ExtractHandlerNumber = ExtractGuidedSectionGetGuidList (&ExtractHandlerGuidTable);\r
+    \r
+    //\r
+    // Install custom extraction guid PPI\r
+    //\r
+    if (ExtractHandlerNumber > 0) {\r
+      GuidPpi = (EFI_PEI_PPI_DESCRIPTOR *) AllocatePool (ExtractHandlerNumber * sizeof (EFI_PEI_PPI_DESCRIPTOR));\r
+      ASSERT (GuidPpi != NULL);\r
+      while (ExtractHandlerNumber-- > 0) {\r
+        GuidPpi->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;\r
+        GuidPpi->Ppi   = (VOID *) &mCustomGuidedSectionExtractionPpi;\r
+        GuidPpi->Guid  = &ExtractHandlerGuidTable[ExtractHandlerNumber];\r
+        Status = PeiServicesInstallPpi (GuidPpi++);\r
+        ASSERT_EFI_ERROR(Status);\r
       }\r
-    } else {\r
-      ASSERT (FALSE);\r
     }\r
+    \r
   }\r
   \r
   //\r
@@ -123,6 +126,9 @@ PeimInitializeDxeIpl (
 \r
 /**\r
    Main entry point to last PEIM. \r
+\r
+   This function finds DXE Core in the firmware volume and transfer the control to\r
+   DXE core.\r
     \r
    @param This          Entry point for DXE IPL PPI.\r
    @param PeiServices   General purpose services available to every PEIM.\r
@@ -167,7 +173,7 @@ DxeLoadCore (
     }\r
 \r
     //\r
-    // Now should have a HOB with the DXE core w/ the old HOB destroyed\r
+    // Now should have a HOB with the DXE core\r
     //\r
   }\r
 \r
@@ -205,7 +211,7 @@ DxeLoadCore (
   FileHandle = DxeIplFindDxeCore ();\r
 \r
   //\r
-  // Load the DXE Core from a Firmware Volume, may use LoadFile ppi to do this for save code size.\r
+  // Load the DXE Core from a Firmware Volume, may use LoadFile PPI to do this to save code size.\r
   //\r
   Status = PeiLoadFile (\r
              FileHandle,\r
@@ -227,28 +233,25 @@ DxeLoadCore (
   BuildModuleHob (\r
     &DxeCoreFileInfo.FileName,\r
     DxeCoreAddress,\r
-    EFI_SIZE_TO_PAGES ((UINTN) DxeCoreSize) * EFI_PAGE_SIZE,\r
+    ALIGN_VALUE (DxeCoreSize, EFI_PAGE_SIZE),\r
     DxeCoreEntryPoint\r
     );\r
 \r
   //\r
   // Report Status Code EFI_SW_PEI_PC_HANDOFF_TO_NEXT\r
   //\r
-  REPORT_STATUS_CODE (\r
-    EFI_PROGRESS_CODE,\r
-    PcdGet32(PcdStatusCodeValuePeiHandoffToDxe)\r
-    );\r
+  REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdStatusCodeValuePeiHandoffToDxe));\r
 \r
   DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Loading DXE CORE at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN)DxeCoreAddress, FUNCTION_ENTRY_POINT (DxeCoreEntryPoint)));\r
 \r
   //\r
   // Transfer control to the DXE Core\r
-  // The handoff state is simply a pointer to the HOB list\r
+  // The hand off state is simply a pointer to the HOB list\r
   //\r
   HandOffToDxeCore (DxeCoreEntryPoint, HobList);\r
   //\r
   // If we get here, then the DXE Core returned.  This is an error\r
-  // Dxe Core should not return.\r
+  // DxeCore should not return.\r
   //\r
   ASSERT (FALSE);\r
   CpuDeadLoop ();\r
@@ -348,9 +351,8 @@ PeiLoadFile (
 \r
   ZeroMem (&ImageContext, sizeof (ImageContext));\r
   ImageContext.Handle = Pe32Data;\r
-  Status              = GetImageReadFunction (&ImageContext);\r
+  ImageContext.ImageRead = PeiImageRead;\r
 \r
-  ASSERT_EFI_ERROR (Status);\r
 \r
   Status = PeCoffLoaderGetImageInfo (&ImageContext);\r
   if (EFI_ERROR (Status)) {\r
@@ -383,9 +385,9 @@ PeiLoadFile (
   }\r
 \r
   //\r
-  // Flush the instruction cache so the image data is written before we execute it\r
+  // Flush the instruction cache so the image data are written before we execute it\r
   //\r
-  InvalidateInstructionCacheRange ((VOID *)(UINTN)ImageContext.ImageAddress, (UINTN)ImageContext.ImageSize);\r
+  InvalidateInstructionCacheRange ((VOID *)(UINTN) ImageContext.ImageAddress, (UINTN) ImageContext.ImageSize);\r
 \r
   *ImageAddress = ImageContext.ImageAddress;\r
   *ImageSize    = ImageContext.ImageSize;\r
@@ -504,7 +506,7 @@ CustomGuidedSectionExtract (
     if (*OutputBuffer == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
-    DEBUG ((DEBUG_INFO, "Customed Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize, *OutputBuffer));\r
+    DEBUG ((DEBUG_INFO, "Customized Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize, *OutputBuffer));\r
     //\r
     // *OutputBuffer still is one section. Adjust *OutputBuffer offset, \r
     // skip EFI section header to make section data at page alignment.\r
@@ -517,7 +519,7 @@ CustomGuidedSectionExtract (
              OutputBuffer,\r
              ScratchBuffer,\r
              AuthenticationStatus\r
-           );\r
+             );\r
   if (EFI_ERROR (Status)) {\r
     //\r
     // Decode failed\r
@@ -536,7 +538,7 @@ CustomGuidedSectionExtract (
 /**\r
    Decompresses a section to the output buffer.\r
 \r
-   This function lookes up the compression type field in the input section and\r
+   This function looks up the compression type field in the input section and\r
    applies the appropriate compression algorithm to compress the section to a\r
    callee allocated buffer.\r
     \r
@@ -585,7 +587,7 @@ Decompress (
   case EFI_STANDARD_COMPRESSION:\r
     //\r
     // Load EFI standard compression.\r
-    // For compressed data, decompress them to dstbuffer.\r
+    // For compressed data, decompress them to destination buffer.\r
     //\r
     Status = UefiDecompressGetInfo (\r
                (UINT8 *) ((EFI_COMPRESSION_SECTION *) Section + 1),\r
@@ -671,8 +673,6 @@ Decompress (
 }\r
 \r
 \r
-\r
-\r
 /**\r
    Updates the Stack HOB passed to DXE phase.\r
 \r
index 51055e157aa87f08ed947714b31f8de7eaf0ca95..afc64664d14ac46a80567e618b81adf29995437f 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-  x64-specifc functionality for DxeLoad.\r
+  EBC-specific functionality for DxeLoad.\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
@@ -21,9 +21,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
    This function performs a CPU architecture specific operations to execute\r
    the entry point of DxeCore with the parameters of HobList.\r
-   It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
+   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
 \r
-   @param DxeCoreEntryPoint         The entrypoint of DxeCore.\r
+   @param DxeCoreEntryPoint         The entry point of DxeCore.\r
    @param HobList                   The start of HobList passed to DxeCore.\r
 \r
 **/\r
@@ -51,7 +51,7 @@ HandOffToDxeCore (
   TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);\r
 \r
   //\r
-  // End of PEI phase singal\r
+  // End of PEI phase signal\r
   //\r
   Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
   ASSERT_EFI_ERROR (Status);\r
index 65c7ceac17a08b0623548cac3a0eee723b7b180a..22fb1fea2cc66dea53e838ca2513456a03e10e5e 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-  Ia32-specifc functionality for DxeLoad.\r
+  Ia32-specific functionality for DxeLoad.\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
@@ -49,9 +49,9 @@ GLOBAL_REMOVE_IF_UNREFERENCED  IA32_DESCRIPTOR gLidtDescriptor = {
 \r
    This function performs a CPU architecture specific operations to execute\r
    the entry point of DxeCore with the parameters of HobList.\r
-   It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
+   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
 \r
-   @param DxeCoreEntryPoint         The entrypoint of DxeCore.\r
+   @param DxeCoreEntryPoint         The entry point of DxeCore.\r
    @param HobList                   The start of HobList passed to DxeCore.\r
 \r
 **/\r
@@ -102,7 +102,7 @@ HandOffToDxeCore (
     PageTables = CreateIdentityMappingPageTables ();\r
 \r
     //\r
-    // End of PEI phase singal\r
+    // End of PEI phase signal\r
     //\r
     Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
     ASSERT_EFI_ERROR (Status);\r
@@ -165,7 +165,7 @@ HandOffToDxeCore (
     TopOfStack = (EFI_PHYSICAL_ADDRESS) (UINTN) ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);\r
 \r
     //\r
-    // End of PEI phase singal\r
+    // End of PEI phase signal\r
     //\r
     Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
     ASSERT_EFI_ERROR (Status);\r
index 747026364e2260a44baf108307eba2ce51ef472f..78abff094cba86a5c83a3c36054a7538f42df0c8 100644 (file)
@@ -54,40 +54,3 @@ PeiImageRead (
 \r
   return EFI_SUCCESS;\r
 }\r
-\r
-\r
-/**\r
-   This function simply retrieves the function pointer of ImageRead in\r
-   ImageContext structure.\r
-    \r
-   @param ImageContext       A pointer to the structure of \r
-                             PE_COFF_LOADER_IMAGE_CONTEXT\r
-   \r
-   @retval EFI_SUCCESS       This function always returns EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-GetImageReadFunction (\r
-  IN      PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\r
-  VOID        *MemoryBuffer;\r
-\r
-  if (gInMemory) {\r
-    ImageContext->ImageRead = PeiImageRead;\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  //\r
-  // BugBug; This code assumes PeiImageRead() is less than a page in size!\r
-  //  Allocate a page so we can shaddow the read function from FLASH into \r
-  //  memory to increase performance. \r
-  //\r
-  \r
-  MemoryBuffer = AllocateCopyPool (0x400, (VOID *)(UINTN) PeiImageRead);\r
-  ASSERT (MemoryBuffer != NULL);\r
-\r
-  ImageContext->ImageRead = (PE_COFF_LOADER_READ_FILE) (UINTN) MemoryBuffer;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
index 25fb37ea8e218c8b113fc1cdd5fe476e90743d53..e940feb1c4a5ba387776e8021fd4f6fcd9e9eb10 100644 (file)
@@ -4,16 +4,16 @@
   enter Long Mode (x64 64-bit mode).\r
 \r
   While we make a 1:1 mapping (identity mapping) for all physical pages \r
-  we still need to use the MTRR's to ensure that the cachability attirbutes\r
+  we still need to use the MTRR's to ensure that the cachability attributes\r
   for all memory regions is correct.\r
 \r
   The basic idea is to use 2MB page table entries where ever possible. If\r
   more granularity of cachability is required then 4K page tables are used.\r
 \r
   References:\r
-    1) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 1:Basic Architecture, Intel\r
-    2) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel\r
-    3) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel\r
+    1) IA-32 Intel(R) Architecture Software Developer's Manual Volume 1:Basic Architecture, Intel\r
+    2) IA-32 Intel(R) Architecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel\r
+    3) IA-32 Intel(R) Architecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
@@ -29,11 +29,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "DxeIpl.h"\r
 #include "VirtualMemory.h"\r
 \r
-\r
-\r
-\r
-\r
-\r
 /**\r
   Allocates and fills in the Page Directory and Page Table Entries to\r
   establish a 1:1 Virtual to Physical mapping.\r
@@ -43,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                                                 table entries  to the physical \r
                                                 address space. \r
 \r
-  @return EFI_SUCCESS           The 1:1 Virtual to Physical identity mapping was created\r
+  @return The address of 4 level page map.\r
 \r
 **/\r
 UINTN\r
index be9a7391b61516f33b123b964cf519b8324d749a..6ada7102e9f86afa21ba36d867c7802a988e5189 100644 (file)
@@ -110,7 +110,7 @@ typedef union {
                                                 table entries  to the physical \r
                                                 address space. \r
 \r
-  @return EFI_SUCCESS           The 1:1 Virtual to Physical identity mapping was created\r
+  @return The address of 4 level page map.\r
 \r
 **/\r
 UINTN\r
@@ -119,9 +119,6 @@ CreateIdentityMappingPageTables (
   );\r
 \r
 \r
-\r
-\r
-\r
 /**\r
  \r
   Fix up the vector number in the vector code.\r
index 5c9611e5c2bb8a0a3aacc60eb29ef12f5a88be12..b0092294f011377e4417dadbaf1f4ad5466eb49c 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-  Ipf-specifc functionality for DxeLoad.\r
+  Ipf-specific functionality for DxeLoad.\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
@@ -21,9 +21,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
    This function performs a CPU architecture specific operations to execute\r
    the entry point of DxeCore with the parameters of HobList.\r
-   It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
+   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
 \r
-   @param DxeCoreEntryPoint         The entrypoint of DxeCore.\r
+   @param DxeCoreEntryPoint         The entry point of DxeCore.\r
    @param HobList                   The start of HobList passed to DxeCore.\r
 \r
 **/\r
@@ -62,7 +62,7 @@ HandOffToDxeCore (
   TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);\r
 \r
   //\r
-  // End of PEI phase singal\r
+  // End of PEI phase signal\r
   //\r
   Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
   ASSERT_EFI_ERROR (Status);\r
index c7367609f22677df0a5b1bca1d449c347dc1fa6d..eeb6bc8a8614124c3c39e57680f1c7aefbb7a0ac 100644 (file)
@@ -49,22 +49,3 @@ PeiImageRead (
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
-/**\r
-   This function simply retrieves the function pointer of ImageRead in\r
-   ImageContext structure.\r
-    \r
-   @param ImageContext       A pointer to the structure of \r
-                             PE_COFF_LOADER_IMAGE_CONTEXT\r
-   \r
-   @retval EFI_SUCCESS       This function always returns EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-GetImageReadFunction (\r
-  IN      PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\r
-  ImageContext->ImageRead = PeiImageRead;\r
-  return EFI_SUCCESS;\r
-}\r
index 05c5203d820f5706a2b4ba6c27b577f21e21b3cd..6fca4e496a1bd46c53459f9a065f0e1cbcba4711 100644 (file)
@@ -22,9 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
    This function performs a CPU architecture specific operations to execute\r
    the entry point of DxeCore with the parameters of HobList.\r
-   It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
+   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
 \r
-   @param DxeCoreEntryPoint         The entrypoint of DxeCore.\r
+   @param DxeCoreEntryPoint         The entry point of DxeCore.\r
    @param HobList                   The start of HobList passed to DxeCore.\r
 \r
 **/\r
@@ -58,7 +58,7 @@ HandOffToDxeCore (
   PageTables = CreateIdentityMappingPageTables ();\r
 \r
   //\r
-  // End of PEI phase singal\r
+  // End of PEI phase signal\r
   //\r
   Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
   ASSERT_EFI_ERROR (Status);\r
index 35e92c641a1156460b7a0c4b67eea1feff9c9881..e58351c2ee278ec4c9271b40981f346093c06180 100644 (file)
@@ -29,11 +29,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "DxeIpl.h"\r
 #include "VirtualMemory.h"\r
 \r
-\r
-\r
-\r
-\r
-\r
 /**\r
   Allocates and fills in the Page Directory and Page Table Entries to\r
   establish a 1:1 Virtual to Physical mapping.\r
@@ -43,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                                                 table entries  to the physical \r
                                                 address space. \r
 \r
-  @return EFI_SUCCESS           The 1:1 Virtual to Physical identity mapping was created\r
+  @return The address of 4 level page map.\r
 \r
 **/\r
 UINTN\r
@@ -73,7 +68,7 @@ CreateIdentityMappingPageTables (
   \r
   Hob = GetFirstHob (EFI_HOB_TYPE_CPU);\r
   if (Hob != NULL) {\r
-    PhysicalAddressBits = ((EFI_HOB_CPU *) Hob)->SizeOfMemorySpace;    \r
+    PhysicalAddressBits = ((EFI_HOB_CPU *) Hob)->SizeOfMemorySpace;\r
   }\r
 \r
   //\r
index be9a7391b61516f33b123b964cf519b8324d749a..83d0e9bddb5fd1cedf60a0e5150fa788b231f233 100644 (file)
@@ -2,9 +2,9 @@
   x64 Long Mode Virtual Memory Management Definitions  \r
 \r
   References:\r
-    1) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 1:Basic Architecture, Intel\r
-    2) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel\r
-    3) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel\r
+    1) IA-32 Intel(R) Architecture Software Developer's Manual Volume 1:Basic Architecture, Intel\r
+    2) IA-32 Intel(R) Architecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel\r
+    3) IA-32 Intel(R) Architecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel\r
     4) AMD64 Architecture Programmer's Manual Volume 2: System Programming\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
@@ -100,7 +100,6 @@ typedef union {
 #pragma pack()\r
 \r
 \r
-\r
 /**\r
   Allocates and fills in the Page Directory and Page Table Entries to\r
   establish a 1:1 Virtual to Physical mapping.\r
@@ -110,7 +109,7 @@ typedef union {
                                                 table entries  to the physical \r
                                                 address space. \r
 \r
-  @return EFI_SUCCESS           The 1:1 Virtual to Physical identity mapping was created\r
+  @return The address of 4 level page map.\r
 \r
 **/\r
 UINTN\r
@@ -119,15 +118,11 @@ CreateIdentityMappingPageTables (
   );\r
 \r
 \r
-\r
-\r
-\r
 /**\r
  \r
   Fix up the vector number in the vector code.\r
  \r
   @param VectorBase   Base address of the vector handler.\r
\r
   @param VectorNum    Index of vector.\r
 \r
 **/\r
@@ -139,9 +134,6 @@ AsmVectorFixup (
   );\r
 \r
 \r
-\r
-\r
-\r
 /**\r
  \r
   Get the information of vector template.\r
index 91f627dd4ecf2832d4f7ac7b406fc5e963340814..e6e3a11b168ff203e747ba02329a5400cc156893 100644 (file)
@@ -474,6 +474,7 @@ PeiDispatcher (
               // But if new stack is smaller than the size of old stack, we also reserve\r
               // the size of old stack at bottom of permenent memory.\r
               //\r
+              DEBUG ((EFI_D_ERROR, "Old Stack Size%d, New stack size%d\n", (INT32) Private->StackSize, (INT32) OldPeiStackSize));\r
               ASSERT (Private->StackSize >= OldPeiStackSize);\r
               StackGap = Private->StackSize - OldPeiStackSize;\r
 \r
index aef2d65e81ab17b71234cd84bbf7e5686f385d28..e2f3bc591f0069aa49270661394f945a1c279b4c 100644 (file)
@@ -1,12 +1,13 @@
 /** @file\r
-  CalculateCrc32 Boot Services as defined in DXE CIS.\r
+  This file implements CalculateCrc32 Boot Services as defined in\r
+  Platform Initialization specification 1.0 VOLUME 2 DXE Core Interface.\r
 \r
   This Boot Services is in the Runtime Driver because this service is\r
   also required by SetVirtualAddressMap() when the EFI System Table and\r
   EFI Runtime Services Table are converted from physical address to\r
-  virtual addresses.   This requires that the 32-bit CRC be recomputed.\r
+  virtual addresses.  This requires that the 32-bit CRC be recomputed.\r
 \r
-Copyright (c) 2006, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2008, 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
@@ -61,8 +62,7 @@ RuntimeDriverCalculateCrc32 (
 \r
 \r
 /**\r
-  Reverse bits for 32bit data.\r
-  This is a internal function.\r
+  This internal function reverses bits for 32bit data.\r
 \r
   @param  Value                 The data to be reversed.\r
 \r
@@ -89,6 +89,7 @@ ReverseBits (
 \r
 /**\r
   Initialize CRC32 table.\r
+\r
 **/\r
 VOID\r
 RuntimeDriverInitializeCrc32Table (\r
index 8fdc6fad9dd5c5163c21f9b8976051ecaa194c2c..66c02b2f5b79716930b4e3ca12f2b9763824b18b 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-  Runtime Architectural Protocol as defined in the DXE CIS.\r
+  This file implements Runtime Architectural Protocol as defined in the\r
+  Platform Initialization specification 1.0 VOLUME 2 DXE Core Interface.\r
 \r
   This code is used to produce the EFI runtime virtual switch over\r
 \r
@@ -14,7 +15,7 @@
   So here is the concept. The code in this module will never ever be called in\r
   virtual mode. This is the code that collects the information needed to convert\r
   to virtual mode (DXE core registers runtime stuff with this code). Since this\r
-  code is used to fixup all runtime images, it CAN NOT fix it's self up. So some\r
+  code is used to fix up all runtime images, it CAN NOT fix it's self up. So some\r
   code has to stay behind and that is us.\r
 \r
   Also you need to be careful about when you allocate memory, as once we are in\r
@@ -34,7 +35,7 @@ Revision History:
   Table now contains an item named CalculateCrc32.\r
 \r
 \r
-Copyright (c) 2006, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2008, 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
@@ -86,7 +87,7 @@ EFI_RUNTIME_ARCH_PROTOCOL     mRuntime = {
 //\r
 /**\r
 \r
-  Calcualte the 32-bit CRC in a EFI table using the Runtime Drivers\r
+  Calculate the 32-bit CRC in a EFI table using the Runtime Drivers\r
   internal function.  The EFI Boot Services Table can not be used because\r
   the EFI Boot Services Table was destroyed at ExitBootServices().\r
   This is a internal function.\r
@@ -158,10 +159,10 @@ RuntimeDriverConvertPointer (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  VirtEntry             = mVirtualMap;\r
+  VirtEntry = mVirtualMap;\r
   for (Index = 0; Index < mVirtualMapMaxIndex; Index++) {\r
     //\r
-    // To prevent the inclusion of 64-bit math functions a UINTN was placed in\r
+    //  To prevent the inclusion of 64-bit math functions a UINTN was placed in\r
     //  front of VirtEntry->NumberOfPages to cast it to a 32-bit thing on IA-32\r
     //  platforms. If you get this ASSERT remove the UINTN and do a 64-bit\r
     //  multiply.\r
@@ -315,7 +316,7 @@ RuntimeDriverSetVirtualAddressMap (
         RuntimeImage->RelocationData\r
         );\r
 \r
-      InvalidateInstructionCacheRange (RuntimeImage->ImageBase, (UINTN)RuntimeImage->ImageSize);\r
+      InvalidateInstructionCacheRange (RuntimeImage->ImageBase, (UINTN) RuntimeImage->ImageSize);\r
     }\r
   }\r
 \r
@@ -362,17 +363,16 @@ RuntimeDriverSetVirtualAddressMap (
 }\r
 \r
 /**\r
-  Install Runtime AP. This code includes the EfiDriverLib, but it functions at\r
-  RT in physical mode. The only Lib services are gBS, gRT, and the DEBUG and\r
-  ASSERT macros (they do ReportStatusCode).\r
+  Entry Point for Runtime driver.\r
 \r
+  This function installs Runtime Architectural Protocol and registers CalculateCrc32 boot services table,\r
+  SetVirtualAddressMap & ConvertPointer runtime services table.\r
 \r
   @param ImageHandle     Image handle of this driver.\r
-  @param SystemTable     Pointer to the EFI System Table.\r
+  @param SystemTable     Pointer to the EFI System Table.\r
 \r
-  @retval  EFI_SUCEESS  Runtime Driver Architectural Protocol Installed\r
-  @return  Other value if gBS->InstallMultipleProtocolInterfaces fails. Check\r
-           gBS->InstallMultipleProtocolInterfaces for details.\r
+  @retval  EFI_SUCEESS  Runtime Driver Architectural Protocol is successfully installed\r
+  @return  Others       Some error occurs when installing Runtime Driver Architectural Protocol.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -386,7 +386,7 @@ RuntimeDriverInitialize (
   EFI_LOADED_IMAGE_PROTOCOL *MyLoadedImage;\r
 \r
   //\r
-  // This image needs to be exclued from relocation for virtual mode, so cache\r
+  // This image needs to be excluded from relocation for virtual mode, so cache\r
   // a copy of the Loaded Image protocol to test later.\r
   //\r
   Status = gBS->HandleProtocol (\r
@@ -420,5 +420,5 @@ RuntimeDriverInitialize (
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  return EFI_SUCCESS;\r
+  return Status;\r
 }\r
index 717dbe0e09bd40f17e3507ee357a32a4746cf5da..89cbd0e693570062e4732f07dbb9d098bac53652 100644 (file)
@@ -1,6 +1,9 @@
 #/** @file\r
+#  Module that produces EFI runtime virtual switch over services.\r
 #\r
-#  This module is used to produce the EFI runtime virtual switch over services.\r
+#  This runtime module installs Runtime Architectural Protocol and registers\r
+#  CalculateCrc32 boot services table, SetVirtualAddressMap & ConvertPointer\r
+#  runtime services table.\r
 #\r
 #  Copyright (c) 2006 - 2008, Intel Corporation\r
 #\r
index 6c3edff8423f969541b0708c377868cd6aa804c9..a23d947b9bc5464b7094c3cfc098eaa21dfea257 100644 (file)
@@ -1,5 +1,5 @@
 #/** @file\r
-#  FvbService Library for UEFI drivers\r
+#  FvbService Library for DXE phase drivers\r
 #\r
 #  This library instance provide sevice functions to access Firmware Volume Block protocol.\r
 #\r
   FILE_GUID                      = bd4d540e-04b0-4b10-8fd5-4a7bb533cf67\r
   MODULE_TYPE                    = DXE_RUNTIME_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = FvbServiceLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER\r
+  LIBRARY_CLASS                  = FvbServiceLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
   CONSTRUCTOR                    = FvbLibInitialize\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
+#  VALID_ARCHITECTURES           = IA32 X64 EBC\r
 #\r
 #  VIRTUAL_ADDRESS_MAP_CALLBACK  =  FvbVirtualAddressChangeNotifyEvent\r
 #\r
index 6080b1c0c61bb419f52eeecfa7489d38d1b8be1e..f1fe99d932b4df5b772658b3797877eef5828e61 100644 (file)
@@ -1,12 +1,11 @@
 /**@file\r
-\r
   Firmware Volume Block Protocol Runtime Interface Abstraction\r
   And FVB Extension protocol Runtime Interface Abstraction\r
 \r
   mFvbEntry is an array of Handle Fvb pairs. The Fvb Lib Instance matches the\r
   index in the mFvbEntry array. This should be the same sequence as the FVB's\r
   were described in the HOB. We have to remember the handle so we can tell if\r
-  the protocol has been reinstalled and it needs updateing.\r
+  the protocol has been reinstalled and it needs updating.\r
 \r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation\r
@@ -267,11 +266,11 @@ FvbVirtualAddressChangeNotifyEvent (
 /**\r
   Library constructor function entry.\r
 \r
-  @param ImageHandle    The handle of image who call this libary.\r
+  @param ImageHandle    The handle of image who call this library.\r
   @param SystemTable    The point of System Table.\r
 \r
-  @retval EFI_SUCESS    Sucess construct this library.\r
-  @retval Others        Fail to contruct this libary.\r
+  @retval EFI_SUCESS    Success construct this library.\r
+  @retval Others        Fail to construct this library.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -413,9 +412,9 @@ EfiFvbReadBlock (
   \r
   If NumBytes is NULL, then ASSERT().\r
 \r
-  @param Instance               The FV instance to be written to\r
-  @param Lba                    The starting logical block index to write to\r
-  @param Offset                 The offset relative to the block, at which to begin writting.\r
+  @param Instance               The FV instance to be written to.\r
+  @param Lba                    The starting logical block index to write.\r
+  @param Offset                 The offset relative to the block to write.\r
   @param NumBytes               Pointer to a UINTN. On input, *NumBytes contains\r
                                 the total size of the buffer. On output, it contains\r
                                 the actual number of bytes written.\r
index 660b595de5e4207ac5781a2605964161e87d953a..ca39b03658c3c136f7f1a752d0ecd166c51643a9 100644 (file)
@@ -46,8 +46,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_GUID mEfiDevicePathMessagingSASGuid
 /**\r
   The user Entry Point for DevicePath module.\r
 \r
-  This is the entrhy point for DevicePath module. It installs the UEFI Device Path Utility Protocol and\r
-  optionall the Device Path to Text and Device Path from Text protocols based on feature flags.\r
+  This is the entry point for DevicePath module. It installs the UEFI Device Path Utility Protocol and\r
+  optionally the Device Path to Text and Device Path from Text protocols based on feature flags.\r
 \r
   @param[in] ImageHandle    The firmware allocated handle for the EFI image.\r
   @param[in] SystemTable    A pointer to the EFI System Table.\r
index b1f398ddad4a29780d8c7b743c67dd037c3f8b35..7baa48bca72d80b445185bf93b7a75870a4d4b58 100644 (file)
@@ -31,14 +31,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/DevicePathLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
-extern const EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid;\r
-extern const EFI_GUID mEfiDevicePathMessagingSASGuid;\r
 \r
 #define MAX_CHAR                   480\r
 \r
-#define MIN_ALIGNMENT_SIZE         sizeof(UINTN)\r
-#define ALIGN_SIZE(a)              ((a % MIN_ALIGNMENT_SIZE) ? MIN_ALIGNMENT_SIZE - (a % MIN_ALIGNMENT_SIZE) : 0)\r
-\r
 #define IS_COMMA(a)                ((a) == L',')\r
 #define IS_HYPHEN(a)               ((a) == L'-')\r
 #define IS_DOT(a)                  ((a) == L'.')\r
@@ -47,11 +42,8 @@ extern const EFI_GUID mEfiDevicePathMessagingSASGuid;
 #define IS_SLASH(a)                ((a) == L'/')\r
 #define IS_NULL(a)                 ((a) == L'\0')\r
 \r
-#define DEVICE_NODE_END            1\r
-#define DEVICE_PATH_INSTANCE_END   2\r
-#define DEVICE_PATH_END            3\r
 \r
-#define SET_DEVICE_PATH_INSTANCE_END_NODE(a) {                \\r
+#define SET_DEVICE_PATH_INSTANCE_END_NODE(a) {           \\r
     (a)->Type       = END_DEVICE_PATH_TYPE;              \\r
     (a)->SubType    = END_INSTANCE_DEVICE_PATH_SUBTYPE;  \\r
     (a)->Length[0]  = sizeof (EFI_DEVICE_PATH_PROTOCOL); \\r
index 42ca228a98060942c482f56f902a7fbcf13c366e..4ccbb7b82ca86a7bbd2cbb86b3b20d3246cda563 100644 (file)
@@ -1,9 +1,10 @@
 #/** @file\r
+#  Device path driver that produces three UEFI device path protocols.\r
 #\r
-#    Component description file for Device Path Driver.\r
-#\r
-#   This driver implement these three UEFI deveice path protocols (\r
-#    DevicePathUtilities, DevicePahtToText and DevicePathFromText) and install them.\r
+#  This driver produces Device Path Utilities protocol and optionally\r
+#  DevicePahtToText and DevicePathFromText protocols based on feature flags\r
+#  PcdDevicePathSupportDevicePathToText & PcdDevicePathSupportDevicePathFromText\r
+#  respectively.\r
 #\r
 #  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
@@ -57,7 +58,9 @@
   gEfiVT100Guid                                 # ALWAYS_CONSUMED\r
   gEfiVT100PlusGuid                             # ALWAYS_CONSUMED\r
   gEfiPcAnsiGuid                                # ALWAYS_CONSUMED\r
-\r
+  gEfiUartDevicePathGuid                        # ALWAYS_CONSUMED\r
+  gEfiSasDevicePathGuid                         # ALWAYS_CONSUMED\r
+  \r
 [Protocols]\r
   gEfiDevicePathToTextProtocolGuid              # PROTOCOL ALWAYS_PRODUCED\r
   gEfiDevicePathFromTextProtocolGuid            # PROTOCOL ALWAYS_PRODUCED\r
@@ -70,4 +73,3 @@
 \r
 [Depex]\r
   TRUE\r
-\r
index dbd371ce705c8160fb52d51c4765d38f5b4bd54a..e0f1fcea489c877c73dc39408b1a136573f25f9e 100644 (file)
@@ -1504,7 +1504,7 @@ DevPathFromTextUartFlowCtrl (
                                                         sizeof (UART_FLOW_CONTROL_DEVICE_PATH)\r
                                                         );\r
 \r
-  CopyGuid (&UartFlowControl->Guid, &mEfiDevicePathMessagingUartFlowControlGuid);\r
+  CopyGuid (&UartFlowControl->Guid, &gEfiUartDevicePathGuid);\r
   if (StrCmp (ValueStr, L"XonXoff") == 0) {\r
     UartFlowControl->FlowControlMap = 2;\r
   } else if (StrCmp (ValueStr, L"Hardware") == 0) {\r
@@ -1555,7 +1555,7 @@ DevPathFromTextSAS (
                                        sizeof (SAS_DEVICE_PATH)\r
                                        );\r
 \r
-  CopyGuid (&Sas->Guid, &mEfiDevicePathMessagingSASGuid);\r
+  CopyGuid (&Sas->Guid, &gEfiSasDevicePathGuid);\r
   Strtoi64 (AddressStr, &Sas->SasAddress);\r
   Strtoi64 (LunStr, &Sas->Lun);\r
   Sas->RelativeTargetPort = (UINT16) Strtoi (RTPStr);\r
index 5de21b1f9d9b954bf2eebac25c0d986d88fcbfe7..2e4a976adc397aa93a05dd55bb965b7d92306383 100644 (file)
@@ -55,10 +55,10 @@ CatPrint (
     Size = StrSize (AppendStr) - sizeof (UINT16);\r
     Size = Size + StrSize (Str->Str);\r
     Str->Str = ReallocatePool (\r
-                StrSize (Str->Str),\r
-                Size,\r
-                Str->Str\r
-                );\r
+                 StrSize (Str->Str),\r
+                 Size,\r
+                 Str->Str\r
+                 );\r
     ASSERT (Str->Str != NULL);\r
   }\r
 \r
@@ -73,9 +73,9 @@ CatPrint (
 }\r
 \r
 /**\r
-  Converts a PCI device path structure to its string representive.\r
+  Converts a PCI device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -100,9 +100,9 @@ DevPathToTextPci (
 }\r
 \r
 /**\r
-  Converts a PC Card device path structure to its string representive.\r
+  Converts a PC Card device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -127,9 +127,9 @@ DevPathToTextPccard (
 }\r
 \r
 /**\r
-  Converts a Memory Map device path structure to its string representive.\r
+  Converts a Memory Map device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -160,9 +160,9 @@ DevPathToTextMemMap (
 }\r
 \r
 /**\r
-  Converts a Vendor device path structure to its string representive.\r
+  Converts a Vendor device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -208,7 +208,7 @@ DevPathToTextVendor (
       } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {\r
         CatPrint (Str, L"VenUft8()");\r
         return ;\r
-      } else if (CompareGuid (&Vendor->Guid, &mEfiDevicePathMessagingUartFlowControlGuid)) {\r
+      } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) {\r
         FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap);\r
         switch (FlowControlMap & 0x00000003) {\r
         case 0:\r
@@ -228,7 +228,7 @@ DevPathToTextVendor (
         }\r
 \r
         return ;\r
-      } else if (CompareGuid (&Vendor->Guid, &mEfiDevicePathMessagingSASGuid)) {\r
+      } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) {\r
         CatPrint (\r
           Str,\r
           L"SAS(0x%lx,0x%lx,0x%x,",\r
@@ -287,9 +287,9 @@ DevPathToTextVendor (
 }\r
 \r
 /**\r
-  Converts a Controller device path structure to its string representive.\r
+  Converts a Controller device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -318,9 +318,9 @@ DevPathToTextController (
 }\r
 \r
 /**\r
-  Converts a ACPI device path structure to its string representive.\r
+  Converts a ACPI device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -404,9 +404,9 @@ EisaIdToText (
 }\r
 \r
 /**\r
-  Converts a ACPI extended HID device path structure to its string representive.\r
+  Converts a ACPI extended HID device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -488,9 +488,9 @@ DevPathToTextAcpiEx (
 }\r
 \r
 /**\r
-  Converts a ACPI address device path structure to its string representive.\r
+  Converts a ACPI address device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -525,9 +525,9 @@ DevPathToTextAcpiAdr (
 }\r
 \r
 /**\r
-  Converts a ATAPI device path structure to its string representive.\r
+  Converts a ATAPI device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -563,9 +563,9 @@ DevPathToTextAtapi (
 }\r
 \r
 /**\r
-  Converts a SCSI device path structure to its string representive.\r
+  Converts a SCSI device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -590,9 +590,9 @@ DevPathToTextScsi (
 }\r
 \r
 /**\r
-  Converts a Fibre device path structure to its string representive.\r
+  Converts a Fibre device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -617,9 +617,9 @@ DevPathToTextFibre (
 }\r
 \r
 /**\r
-  Converts a 1394 device path structure to its string representive.\r
+  Converts a 1394 device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -647,9 +647,9 @@ DevPathToText1394 (
 }\r
 \r
 /**\r
-  Converts a USB device path structure to its string representive.\r
+  Converts a USB device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -674,9 +674,9 @@ DevPathToTextUsb (
 }\r
 \r
 /**\r
-  Converts a USB WWID device path structure to its string representive.\r
+  Converts a USB WWID device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -723,9 +723,9 @@ DevPathToTextUsbWWID (
 }\r
 \r
 /**\r
-  Converts a Logic Unit device path structure to its string representive.\r
+  Converts a Logic Unit device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -750,9 +750,9 @@ DevPathToTextLogicalUnit (
 }\r
 \r
 /**\r
-  Converts a USB class device path structure to its string representive.\r
+  Converts a USB class device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -886,9 +886,9 @@ DevPathToTextUsbClass (
 }\r
 \r
 /**\r
-  Converts a SATA device path structure to its string representive.\r
+  Converts a SATA device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -919,9 +919,9 @@ DevPathToTextSata (
 }\r
 \r
 /**\r
-  Converts a I20 device path structure to its string representive.\r
+  Converts a I20 device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -946,9 +946,9 @@ DevPathToTextI2O (
 }\r
 \r
 /**\r
-  Converts a MAC address device path structure to its string representive.\r
+  Converts a MAC address device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -987,9 +987,9 @@ DevPathToTextMacAddr (
 }\r
 \r
 /**\r
-  Converts a IPv4 device path structure to its string representive.\r
+  Converts a IPv4 device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1039,9 +1039,9 @@ DevPathToTextIPv4 (
 }\r
 \r
 /**\r
-  Converts a IPv6 device path structure to its string representive.\r
+  Converts a IPv6 device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1127,9 +1127,9 @@ DevPathToTextIPv6 (
 }\r
 \r
 /**\r
-  Converts an Infini Band device path structure to its string representive.\r
+  Converts an Infini Band device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1162,9 +1162,9 @@ DevPathToTextInfiniBand (
 }\r
 \r
 /**\r
-  Converts a UART device path structure to its string representive.\r
+  Converts a UART device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1254,9 +1254,9 @@ DevPathToTextUart (
 }\r
 \r
 /**\r
-  Converts an iSCSI device path structure to its string representive.\r
+  Converts an iSCSI device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1302,9 +1302,9 @@ DevPathToTextiSCSI (
 }\r
 \r
 /**\r
-  Converts a Hard drive device path structure to its string representive.\r
+  Converts a Hard drive device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1360,9 +1360,9 @@ DevPathToTextHardDrive (
 }\r
 \r
 /**\r
-  Converts a CDROM device path structure to its string representive.\r
+  Converts a CDROM device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1392,9 +1392,9 @@ DevPathToTextCDROM (
 }\r
 \r
 /**\r
-  Converts a File device path structure to its string representive.\r
+  Converts a File device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1419,9 +1419,9 @@ DevPathToTextFilePath (
 }\r
 \r
 /**\r
-  Converts a Media protocol device path structure to its string representive.\r
+  Converts a Media protocol device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1446,9 +1446,9 @@ DevPathToTextMediaProtocol (
 }\r
 \r
 /**\r
-  Converts a Firmware Volume device path structure to its string representive.\r
+  Converts a Firmware Volume device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1473,9 +1473,9 @@ DevPathToTextFv (
 }\r
 \r
 /**\r
-  Converts a Firmware Volume File device path structure to its string representive.\r
+  Converts a Firmware Volume File device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1500,9 +1500,9 @@ DevPathToTextFvFile (
 }\r
 \r
 /**\r
-  Converts a BIOS Boot Specification device path structure to its string representive.\r
+  Converts a BIOS Boot Specification device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1569,9 +1569,9 @@ DevPathToTextBBS (
 }\r
 \r
 /**\r
-  Converts an End-of-Device-Path structure to its string representive.\r
+  Converts an End-of-Device-Path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
@@ -1593,9 +1593,9 @@ DevPathToTextEndInstance (
 }\r
 \r
 /**\r
-  Converts an unknown device path structure to its string representive.\r
+  Converts an unknown device path structure to its string representative.\r
 \r
-  @param Str             The string representive of input device.\r
+  @param Str             The string representative of input device.\r
   @param DevPath         The input device path structure.\r
   @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
                          of the display node is used, where applicable. If DisplayOnly\r
index ec1d68f6312a62a4e7fea5918e3d5ba6506b276b..b0d92c78b2d26a16e640dbf91724e19e46c0a72b 100644 (file)
@@ -231,7 +231,6 @@ DiskIoDriverBindingStop (
                   &Private->DiskIo\r
                   );\r
   if (!EFI_ERROR (Status)) {\r
-\r
     Status = gBS->CloseProtocol (\r
                     ControllerHandle,\r
                     &gEfiBlockIoProtocolGuid,\r
index 4bc6d2860324f5b902b9b8bb8181267496b5dbf4..7d4533a2a7fffabb52c63468b5a9dc444a81cd54 100644 (file)
@@ -29,9 +29,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiBootServicesTableLib.h>\r
 \r
 \r
-#define DISK_IO_PRIVATE_DATA_SIGNATURE  SIGNATURE_32 ('d', 's', 'k', 'I')\r
+#define DATA_BUFFER_BLOCK_NUM             64\r
 \r
-#define DATA_BUFFER_BLOCK_NUM           (64)\r
+#define DISK_IO_PRIVATE_DATA_SIGNATURE  SIGNATURE_32 ('d', 's', 'k', 'I')\r
 \r
 typedef struct {\r
   UINTN                 Signature;\r
index c27650e88646310c131d36bb7381d75c1720f984..757b4030df1bc5e6929212f9e1abc3b03514b4f8 100644 (file)
@@ -1,7 +1,12 @@
 #/** @file\r
-#  \r
-#  This module lays DiskIo protocol on every blockIo protocol\r
-#  to provide byte-oriented access to block media. \r
+#  Module that lays Disk I/O protocol on every Block I/O protocol.\r
+#\r
+#  This module produces Disk I/O protocol to abstract the block accesses\r
+#  of the Block I/O protocol to a more general offset-length protocol\r
+#  to provide byte-oriented access to block media. It adds this protocol\r
+#  to any Block I/O interface that appears in the system that does not\r
+#  already have a Disk I/O protocol. File systems and other disk access\r
+#  code utilize the Disk I/O protocol.\r
 #  \r
 #  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
index 21d1163ab7819c3238b8be0b62a1aba41bcced42..5d544e8b775d5cae7c4053b3577eba5094ce9bfd 100644 (file)
@@ -6,7 +6,7 @@
         code that is not run on an EFI system. The legacy code reads the \r
         first sector of the active partition into memory and \r
 \r
-  BPB - Boot(?) Parameter Block is in the first sector of a FAT file system. \r
+  BPB - BIOS Parameter Block is in the first sector of a FAT file system. \r
         The BPB contains information about the FAT file system. The BPB is \r
         always on the first sector of a media. The first sector also contains\r
         the legacy boot strap code.\r
@@ -212,7 +212,7 @@ PartitionInstallMbrChildHandles (
       HdDev.PartitionNumber = PartitionNumber ++;\r
       HdDev.PartitionStart  = UNPACK_UINT32 (Mbr->Partition[Index].StartingLBA);\r
       HdDev.PartitionSize   = UNPACK_UINT32 (Mbr->Partition[Index].SizeInLBA);\r
-      CopyMem (HdDev.Signature, &(Mbr->UniqueMbrSignature[0]), sizeof (UINT32));\r
+      CopyMem (HdDev.Signature, &(Mbr->UniqueMbrSignature[0]), sizeof (Mbr->UniqueMbrSignature));\r
 \r
       Status = PartitionInstallChildHandle (\r
                 This,\r
index 15061bec30368ac916d4720ac4adbb8816777de9..5d06444784181ef0c8e7c2638a4590d5707c5b61 100644 (file)
@@ -31,7 +31,7 @@ EFI_DRIVER_BINDING_PROTOCOL gPartitionDriverBinding = {
 };\r
 \r
 //\r
-// Priortized function list to detect partition table. \r
+// Prioritized function list to detect partition table. \r
 //\r
 PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] = {\r
   PartitionInstallGptChildHandles,\r
@@ -278,7 +278,7 @@ PartitionDriverBindingStart (
 \r
 \r
 /**\r
-  Stop this driver on ControllerHandle. Support stoping any child handles\r
+  Stop this driver on ControllerHandle. Support stopping any child handles\r
   created by this driver.\r
 \r
   @param  This              Protocol instance pointer.\r
index a9bbcc6586ec7e1a95c7ef0a3a15f56f9bb72ebe..d0d0d52a25965d12bebeefa8ae9dfaf0dbab47cf 100644 (file)
@@ -143,7 +143,7 @@ PartitionDriverBindingStart (
   );\r
 \r
 /**\r
-  Stop this driver on ControllerHandle. Support stoping any child handles\r
+  Stop this driver on ControllerHandle. Support stopping any child handles\r
   created by this driver.\r
 \r
   @param  This              Protocol instance pointer.\r
index d187a91185495537bde610cbca2cbee10700f0c2..b7fa67b5eae5d2f91135516ee5fb002190e1e681 100644 (file)
@@ -1,11 +1,11 @@
 #/** @file\r
-#  \r
-#    Component description file for Partition module.\r
-#  \r
-#   Partition driver produces the logical BlockIo device\r
-#    that represents the bytes Start to End of the Parent Block IO\r
-#    device (one partition of physical BlockIo device,\r
-#    which can be one of GPT, MBR, ElTorito partition).\r
+#  Modules that produces the logic Block I/O protocol for every partition\r
+#  it discovers via the physical Block I/O.\r
+#\r
+#  This module produces the logical Block I/O device that represents\r
+#  the bytes from Start to End of the Parent Block I/O device.\r
+#  The partition of physical BlockIo device supported is one of legacy MBR, GPT,\r
+#  and "El Torito" partitions.\r
 #  \r
 #  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
@@ -31,9 +31,9 @@
 #\r
 #  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
 #\r
-#  DRIVER_BINDING                =  gPartitionDriverBinding\r
-#  COMPONENT_NAME                =  gPartitionComponentName\r
-#  COMPONENT_NAME2               =  gPartitionComponentName2\r
+#  DRIVER_BINDING                = gPartitionDriverBinding\r
+#  COMPONENT_NAME                = gPartitionComponentName\r
+#  COMPONENT_NAME2               = gPartitionComponentName2\r
 #\r
 \r
 [Sources.common]\r
@@ -68,7 +68,7 @@
 [Protocols]\r
   gEfiBlockIoProtocolGuid                       # PROTOCOL BY_START\r
   gEfiDevicePathProtocolGuid                    # PROTOCOL BY_START\r
+  gEfiDiskIoProtocolGuid                        # PROTOCOL BY_START\r
+  gEfiBlockIoProtocolGuid                       # PROTOCOL TO_START\r
   gEfiDevicePathProtocolGuid                    # PROTOCOL TO_START\r
   gEfiDiskIoProtocolGuid                        # PROTOCOL TO_START\r
-  gEfiBlockIoProtocolGuid                       # PROTOCOL TO_START\r
-\r
index 66eb083f9c10ce1907340cec511aaf86535a4453..5592c5c5741174b56992b16f7edd2c229d6dcd8d 100644 (file)
@@ -1,8 +1,11 @@
 #/** @file\r
+#  English module that provides Unicode Collation supports.\r
 #  \r
-#    Component description file for English module for unicode collation.\r
-#  \r
-#   This driver installs UEFI EFI_UNICODE_COLLATION_PROTOCOL protocol to provide Unicode strings function.\r
+#  This driver installs Unicode ISO 639-2 Collation and\r
+#  RFC 4646 Unicode Collation 2 protocols based on feature flags\r
+#  PcdUnicodeCollationSupport & PcdUnicodeCollation2Support respectively.\r
+#  It allows code running in the boot services environment to perform lexical\r
+#  comparison functions on Unicode strings for English languages.\r
 #  \r
 #  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
index e8c5bd953c9c3d1e9d4d22bea612322132d5415f..f5f87707d33bdc87710f2fdd283d959bd0bcc1dd 100644 (file)
@@ -15,9 +15,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "UnicodeCollationEng.h"\r
 \r
-CHAR8 mEngUpperMap[0x100];\r
-CHAR8 mEngLowerMap[0x100];\r
-CHAR8 mEngInfoMap[0x100];\r
+CHAR8 mEngUpperMap[MAP_TABLE_SIZE];\r
+CHAR8 mEngLowerMap[MAP_TABLE_SIZE];\r
+CHAR8 mEngInfoMap[MAP_TABLE_SIZE];\r
 \r
 CHAR8 mOtherChars[] = {\r
   '0',\r
@@ -106,7 +106,7 @@ InitializeUnicodeCollationEng (
   //\r
   // Initialize mapping tables for the supported languages\r
   //\r
-  for (Index = 0; Index < 0x100; Index++) {\r
+  for (Index = 0; Index < MAP_TABLE_SIZE; Index++) {\r
     mEngUpperMap[Index] = (CHAR8) Index;\r
     mEngLowerMap[Index] = (CHAR8) Index;\r
     mEngInfoMap[Index]  = 0;\r
@@ -453,9 +453,9 @@ EngStrToFat (
     if (*String != '.' && *String != ' ') {\r
       //\r
       // If this is a valid fat char, move it.\r
-      // Otherwise, move a '_' and flag the fact that the name needs an Lfn\r
+      // Otherwise, move a '_' and flag the fact that the name needs a long file name.\r
       //\r
-      if (*String < 0x100 && ((mEngInfoMap[*String] & CHAR_FAT_VALID) != 0)) {\r
+      if (*String < MAP_TABLE_SIZE && ((mEngInfoMap[*String] & CHAR_FAT_VALID) != 0)) {\r
         *Fat = mEngUpperMap[*String];\r
       } else {\r
         *Fat              = '_';\r
index 85dc5937894a43cb04cf9d3571880bddd57d3349..76695dd109f7700d850f02009558b94518a2d444 100644 (file)
@@ -19,7 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Uefi.h>\r
 \r
-\r
 #include <Protocol/UnicodeCollation.h>\r
 \r
 #include <Library/DebugLib.h>\r
@@ -28,12 +27,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PcdLib.h>\r
 \r
 //\r
-// Defines\r
+// Bit mask to indicate the validity of character in FAT file name.\r
 //\r
 #define CHAR_FAT_VALID  0x01\r
 \r
-#define TO_UPPER(a)      (CHAR16) (a <= 0xFF ? mEngUpperMap[a] : a)\r
-#define TO_LOWER(a)      (CHAR16) (a <= 0xFF ? mEngLowerMap[a] : a)\r
+//\r
+// Maximum FAT table size.\r
+//\r
+#define MAP_TABLE_SIZE  0x100\r
+\r
+//\r
+// Macro to map character a to upper case.\r
+//\r
+#define TO_UPPER(a)      (CHAR16) ((a) <= 0xFF ? mEngUpperMap[a] : (a))\r
+\r
+//\r
+// Macro to map character a to lower case.\r
+//\r
+#define TO_LOWER(a)      (CHAR16) ((a) <= 0xFF ? mEngLowerMap[a] : (a))\r
 \r
 //\r
 // Prototypes\r
index c230de918431bdcde98f890eaac7297c89df40ac..acb113832e486ca89e2f31ee6605862435e28788 100644 (file)
@@ -1,8 +1,10 @@
 #/** @file\r
+#  Module that produces EBC Interprete and EBC Debug Support protocols.\r
 #  \r
-#   This module for the EBC virtual machine implementation produces \r
-#   EBC and EBC debug support protocols.\r
-#  \r
+#  This module implements EFI Byte Code (EBC) Virtual Machine that can provide \r
+#  platformand processor-independent mechanisms for loading and executing EFI\r
+#  device drivers.\r
+#\r
 #  Copyright (c) 2006 - 2008, 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
index 334073c9540d45fcb7ce8d6926668d434e0fb2c3..a6d048663298ab775690cbfe3754ba70bf36e13d 100644 (file)
@@ -108,7 +108,7 @@ VmReadIndex64 (
   @param  VmPtr             A pointer to VM context.\r
   @param  Addr              The memory address.\r
 \r
-  @return The 8-bit value from the memory adress.\r
+  @return The 8-bit value from the memory address.\r
 \r
 **/\r
 UINT8\r
@@ -123,7 +123,7 @@ VmReadMem8 (
   @param  VmPtr             A pointer to VM context.\r
   @param  Addr              The memory address.\r
 \r
-  @return The 16-bit value from the memory adress.\r
+  @return The 16-bit value from the memory address.\r
 \r
 **/\r
 UINT16\r
@@ -138,7 +138,7 @@ VmReadMem16 (
   @param  VmPtr             A pointer to VM context.\r
   @param  Addr              The memory address.\r
 \r
-  @return The 32-bit value from the memory adress.\r
+  @return The 32-bit value from the memory address.\r
 \r
 **/\r
 UINT32\r
@@ -153,7 +153,7 @@ VmReadMem32 (
   @param  VmPtr             A pointer to VM context.\r
   @param  Addr              The memory address.\r
 \r
-  @return The 64-bit value from the memory adress.\r
+  @return The 64-bit value from the memory address.\r
 \r
 **/\r
 UINT64\r
@@ -193,7 +193,7 @@ VmReadMemN (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
@@ -223,7 +223,7 @@ VmWriteMem8 (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
@@ -253,7 +253,7 @@ VmWriteMem16 (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
@@ -268,7 +268,7 @@ VmWriteMem32 (
   );\r
 \r
 /**\r
-  Reads 16-bit unsinged data from the code stream.\r
+  Reads 16-bit unsigned data from the code stream.\r
 \r
   This routine provides the ability to read raw unsigned data from the code\r
   stream.\r
@@ -286,7 +286,7 @@ VmReadCode16 (
   );\r
 \r
 /**\r
-  Reads 32-bit unsinged data from the code stream.\r
+  Reads 32-bit unsigned data from the code stream.\r
 \r
   This routine provides the ability to read raw unsigned data from the code\r
   stream.\r
@@ -304,7 +304,7 @@ VmReadCode32 (
   );\r
 \r
 /**\r
-  Reads 64-bit unsinged data from the code stream.\r
+  Reads 64-bit unsigned data from the code stream.\r
 \r
   This routine provides the ability to read raw unsigned data from the code\r
   stream.\r
@@ -4599,7 +4599,7 @@ VmReadIndex64 (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
@@ -4637,7 +4637,7 @@ VmWriteMem8 (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
@@ -4700,7 +4700,7 @@ VmWriteMem16 (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
@@ -4763,7 +4763,7 @@ VmWriteMem32 (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
@@ -4828,7 +4828,7 @@ VmWriteMem64 (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
@@ -5019,7 +5019,7 @@ VmReadImmed64 (
 \r
 \r
 /**\r
-  Reads 16-bit unsinged data from the code stream.\r
+  Reads 16-bit unsigned data from the code stream.\r
 \r
   This routine provides the ability to read raw unsigned data from the code\r
   stream.\r
@@ -5059,7 +5059,7 @@ VmReadCode16 (
 \r
 \r
 /**\r
-  Reads 32-bit unsinged data from the code stream.\r
+  Reads 32-bit unsigned data from the code stream.\r
 \r
   This routine provides the ability to read raw unsigned data from the code\r
   stream.\r
@@ -5093,7 +5093,7 @@ VmReadCode32 (
 \r
 \r
 /**\r
-  Reads 64-bit unsinged data from the code stream.\r
+  Reads 64-bit unsigned data from the code stream.\r
 \r
   This routine provides the ability to read raw unsigned data from the code\r
   stream.\r
@@ -5139,7 +5139,7 @@ VmReadCode64 (
   @param  VmPtr             A pointer to VM context.\r
   @param  Addr              The memory address.\r
 \r
-  @return The 8-bit value from the memory adress.\r
+  @return The 8-bit value from the memory address.\r
 \r
 **/\r
 UINT8\r
@@ -5164,7 +5164,7 @@ VmReadMem8 (
   @param  VmPtr             A pointer to VM context.\r
   @param  Addr              The memory address.\r
 \r
-  @return The 16-bit value from the memory adress.\r
+  @return The 16-bit value from the memory address.\r
 \r
 **/\r
 UINT16\r
@@ -5195,7 +5195,7 @@ VmReadMem16 (
   @param  VmPtr             A pointer to VM context.\r
   @param  Addr              The memory address.\r
 \r
-  @return The 32-bit value from the memory adress.\r
+  @return The 32-bit value from the memory address.\r
 \r
 **/\r
 UINT32\r
@@ -5230,7 +5230,7 @@ VmReadMem32 (
   @param  VmPtr             A pointer to VM context.\r
   @param  Addr              The memory address.\r
 \r
-  @return The 64-bit value from the memory adress.\r
+  @return The 64-bit value from the memory address.\r
 \r
 **/\r
 UINT64\r
index 88bf9d5843a81575375cb31e5db519eacdba9594..5fc741d1050b6bc37857554c0a3c5c1d08feb11b 100644 (file)
@@ -270,7 +270,7 @@ GetVmVersion (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
@@ -300,7 +300,7 @@ VmWriteMemN (
   VM stack) to point into the EBC entry point arguments.\r
 \r
   @param  VmPtr             A pointer to a VM context.\r
-  @param  Addr              Adddress to write to.\r
+  @param  Addr              Address to write to.\r
   @param  Data              Value to write to Addr.\r
 \r
   @retval EFI_SUCCESS       The instruction is executed successfully.\r
index 66339d1a85e8df385b543eb3169640336857b5ff..8512d6743d7d03e31f7238a46d2b96dc22f80ee4 100644 (file)
@@ -36,7 +36,7 @@ typedef UINT32  EXCEPTION_FLAGS;
 typedef struct {\r
   VM_REGISTER       R[8];                   // General purpose registers.\r
   UINT64            Flags;                  // Flags register:\r
-                                            //   0   Set to 1 if the result of the last compare was true\r
+                                            //   0  Set to 1 if the result of the last compare was true\r
                                             //   1  Set to 1 if stepping\r
                                             //   2..63 Reserved.\r
   VMIP              Ip;                     // Instruction pointer.\r
@@ -106,7 +106,7 @@ EbcCreateThunks (
 \r
 /**\r
   Add a thunk to our list of thunks for a given image handle.\r
-  Also flush the instruction cache since we've written thunk code\r
+  Also flush the instruction cache since we have written thunk code\r
   to memory that will be executed eventually.\r
 \r
   @param  ImageHandle            The image handle to which the thunk is tied.\r
@@ -249,7 +249,7 @@ EbcLLGetReturnValue (
   );\r
 \r
 /**\r
-  Returns the stack index and buffer assosicated with the Handle parameter.\r
+  Returns the stack index and buffer associated with the Handle parameter.\r
 \r
   @param  Handle                The EFI handle as the index to the EBC stack.\r
   @param  StackBuffer           A pointer to hold the returned stack buffer.\r