]> git.proxmox.com Git - mirror_edk2.git/commitdiff
pdated code per coding standard. Changed comments, converted all \ to / and removed...
authorAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Jun 2007 00:32:26 +0000 (00:32 +0000)
committerAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Jun 2007 00:32:26 +0000 (00:32 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2736 6f19259b-4bc3-4df7-8a09-765794883524

18 files changed:
MdeModulePkg/Application/HelloWorld/CommonHeader.h [deleted file]
MdeModulePkg/Application/HelloWorld/HelloWorld.c
MdeModulePkg/Application/HelloWorld/HelloWorld.inf
MdeModulePkg/MdeModulePkg.dsc
MdeModulePkg/Universal/Disk/DiskIo/Dxe/ComponentName.c
MdeModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.h
MdeModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.inf
MdeModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c
MdeModulePkg/Universal/Disk/Partition/Dxe/ComponentName.c
MdeModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c
MdeModulePkg/Universal/Disk/Partition/Dxe/Gpt.c
MdeModulePkg/Universal/Disk/Partition/Dxe/Mbr.c
MdeModulePkg/Universal/Disk/Partition/Dxe/Partition.c
MdeModulePkg/Universal/Disk/Partition/Dxe/Partition.h
MdeModulePkg/Universal/Disk/Partition/Dxe/Partition.inf
MdeModulePkg/Universal/Security/SecurityStub/Dxe/SecurityStub.c
MdeModulePkg/Universal/Security/SecurityStub/Dxe/SecurityStub.h
MdeModulePkg/Universal/Security/SecurityStub/Dxe/SecurityStub.inf

diff --git a/MdeModulePkg/Application/HelloWorld/CommonHeader.h b/MdeModulePkg/Application/HelloWorld/CommonHeader.h
deleted file mode 100644 (file)
index d1e5656..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**@file\r
-  Common header file shared by all source files.\r
-\r
-  This file includes package header files, library classes and protocol, PPI & GUID definitions.\r
-\r
-  Copyright (c) 2007 - 2007, Intel Corporation.\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
-#ifndef __COMMON_HEADER_H_\r
-#define __COMMON_HEADER_H_\r
-\r
-\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <Uefi.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/UefiApplicationEntryPoint.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-\r
-#endif\r
index af552174eac051d60bdb8a3650e5f54c028c8209..4106753492a2bd91fe30b269e7a4fe78c08a3844 100644 (file)
 #include <Library/UefiApplicationEntryPoint.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 \r
+\r
+/**\r
+  The user Entry Point for Application. The user code starts with this function\r
+  as the real entry point for the image goes into a library that calls this \r
+  function.\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
+  \r
+  @retval EFI_SUCCESS       The entry point is executed successfully.\r
+  @retval other             Some error occurs when executing this entry point.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 UefiMain (\r
index b4990d34cd0006743aaa24382d98156098894e95..dbe69fced244bd595d11baad549c6d848bc6ef6d 100644 (file)
@@ -54,7 +54,7 @@
 ################################################################################\r
 \r
 [Includes]\r
-  $(WORKSPACE)/MdePkg\Include/Library\r
+  $(WORKSPACE)/MdePkg/Include/Library\r
 \r
 ################################################################################\r
 #\r
@@ -64,8 +64,8 @@
 ################################################################################\r
 \r
 [Packages]\r
-  $(WORKSPACE)\MdeModulePkg/MdeModulePkg.dec\r
-  $(WORKSPACE)\MdePkg/MdePkg.dec\r
+  $(WORKSPACE)/MdeModulePkg/MdeModulePkg.dec\r
+  $(WORKSPACE)/MdePkg/MdePkg.dec\r
 \r
 \r
 ################################################################################\r
index 360728d3e00de41f21c08c663cae591670de0592..c19db08c94ad2c801e9a671374c7cfe9f82c5365 100644 (file)
@@ -25,7 +25,7 @@
   PLATFORM_GUID                  = 587CE499-6CBE-43cd-94E2-186218569478\r
   PLATFORM_VERSION               = 0.1\r
   DSC_SPECIFICATION              = 0x00010005\r
-  OUTPUT_DIRECTORY               = $(WORKSPACE)\Build/MdeModule\r
+  OUTPUT_DIRECTORY               = $(WORKSPACE)/Build/MdeModule\r
   SUPPORTED_ARCHITECTURES        = IA32 IPF X64 EBC\r
   BUILD_TARGETS                  = DEBUG,RELEASE\r
   SKUID_IDENTIFIER               = DEFAULT\r
 ################################################################################\r
 \r
 [LibraryClasses.common]\r
-  CacheMaintenanceLib|${WORKSPACE}\MdePkg\Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf\r
-  DebugLib|${WORKSPACE}\MdePkg\Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
-  BaseLib|${WORKSPACE}\MdePkg\Library/BaseLib/BaseLib.inf\r
-  BaseMemoryLib|${WORKSPACE}\MdePkg\Library/BaseMemoryLib/BaseMemoryLib.inf\r
-  PciCf8Lib|${WORKSPACE}\MdePkg\Library/BasePciCf8Lib/BasePciCf8Lib.inf\r
-  PciExpressLib|${WORKSPACE}\MdePkg\Library/BasePciExpressLib/BasePciExpressLib.inf\r
-  PciLib|${WORKSPACE}\MdePkg\Library/BasePciLibCf8/BasePciLibCf8.inf\r
-  PeCoffGetEntryPoint|${WORKSPACE}\MdePkg\Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
-  PeCoffLib|${WORKSPACE}\MdePkg\Library/BasePeCoffLib/BasePeCoffLib.inf\r
-  PeformanceLib|${WORKSPACE}\MdePkg\Library/BasePerformanceLibNull/BasePerformanceLibNull.inf\r
-  PostCodeLib|${WORKSPACE}\MdePkg\Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf\r
-  PostCodeLib|${WORKSPACE}\MdePkg\Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf\r
-  PrintLib|${WORKSPACE}\MdePkg\Library/BasePrintLib/BasePrintLib.inf\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
-  UefiDecompressLib|${WORKSPACE}\MdePkg\Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf\r
+  CacheMaintenanceLib|${WORKSPACE}/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf\r
+  DebugLib|${WORKSPACE}/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
+  BaseLib|${WORKSPACE}/MdePkg/Library/BaseLib/BaseLib.inf\r
+  BaseMemoryLib|${WORKSPACE}/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf\r
+  PciCf8Lib|${WORKSPACE}/MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf\r
+  PciExpressLib|${WORKSPACE}/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf\r
+  PciLib|${WORKSPACE}/MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf\r
+  PeCoffGetEntryPoint|${WORKSPACE}/MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
+  PeCoffLib|${WORKSPACE}/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf\r
+  PeformanceLib|${WORKSPACE}/MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf\r
+  PostCodeLib|${WORKSPACE}/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf\r
+  PostCodeLib|${WORKSPACE}/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf\r
+  PrintLib|${WORKSPACE}/MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
+  UefiDecompressLib|${WORKSPACE}/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf\r
 \r
 [LibraryClasses.IA32]\r
-  IoLib|${WORKSPACE}\MdePkg\Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
-  BaseMemoryLib|${WORKSPACE}\MdePkg\Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf\r
+  IoLib|${WORKSPACE}/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
+  BaseMemoryLib|${WORKSPACE}/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf\r
 \r
 [LibraryClasses.X64]\r
-  IoLib|${WORKSPACE}\MdePkg\Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
-  BaseMemoryLib|${WORKSPACE}\MdePkg\Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf\r
+  IoLib|${WORKSPACE}/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
+  BaseMemoryLib|${WORKSPACE}/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf\r
 \r
 [LibraryClasses.IPF]\r
-  IoLib|${WORKSPACE}\MdePkg\Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
+  IoLib|${WORKSPACE}/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
 \r
 [LibraryClasses.EBC]\r
 \r
 \r
 [LibraryClasses.common.PEI_CORE]\r
-  PeiCoreEntryPoint|${WORKSPACE}\MdePkg\Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf\r
-  HobLib|${WORKSPACE}\MdePkg\Library/PeiHobLib/PeiHobLib.inf\r
-  MemoryAllocationLib|${WORKSPACE}\MdePkg\Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
-  PeimEntryPointLib|${WORKSPACE}\MdePkg\Library/PeimEntryPoint/PeimEntryPoint.inf\r
-  PcdLib|${WORKSPACE}\MdePkg\Library/PeiPcdLib/PeiPcdLib.inf\r
-  PeiServiceLib|${WORKSPACE}\MdePkg\Library/PeiServicesLib/PeiServicesLib.inf\r
-  PeiServicesTablePointerLib|${WORKSPACE}\MdePkg\Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
+  PeiCoreEntryPoint|${WORKSPACE}/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf\r
+  HobLib|${WORKSPACE}/MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
+  MemoryAllocationLib|${WORKSPACE}/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
+  PeimEntryPointLib|${WORKSPACE}/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf\r
+  PcdLib|${WORKSPACE}/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+  PeiServiceLib|${WORKSPACE}/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r
+  PeiServicesTablePointerLib|${WORKSPACE}/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
 \r
 [LibraryClasses.common.PEIM]\r
-  HobLib|${WORKSPACE}\MdePkg\Library/PeiHobLib/PeiHobLib.inf\r
-  MemoryAllocationLib|${WORKSPACE}\MdePkg\Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
-  PeimEntryPointLib|${WORKSPACE}\MdePkg\Library/PeimEntryPoint/PeimEntryPoint.inf\r
-  PcdLib|${WORKSPACE}\MdePkg\Library/PeiPcdLib/PeiPcdLib.inf\r
-  PeiServiceLib|${WORKSPACE}\MdePkg\Library/PeiServicesLib/PeiServicesLib.inf\r
-  PeiServicesTablePointerLib|${WORKSPACE}\MdePkg\Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
-  SmBusLib|${WORKSPACE}\MdePkg\Library/PeiSmbusLib/PeiSmbusLib.inf\r
+  HobLib|${WORKSPACE}/MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
+  MemoryAllocationLib|${WORKSPACE}/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
+  PeimEntryPointLib|${WORKSPACE}/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf\r
+  PcdLib|${WORKSPACE}/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+  PeiServiceLib|${WORKSPACE}/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r
+  PeiServicesTablePointerLib|${WORKSPACE}/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
+  SmBusLib|${WORKSPACE}/MdePkg/Library/PeiSmbusLib/PeiSmbusLib.inf\r
 \r
 [LibraryClasses.common.DXE_CORE]\r
-  HobLib|${WORKSPACE}\MdePkg\Library/DxeCoreHobLib/DxeCoreHobLib.inf\r
-  DxeCoreEntryPoint|${WORKSPACE}\MdePkg\Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf\r
-  MemoryAllocationLib|${WORKSPACE}\MdePkg\Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
-  UefiBootServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
-  DebugLib|${WORKSPACE}\MdePkg\Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
-  DevicePathLib|${WORKSPACE}\MdePkg\Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
-  UefiLib|${WORKSPACE}\MdePkg\Library/UefiLib/UefiLib.inf\r
+  HobLib|${WORKSPACE}/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf\r
+  DxeCoreEntryPoint|${WORKSPACE}/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf\r
+  MemoryAllocationLib|${WORKSPACE}/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
+  UefiBootServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
+  DebugLib|${WORKSPACE}/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+  DevicePathLib|${WORKSPACE}/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  UefiLib|${WORKSPACE}/MdePkg/Library/UefiLib/UefiLib.inf\r
 \r
 [LibraryClasses.common.DXE_DRIVER]\r
-  HobLib|${WORKSPACE}\MdePkg\Library/DxeHobLib/DxeHobLib.inf\r
-  MemoryAllocationLib|${WORKSPACE}\MdePkg\Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
-  PcdLib|${WORKSPACE}\MdePkg\Library/DxePcdLib/DxePcdLib.inf\r
-  DxeServiceTableLib|${WORKSPACE}\MdePkg\Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
-  SmbusLib|${WORKSPACE}\MdePkg\Library/DxeSmbusLib/DxeSmbusLib.inf\r
-  UefiBootServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
-  DebugLib|${WORKSPACE}\MdePkg\Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
-  DevicePathLib|${WORKSPACE}\MdePkg\Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
-  UefiDriverEntryPoint|${WORKSPACE}\MdePkg\Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
-  UefiLib|${WORKSPACE}\MdePkg\Library/UefiLib/UefiLib.inf\r
-  UefiRuntimeServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
+  HobLib|${WORKSPACE}/MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+  MemoryAllocationLib|${WORKSPACE}/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
+  PcdLib|${WORKSPACE}/MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  DxeServiceTableLib|${WORKSPACE}/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
+  SmbusLib|${WORKSPACE}/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf\r
+  UefiBootServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
+  DebugLib|${WORKSPACE}/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+  DevicePathLib|${WORKSPACE}/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  UefiDriverEntryPoint|${WORKSPACE}/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
+  UefiLib|${WORKSPACE}/MdePkg/Library/UefiLib/UefiLib.inf\r
+  UefiRuntimeServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
 \r
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]\r
-  HobLib|${WORKSPACE}\MdePkg\Library/DxeHobLib/DxeHobLib.inf\r
-  MemoryAllocationLib|${WORKSPACE}\MdePkg\Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
-  PcdLib|${WORKSPACE}\MdePkg\Library/DxePcdLib/DxePcdLib.inf\r
-  DxeServiceTableLib|${WORKSPACE}\MdePkg\Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
-  SmbusLib|${WORKSPACE}\MdePkg\Library/DxeSmbusLib/DxeSmbusLib.inf\r
-  UefiBootServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
-  DebugLib|${WORKSPACE}\MdePkg\Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
-  DevicePathLib|${WORKSPACE}\MdePkg\Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
-  UefiDriverEntryPoint|${WORKSPACE}\MdePkg\Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
-  UefiLib|${WORKSPACE}\MdePkg\Library/UefiLib/UefiLib.inf\r
-  UefiRuntimeServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
+  HobLib|${WORKSPACE}/MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+  MemoryAllocationLib|${WORKSPACE}/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
+  PcdLib|${WORKSPACE}/MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  DxeServiceTableLib|${WORKSPACE}/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
+  SmbusLib|${WORKSPACE}/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf\r
+  UefiBootServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
+  DebugLib|${WORKSPACE}/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+  DevicePathLib|${WORKSPACE}/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  UefiDriverEntryPoint|${WORKSPACE}/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
+  UefiLib|${WORKSPACE}/MdePkg/Library/UefiLib/UefiLib.inf\r
+  UefiRuntimeServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
 \r
 [LibraryClasses.common.DXE_SAL_DRIVER]\r
-  HobLib|${WORKSPACE}\MdePkg\Library/DxeHobLib/DxeHobLib.inf\r
-  MemoryAllocationLib|${WORKSPACE}\MdePkg\Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
-  PcdLib|${WORKSPACE}\MdePkg\Library/DxePcdLib/DxePcdLib.inf\r
-  DxeServiceTableLib|${WORKSPACE}\MdePkg\Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
-  SmbusLib|${WORKSPACE}\MdePkg\Library/DxeSmbusLib/DxeSmbusLib.inf\r
-  HiiLib|${WORKSPACE}\MdePkg\Library/HiiLib/HiiLib.inf\r
-  UefiBootServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
-  DebugLib|${WORKSPACE}\MdePkg\Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
-  DevicePathLib|${WORKSPACE}\MdePkg\Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
-  UefiDriverEntryPoint|${WORKSPACE}\MdePkg\Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
-  UefiLib|${WORKSPACE}\MdePkg\Library/UefiLib/UefiLib.inf\r
-  UefiRuntimeServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
+  HobLib|${WORKSPACE}/MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+  MemoryAllocationLib|${WORKSPACE}/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
+  PcdLib|${WORKSPACE}/MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  DxeServiceTableLib|${WORKSPACE}/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
+  SmbusLib|${WORKSPACE}/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf\r
+  HiiLib|${WORKSPACE}/MdePkg/Library/HiiLib/HiiLib.inf\r
+  UefiBootServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
+  DebugLib|${WORKSPACE}/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+  DevicePathLib|${WORKSPACE}/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  UefiDriverEntryPoint|${WORKSPACE}/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
+  UefiLib|${WORKSPACE}/MdePkg/Library/UefiLib/UefiLib.inf\r
+  UefiRuntimeServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
 \r
 [LibraryClasses.common.DXE_SMM_DRIVER]\r
-  HobLib|${WORKSPACE}\MdePkg\Library/DxeHobLib/DxeHobLib.inf\r
-  MemoryAllocationLib|${WORKSPACE}\MdePkg\Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
-  PcdLib|${WORKSPACE}\MdePkg\Library/DxePcdLib/DxePcdLib.inf\r
-  DxeServiceTableLib|${WORKSPACE}\MdePkg\Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
-  SmbusLib|${WORKSPACE}\MdePkg\Library/DxeSmbusLib/DxeSmbusLib.inf\r
-  HiiLib|${WORKSPACE}\MdePkg\Library/HiiLib/HiiLib.inf\r
-  UefiBootServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
-  DebugLib|${WORKSPACE}\MdePkg\Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
-  DevicePathLib|${WORKSPACE}\MdePkg\Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
-  UefiLib|${WORKSPACE}\MdePkg\Library/UefiLib/UefiLib.inf\r
-  UefiRuntimeServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
+  HobLib|${WORKSPACE}/MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+  MemoryAllocationLib|${WORKSPACE}/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
+  PcdLib|${WORKSPACE}/MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  DxeServiceTableLib|${WORKSPACE}/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
+  SmbusLib|${WORKSPACE}/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf\r
+  HiiLib|${WORKSPACE}/MdePkg/Library/HiiLib/HiiLib.inf\r
+  UefiBootServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
+  DebugLib|${WORKSPACE}/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+  DevicePathLib|${WORKSPACE}/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  UefiLib|${WORKSPACE}/MdePkg/Library/UefiLib/UefiLib.inf\r
+  UefiRuntimeServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
 \r
 [LibraryClasses.common.UEFI_DRIVER]\r
-  HobLib|${WORKSPACE}\MdePkg\Library/DxeHobLib/DxeHobLib.inf\r
-  MemoryAllocationLib|${WORKSPACE}\MdePkg\Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
-  PcdLib|${WORKSPACE}\MdePkg\Library/DxePcdLib/DxePcdLib.inf\r
-  DxeServiceTableLib|${WORKSPACE}\MdePkg\Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
-  SmbusLib|${WORKSPACE}\MdePkg\Library/DxeSmbusLib/DxeSmbusLib.inf\r
-  HiiLib|${WORKSPACE}\MdePkg\Library/HiiLib/HiiLib.inf\r
-  UefiBootServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
-  DebugLib|${WORKSPACE}\MdePkg\Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
-  DevicePathLib|${WORKSPACE}\MdePkg\Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
-  UefiDriverEntryPoint|${WORKSPACE}\MdePkg\Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
-  UefiLib|${WORKSPACE}\MdePkg\Library/UefiLib/UefiLib.inf\r
-  UefiRuntimeServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
+  HobLib|${WORKSPACE}/MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+  MemoryAllocationLib|${WORKSPACE}/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
+  PcdLib|${WORKSPACE}/MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  DxeServiceTableLib|${WORKSPACE}/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
+  SmbusLib|${WORKSPACE}/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf\r
+  HiiLib|${WORKSPACE}/MdePkg/Library/HiiLib/HiiLib.inf\r
+  UefiBootServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
+  DebugLib|${WORKSPACE}/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+  DevicePathLib|${WORKSPACE}/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  UefiDriverEntryPoint|${WORKSPACE}/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
+  UefiLib|${WORKSPACE}/MdePkg/Library/UefiLib/UefiLib.inf\r
+  UefiRuntimeServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
 \r
 [LibraryClasses.common.UEFI_APPLICATION]\r
-  HobLib|${WORKSPACE}\MdePkg\Library/DxeHobLib/DxeHobLib.inf\r
-  MemoryAllocationLib|${WORKSPACE}\MdePkg\Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
-  PcdLib|${WORKSPACE}\MdePkg\Library/DxePcdLib/DxePcdLib.inf\r
-  DxeServiceTableLib|${WORKSPACE}\MdePkg\Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
-  HiiLib|${WORKSPACE}\MdePkg\Library/HiiLib/HiiLib.inf\r
-  UefiApplicationEntryPoint|${WORKSPACE}\MdePkg\Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf\r
-  UefiBootServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
-  DevicePathLib|${WORKSPACE}\MdePkg\Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
-  UefiLib|${WORKSPACE}\MdePkg\Library/UefiLib/UefiLib.inf\r
-  UefiRuntimeServicesTableLib|${WORKSPACE}\MdePkg\Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
-  DebugLib|${WORKSPACE}\MdePkg\Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf\r
+  HobLib|${WORKSPACE}/MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+  MemoryAllocationLib|${WORKSPACE}/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
+  PcdLib|${WORKSPACE}/MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+  DxeServiceTableLib|${WORKSPACE}/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
+  HiiLib|${WORKSPACE}/MdePkg/Library/HiiLib/HiiLib.inf\r
+  UefiApplicationEntryPoint|${WORKSPACE}/MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf\r
+  UefiBootServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
+  DevicePathLib|${WORKSPACE}/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+  UefiLib|${WORKSPACE}/MdePkg/Library/UefiLib/UefiLib.inf\r
+  UefiRuntimeServicesTableLib|${WORKSPACE}/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
+  DebugLib|${WORKSPACE}/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf\r
 \r
 \r
 [LibraryClasses.IA32.BASE]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IA32.SEC]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IA32.PEI_CORE]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IA32.PEIM]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IA32.DXE_DRIVER]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IA32.DXE_SAL_DRIVER]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IA32.UEFI_DRIVER]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IA32.UEFI_APPLICATION]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.X64.BASE]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.X64.SEC]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.X64.PEI_CORE]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.X64.PEIM]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.X64.DXE_DRIVER]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.X64.DXE_SAL_DRIVER]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.X64.UEFI_DRIVER]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.X64.UEFI_APPLICATION]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IPF.BASE]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IPF.SEC]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IPF.PEI_CORE]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IPF.PEIM]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IPF.DXE_DRIVER]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IPF.DXE_SAL_DRIVER]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IPF.UEFI_DRIVER]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.IPF.UEFI_APPLICATION]\r
-  TimerLib|${WORKSPACE}\MdePkg\Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
+  TimerLib|${WORKSPACE}/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 ################################################################################\r
 #\r
 \r
 \r
 [Components.Ia32]\r
-  ${WORKSPACE}\MdeModulePkg\Application\HelloWorld\HelloWorld.inf\r
-  ${WORKSPACE}\MdeModulePkg\Universal\Disk\DiskIo\Dxe\DiskIo.inf\r
-  ${WORKSPACE}\MdeModulePkg\Universal\Disk\Partition\Dxe\Partition.inf\r
-  ${WORKSPACE}\MdeModulePkg\Universal\Security\SecurityStub\Dxe\SecurityStub.inf\r
+  ${WORKSPACE}/MdeModulePkg/Application/HelloWorld/HelloWorld.inf\r
+  ${WORKSPACE}/MdeModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.inf\r
+  ${WORKSPACE}/MdeModulePkg/Universal/Disk/Partition/Dxe/Partition.inf\r
+  ${WORKSPACE}/MdeModulePkg/Universal/Security/SecurityStub/Dxe/SecurityStub.inf\r
 \r
 \r
index 63bfa7b494e02adfda86910f10bc35f92c954573..bf95be158c9c5c52d88c7d6bfc7d745fecaf344e 100644 (file)
@@ -1,26 +1,16 @@
- /*++\r
+/** @file\r
+  UEFI Component Name protocol for DiskIo driver.\r
+  \r
+  Copyright (c) 2006 - 2007, Intel Corporation                                              \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
-Copyright (c) 2006, Intel Corporation                                                         \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
+  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
-Module Name:\r
-\r
-  ComponentName.c\r
-\r
-Abstract:\r
-\r
---*/\r
-\r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
+**/\r
 \r
 #include "DiskIo.h"\r
 \r
@@ -44,6 +34,44 @@ static EFI_UNICODE_STRING_TABLE mDiskIoDriverNameTable[] = {
   }\r
 };\r
 \r
+\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of\r
+  the EFI Driver.\r
+\r
+  @param  This       A pointer to the\r
+                     EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  \r
+  @param  Language   A pointer to a Null-terminated ASCII string\r
+                     array indicating the language. This is the\r
+                     language of the driver name that the caller\r
+                     is requesting, and it must match one of the\r
+                     languages specified in SupportedLanguages.\r
+                     The number of languages supported by a\r
+                     driver is up to the driver writer. Language\r
+                     is specified in RFC 3066 language code\r
+                     format.\r
+  \r
+  @param  DriverName A pointer to the Unicode string to return.\r
+                     This Unicode string is the name of the\r
+                     driver specified by This in the language\r
+                     specified by Language.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the\r
+                                Driver specified by This and the\r
+                                language specified by Language\r
+                                was returned in DriverName.\r
+  \r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+  \r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+  \r
+  @retval EFI_UNSUPPORTED       The driver specified by This\r
+                                does not support the language\r
+                                specified by Language.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DiskIoComponentNameGetDriverName (\r
@@ -51,32 +79,6 @@ DiskIoComponentNameGetDriverName (
   IN  CHAR8                        *Language,\r
   OUT CHAR16                       **DriverName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
-\r
-  Arguments:\r
-    This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    Language   - A pointer to a three character ISO 639-2 language identifier.\r
-                 This is the language of the driver name that that the caller \r
-                 is requesting, and it must match one of the languages specified\r
-                 in SupportedLanguages.  The number of languages supported by a \r
-                 driver is up to the driver writer.\r
-    DriverName - A pointer to the Unicode string to return.  This Unicode string\r
-                 is the name of the driver specified by This in the language \r
-                 specified by Language.\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the Driver specified by This\r
-                            and the language specified by Language was returned \r
-                            in DriverName.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - DriverName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
 {\r
   return LookupUnicodeString (\r
            Language,\r
@@ -86,6 +88,78 @@ DiskIoComponentNameGetDriverName (
            );\r
 }\r
 \r
+\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of\r
+  the controller that is being managed by an EFI Driver.\r
+\r
+  @param  This             A pointer to the\r
+                           EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  ControllerHandle The handle of a controller that the\r
+                           driver specified by This is managing.\r
+                           This handle specifies the controller\r
+                           whose name is to be returned.\r
+\r
+  @param ChildHandle      The handle of the child controller to\r
+                           retrieve the name of.  This is an\r
+                           optional parameter that may be NULL.\r
+                           It will be NULL for device drivers.\r
+                           It will also be NULL for a bus\r
+                           drivers that wish to retrieve the\r
+                           name of the bus controller.  It will\r
+                           not be NULL for a bus driver that\r
+                           wishes to retrieve the name of a\r
+                           child controller.\r
+\r
+  @param  Language         A pointer to a Null-terminated ASCII\r
+                           string array indicating the language.\r
+                           This is the language of the driver\r
+                           name that the caller is requesting,\r
+                           and it must match one of the\r
+                           languages specified in\r
+                           SupportedLanguages. The number of\r
+                           languages supported by a driver is up\r
+                           to the driver writer. Language is\r
+                           specified in RFC 3066 language code\r
+                           format.\r
+\r
+  @param  ControllerName   A pointer to the Unicode string to\r
+                           return.  This Unicode string is the\r
+                           name of the controller specified by\r
+                           ControllerHandle and ChildHandle in\r
+                           the language specified by Language\r
+                           from the point of view of the driver\r
+                           specified by This.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the user\r
+                                readable name in the language\r
+                                specified by Language for the\r
+                                driver specified by This was\r
+                                returned in DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid\r
+                                EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it\r
+                                is not a valid EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is\r
+                                not currently managing the\r
+                                controller specified by\r
+                                ControllerHandle and\r
+                                ChildHandle.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This\r
+                                does not support the language\r
+                                specified by Language.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DiskIoComponentNameGetControllerName (\r
@@ -95,50 +169,6 @@ DiskIoComponentNameGetControllerName (
   IN  CHAR8                                           *Language,\r
   OUT CHAR16                                          **ControllerName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the controller\r
-    that is being managed by an EFI Driver.\r
-\r
-  Arguments:\r
-    This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    ControllerHandle - The handle of a controller that the driver specified by \r
-                       This is managing.  This handle specifies the controller \r
-                       whose name is to be returned.\r
-    ChildHandle      - The handle of the child controller to retrieve the name \r
-                       of.  This is an optional parameter that may be NULL.  It \r
-                       will be NULL for device drivers.  It will also be NULL \r
-                       for a bus drivers that wish to retrieve the name of the \r
-                       bus controller.  It will not be NULL for a bus driver \r
-                       that wishes to retrieve the name of a child controller.\r
-    Language         - A pointer to a three character ISO 639-2 language \r
-                       identifier.  This is the language of the controller name \r
-                       that that the caller is requesting, and it must match one\r
-                       of the languages specified in SupportedLanguages.  The \r
-                       number of languages supported by a driver is up to the \r
-                       driver writer.\r
-    ControllerName   - A pointer to the Unicode string to return.  This Unicode\r
-                       string is the name of the controller specified by \r
-                       ControllerHandle and ChildHandle in the language specified\r
-                       by Language from the point of view of the driver specified\r
-                       by This. \r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the user readable name in the \r
-                            language specified by Language for the driver \r
-                            specified by This was returned in DriverName.\r
-    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - ControllerName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This is not currently managing \r
-                            the controller specified by ControllerHandle and \r
-                            ChildHandle.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
 {\r
   return EFI_UNSUPPORTED;\r
 }\r
index 0459ac48d20c51622e98934eb2e815a89b499f4e..958fcbc0467aa3d496ffb4c7bb5eceeef65f0863 100644 (file)
@@ -1,32 +1,38 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation                                                         \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
-Module Name:\r
-\r
-  DiskIo.h\r
-  \r
-Abstract:\r
-  Private Data definition for Disk IO driver\r
-\r
---*/\r
-\r
-#ifndef _DISK_IO_H\r
-#define _DISK_IO_H\r
-\r
-\r
+/** @file\r
+  DiskIo driver that layers it's self on every Block IO protocol in the system.\r
+  DiskIo converts a block oriented device to a byte oriented device.\r
+\r
+  Copyright (c) 2006 - 2007, Intel Corporation                                              \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
+#include <Uefi.h>\r
+#include <Protocol/BlockIo.h>\r
+#include <Protocol/ComponentName.h>\r
+#include <Protocol/DriverBinding.h>\r
+#include <Protocol/DiskIo.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/BaseLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
 \r
 //\r
-// Include common header file for this module.\r
+// Driver Binding Externs\r
 //\r
-#include "CommonHeader.h"\r
+extern EFI_DRIVER_BINDING_PROTOCOL gDiskIoDriverBinding;\r
+extern EFI_COMPONENT_NAME_PROTOCOL gDiskIoComponentName;\r
+\r
+\r
 \r
 #define DISK_IO_PRIVATE_DATA_SIGNATURE  EFI_SIGNATURE_32 ('d', 's', 'k', 'I')\r
 \r
@@ -119,4 +125,3 @@ DiskIoComponentNameGetControllerName (
   OUT CHAR16                                          **ControllerName\r
   );\r
 \r
-#endif\r
index 9e08235dc395ccf066168e5ee71074d710a82af6..ad736793020721cf6bae8ddeb1d7569a2b1475ff 100644 (file)
@@ -1,13 +1,12 @@
 #/** @file\r
-# Component description file for DiskIo module.\r
-#\r
-# DiskIo driver that layers it's self on every Block IO protocol in the system.\r
-# Copyright (c) 2006 - 2007, Intel Corporation\r
+#  Component description file for DiskIo module.\r
 #\r
+#  Copyright (c) 2006 - 2007, Intel Corporation\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
@@ -49,8 +48,6 @@
   ComponentName.c\r
   DiskIo.h\r
   diskio.c\r
-  CommonHeader.h\r
-  EntryPoint.c\r
 \r
 \r
 ################################################################################\r
@@ -61,7 +58,7 @@
 ################################################################################\r
 \r
 [Includes]\r
-  $(WORKSPACE)/MdePkg\Include/Library\r
+  $(WORKSPACE)/MdePkg/Include/Library\r
 \r
 ################################################################################\r
 #\r
@@ -71,8 +68,8 @@
 ################################################################################\r
 \r
 [Packages]\r
-  $(WORKSPACE)\MdeModulePkg/MdeModulePkg.dec\r
-  $(WORKSPACE)\MdePkg/MdePkg.dec\r
+  $(WORKSPACE)/MdeModulePkg/MdeModulePkg.dec\r
+  $(WORKSPACE)/MdePkg/MdePkg.dec\r
 \r
 \r
 ################################################################################\r
index 07d5d1ee7b72e58dd2062709a9a49dba9f6d2db7..0cb49224ca7ad80c13ad43cc0340482a05378976 100644 (file)
@@ -1,39 +1,24 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation\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
-Module Name:\r
-\r
-  DiskIo.c\r
-\r
-Abstract:\r
-\r
+/** @file\r
   DiskIo driver that layers it's self on every Block IO protocol in the system.\r
   DiskIo converts a block oriented device to a byte oriented device.\r
 \r
   ReadDisk may have to do reads that are not aligned on sector boundaries.\r
   There are three cases:\r
-\r
     UnderRun - The first byte is not on a sector boundary or the read request is\r
                less than a sector in length.\r
-\r
     Aligned  - A read of N contiguous sectors.\r
-\r
     OverRun  - The last byte is not on a sector boundary.\r
 \r
---*/\r
+  Copyright (c) 2006 - 2007, Intel Corporation                                              \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
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
+**/\r
 \r
 #include "DiskIo.h"\r
 \r
@@ -56,6 +41,20 @@ DISK_IO_PRIVATE_DATA        gDiskIoPrivateDataTemplate = {
   NULL\r
 };\r
 \r
+\r
+/**\r
+  Test to see if this driver supports ControllerHandle. \r
+\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
+\r
+  @retval EFI_SUCCESS         This driver supports this device\r
+  @retval EFI_ALREADY_STARTED This driver is already running on this device\r
+  @retval other               This driver does not support this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DiskIoDriverBindingSupported (\r
@@ -63,23 +62,6 @@ DiskIoDriverBindingSupported (
   IN EFI_HANDLE                   ControllerHandle,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Test to see if this driver supports ControllerHandle. Any ControllerHandle\r
-    than contains a BlockIo protocol can be supported.\r
-\r
-  Arguments:\r
-    This                - Protocol instance pointer.\r
-    ControllerHandle    - Handle of device to test.\r
-    RemainingDevicePath - Not used.\r
-\r
-  Returns:\r
-    EFI_SUCCESS         - This driver supports this device.\r
-    EFI_ALREADY_STARTED - This driver is already running on this device.\r
-    other               - This driver does not support this device.\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   EFI_BLOCK_IO_PROTOCOL *BlockIo;\r
@@ -98,6 +80,7 @@ DiskIoDriverBindingSupported (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
+\r
   //\r
   // Close the I/O Abstraction(s) used to perform the supported test.\r
   //\r
@@ -110,6 +93,21 @@ DiskIoDriverBindingSupported (
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  Start this driver on ControllerHandle by opening a Block IO protocol and\r
+  installing a Disk IO protocol on ControllerHandle.\r
+\r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
+\r
+  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
+  @retval EFI_ALREADY_STARTED  This driver is already running on ControllerHandle\r
+  @retval other                This driver does not support this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DiskIoDriverBindingStart (\r
@@ -117,23 +115,6 @@ DiskIoDriverBindingStart (
   IN EFI_HANDLE                   ControllerHandle,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Start this driver on ControllerHandle by opening a Block IO protocol and\r
-    installing a Disk IO protocol on ControllerHandle.\r
-\r
-  Arguments:\r
-    This                - Protocol instance pointer.\r
-    ControllerHandle    - Handle of device to bind driver to.\r
-    RemainingDevicePath - Not used, always produce all possible children.\r
-\r
-  Returns:\r
-    EFI_SUCCESS         - This driver is added to ControllerHandle.\r
-    EFI_ALREADY_STARTED - This driver is already running on ControllerHandle.\r
-    other               - This driver does not support this device.\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   DISK_IO_PRIVATE_DATA  *Private;\r
@@ -154,6 +135,7 @@ DiskIoDriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
+  \r
   //\r
   // Initialize the Disk IO device instance.\r
   //\r
@@ -162,6 +144,7 @@ DiskIoDriverBindingStart (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ErrorExit;\r
   }\r
+  \r
   //\r
   // Install protocol interfaces for the Disk IO device.\r
   //\r
@@ -190,6 +173,21 @@ ErrorExit:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Stop this driver on ControllerHandle by removing Disk IO protocol and closing\r
+  the Block IO protocol on ControllerHandle.\r
+\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DiskIoDriverBindingStop (\r
@@ -198,24 +196,6 @@ DiskIoDriverBindingStop (
   IN  UINTN                          NumberOfChildren,\r
   IN  EFI_HANDLE                     *ChildHandleBuffer\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Stop this driver on ControllerHandle by removing Disk IO protocol and closing\r
-    the Block IO protocol on ControllerHandle.\r
-\r
-  Arguments:\r
-    This              - Protocol instance pointer.\r
-    ControllerHandle  - Handle of device to stop driver on.\r
-    NumberOfChildren  - Not used.\r
-    ChildHandleBuffer - Not used.\r
-\r
-  Returns:\r
-    EFI_SUCCESS         - This driver is removed ControllerHandle.\r
-    other               - This driver was not removed from this device.\r
-    EFI_UNSUPPORTED\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   EFI_DISK_IO_PROTOCOL  *DiskIo;\r
@@ -260,6 +240,31 @@ DiskIoDriverBindingStop (
   return Status;\r
 }\r
 \r
+\r
+\r
+/**\r
+  Read BufferSize bytes from Offset into Buffer.\r
+  Reads may support reads that are not aligned on\r
+  sector boundaries. There are three cases:\r
+    UnderRun - The first byte is not on a sector boundary or the read request is\r
+               less than a sector in length.\r
+    Aligned  - A read of N contiguous sectors.\r
+    OverRun  - The last byte is not on a sector boundary.\r
+\r
+  @param  This                  Protocol instance pointer.\r
+  @param  MediaId               Id of the media, changes every time the media is replaced.\r
+  @param  Offset                The starting byte offset to read from\r
+  @param  BufferSize            Size of Buffer\r
+  @param  Buffer                Buffer containing read data\r
+\r
+  @retval EFI_SUCCESS           The data was read correctly from the device.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error while performing the read.\r
+  @retval EFI_NO_MEDIA          There is no media in the device.\r
+  @retval EFI_MEDIA_CHNAGED     The MediaId does not matched the current device.\r
+  @retval EFI_INVALID_PARAMETER The read request contains device addresses that are not\r
+                                valid for the device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DiskIoReadDisk (\r
@@ -269,39 +274,6 @@ DiskIoReadDisk (
   IN UINTN                 BufferSize,\r
   OUT VOID                 *Buffer\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Read BufferSize bytes from Offset into Buffer.\r
-\r
-    Reads may support reads that are not aligned on\r
-    sector boundaries. There are three cases:\r
-\r
-      UnderRun - The first byte is not on a sector boundary or the read request is\r
-                 less than a sector in length.\r
-\r
-      Aligned  - A read of N contiguous sectors.\r
-\r
-      OverRun  - The last byte is not on a sector boundary.\r
-\r
-\r
-  Arguments:\r
-    This       - Protocol instance pointer.\r
-    MediaId    - Id of the media, changes every time the media is replaced.\r
-    Offset     - The starting byte offset to read from.\r
-    BufferSize - Size of Buffer.\r
-    Buffer     - Buffer containing read data.\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The data was read correctly from the device.\r
-    EFI_DEVICE_ERROR      - The device reported an error while performing the read.\r
-    EFI_NO_MEDIA          - There is no media in the device.\r
-    EFI_MEDIA_CHNAGED     - The MediaId does not matched the current device.\r
-    EFI_INVALID_PARAMETER - The read request contains device addresses that are not\r
-                            valid for the device.\r
-    EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   DISK_IO_PRIVATE_DATA  *Private;\r
@@ -485,6 +457,32 @@ Done:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Read BufferSize bytes from Offset into Buffer.\r
+  Writes may require a read modify write to support writes that are not\r
+  aligned on sector boundaries. There are three cases:\r
+    UnderRun - The first byte is not on a sector boundary or the write request\r
+               is less than a sector in length. Read modify write is required.\r
+    Aligned  - A write of N contiguous sectors.\r
+    OverRun  - The last byte is not on a sector boundary. Read modified write\r
+               required.\r
+\r
+  @param  This       Protocol instance pointer.\r
+  @param  MediaId    Id of the media, changes every time the media is replaced.\r
+  @param  Offset     The starting byte offset to read from\r
+  @param  BufferSize Size of Buffer\r
+  @param  Buffer     Buffer containing read data\r
+\r
+  @retval EFI_SUCCESS           The data was written correctly to the device.\r
+  @retval EFI_WRITE_PROTECTED   The device can not be written to.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error while performing the write.\r
+  @retval EFI_NO_MEDIA          There is no media in the device.\r
+  @retval EFI_MEDIA_CHNAGED     The MediaId does not matched the current device.\r
+  @retval EFI_INVALID_PARAMETER The write request contains device addresses that are not\r
+                                 valid for the device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DiskIoWriteDisk (\r
@@ -494,40 +492,6 @@ DiskIoWriteDisk (
   IN UINTN                 BufferSize,\r
   IN VOID                  *Buffer\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Read BufferSize bytes from Offset into Buffer.\r
-\r
-    Writes may require a read modify write to support writes that are not\r
-    aligned on sector boundaries. There are three cases:\r
-\r
-      UnderRun - The first byte is not on a sector boundary or the write request\r
-                 is less than a sector in length. Read modify write is required.\r
-\r
-      Aligned  - A write of N contiguous sectors.\r
-\r
-      OverRun  - The last byte is not on a sector boundary. Read modified write\r
-                 required.\r
-\r
-  Arguments:\r
-    This       - Protocol instance pointer.\r
-    MediaId    - Id of the media, changes every time the media is replaced.\r
-    Offset     - The starting byte offset to read from.\r
-    BufferSize - Size of Buffer.\r
-    Buffer     - Buffer containing read data.\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The data was written correctly to the device.\r
-    EFI_WRITE_PROTECTED   - The device can not be written to.\r
-    EFI_DEVICE_ERROR      - The device reported an error while performing the write.\r
-    EFI_NO_MEDIA          - There is no media in the device.\r
-    EFI_MEDIA_CHNAGED     - The MediaId does not matched the current device.\r
-    EFI_INVALID_PARAMETER - The write request contains device addresses that are not\r
-                            valid for the device.\r
-    EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   DISK_IO_PRIVATE_DATA  *Private;\r
@@ -732,3 +696,42 @@ Done:
 \r
   return Status;\r
 }\r
+\r
+\r
+/**\r
+  The user Entry Point for module DiskIo. The user code starts with this function.\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
+  \r
+  @retval EFI_SUCCESS       The entry point is executed successfully.\r
+  @retval other             Some error occurs when executing this entry point.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeDiskIo (\r
+  IN EFI_HANDLE           ImageHandle,\r
+  IN EFI_SYSTEM_TABLE     *SystemTable\r
+  )\r
+{\r
+  EFI_STATUS              Status;\r
+\r
+  //\r
+  // Install driver model protocol(s).\r
+  //\r
+  Status = EfiLibInstallAllDriverProtocols (\r
+             ImageHandle,\r
+             SystemTable,\r
+             &gDiskIoDriverBinding,\r
+             ImageHandle,\r
+             &gDiskIoComponentName,\r
+             NULL,\r
+             NULL\r
+             );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+\r
+  return Status;\r
+}\r
+\r
index ab534926c280ac874e3ed69c5351c31a28cfb4c9..e922cb0f9285e8813fc1517d587280665ec5b7f7 100644 (file)
@@ -1,26 +1,16 @@
-/*++\r
+/** @file\r
+  UEFI Component Name protocol for Partition driver.\r
+  \r
+  Copyright (c) 2006 - 2007, Intel Corporation                                              \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
-Copyright (c) 2006, Intel Corporation                                                         \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
+  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
-Module Name:\r
-\r
-  ComponentName.c\r
-\r
-Abstract:\r
-\r
---*/\r
-\r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
+**/\r
 \r
 #include "Partition.h"\r
 \r
@@ -44,6 +34,44 @@ static EFI_UNICODE_STRING_TABLE mPartitionDriverNameTable[] = {
   }\r
 };\r
 \r
+\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of\r
+  the EFI Driver.\r
+\r
+  @param  This       A pointer to the\r
+                     EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  \r
+  @param  Language   A pointer to a Null-terminated ASCII string\r
+                     array indicating the language. This is the\r
+                     language of the driver name that the caller\r
+                     is requesting, and it must match one of the\r
+                     languages specified in SupportedLanguages.\r
+                     The number of languages supported by a\r
+                     driver is up to the driver writer. Language\r
+                     is specified in RFC 3066 language code\r
+                     format.\r
+  \r
+  @param  DriverName A pointer to the Unicode string to return.\r
+                     This Unicode string is the name of the\r
+                     driver specified by This in the language\r
+                     specified by Language.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the\r
+                                Driver specified by This and the\r
+                                language specified by Language\r
+                                was returned in DriverName.\r
+  \r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+  \r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+  \r
+  @retval EFI_UNSUPPORTED       The driver specified by This\r
+                                does not support the language\r
+                                specified by Language.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PartitionComponentNameGetDriverName (\r
@@ -51,32 +79,6 @@ PartitionComponentNameGetDriverName (
   IN  CHAR8                        *Language,\r
   OUT CHAR16                       **DriverName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
-\r
-  Arguments:\r
-    This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    Language   - A pointer to a three character ISO 639-2 language identifier.\r
-                 This is the language of the driver name that that the caller \r
-                 is requesting, and it must match one of the languages specified\r
-                 in SupportedLanguages.  The number of languages supported by a \r
-                 driver is up to the driver writer.\r
-    DriverName - A pointer to the Unicode string to return.  This Unicode string\r
-                 is the name of the driver specified by This in the language \r
-                 specified by Language.\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the Driver specified by This\r
-                            and the language specified by Language was returned \r
-                            in DriverName.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - DriverName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
 {\r
   return LookupUnicodeString (\r
           Language,\r
@@ -86,6 +88,77 @@ PartitionComponentNameGetDriverName (
           );\r
 }\r
 \r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of\r
+  the controller that is being managed by an EFI Driver.\r
+\r
+  @param  This             A pointer to the\r
+                           EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  ControllerHandle The handle of a controller that the\r
+                           driver specified by This is managing.\r
+                           This handle specifies the controller\r
+                           whose name is to be returned.\r
+\r
+  @param ChildHandle      The handle of the child controller to\r
+                           retrieve the name of.  This is an\r
+                           optional parameter that may be NULL.\r
+                           It will be NULL for device drivers.\r
+                           It will also be NULL for a bus\r
+                           drivers that wish to retrieve the\r
+                           name of the bus controller.  It will\r
+                           not be NULL for a bus driver that\r
+                           wishes to retrieve the name of a\r
+                           child controller.\r
+\r
+  @param  Language         A pointer to a Null-terminated ASCII\r
+                           string array indicating the language.\r
+                           This is the language of the driver\r
+                           name that the caller is requesting,\r
+                           and it must match one of the\r
+                           languages specified in\r
+                           SupportedLanguages. The number of\r
+                           languages supported by a driver is up\r
+                           to the driver writer. Language is\r
+                           specified in RFC 3066 language code\r
+                           format.\r
+\r
+  @param  ControllerName   A pointer to the Unicode string to\r
+                           return.  This Unicode string is the\r
+                           name of the controller specified by\r
+                           ControllerHandle and ChildHandle in\r
+                           the language specified by Language\r
+                           from the point of view of the driver\r
+                           specified by This.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the user\r
+                                readable name in the language\r
+                                specified by Language for the\r
+                                driver specified by This was\r
+                                returned in DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid\r
+                                EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it\r
+                                is not a valid EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is\r
+                                not currently managing the\r
+                                controller specified by\r
+                                ControllerHandle and\r
+                                ChildHandle.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This\r
+                                does not support the language\r
+                                specified by Language.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PartitionComponentNameGetControllerName (\r
@@ -95,50 +168,6 @@ PartitionComponentNameGetControllerName (
   IN  CHAR8                                           *Language,\r
   OUT CHAR16                                          **ControllerName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the controller\r
-    that is being managed by an EFI Driver.\r
-\r
-  Arguments:\r
-    This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    ControllerHandle - The handle of a controller that the driver specified by \r
-                       This is managing.  This handle specifies the controller \r
-                       whose name is to be returned.\r
-    ChildHandle      - The handle of the child controller to retrieve the name \r
-                       of.  This is an optional parameter that may be NULL.  It \r
-                       will be NULL for device drivers.  It will also be NULL \r
-                       for a bus drivers that wish to retrieve the name of the \r
-                       bus controller.  It will not be NULL for a bus driver \r
-                       that wishes to retrieve the name of a child controller.\r
-    Language         - A pointer to a three character ISO 639-2 language \r
-                       identifier.  This is the language of the controller name \r
-                       that that the caller is requesting, and it must match one\r
-                       of the languages specified in SupportedLanguages.  The \r
-                       number of languages supported by a driver is up to the \r
-                       driver writer.\r
-    ControllerName   - A pointer to the Unicode string to return.  This Unicode\r
-                       string is the name of the controller specified by \r
-                       ControllerHandle and ChildHandle in the language specified\r
-                       by Language from the point of view of the driver specified\r
-                       by This. \r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the user readable name in the \r
-                            language specified by Language for the driver \r
-                            specified by This was returned in DriverName.\r
-    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - ControllerName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This is not currently managing \r
-                            the controller specified by ControllerHandle and \r
-                            ChildHandle.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
 {\r
   return EFI_UNSUPPORTED;\r
 }\r
index 3b201528f3781e852494638f97a6aa62ef6f4d3c..37ac710ff0104d46963a38dcc5f897337f2b8616 100644 (file)
@@ -1,33 +1,36 @@
-/*++\r
+/** @file\r
+  Decode an El Torito formatted CD-ROM\r
 \r
-Copyright (c) 2006, Intel Corporation\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
+  Copyright (c) 2006 - 2007, Intel Corporation                                              \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
+  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
-Module Name:\r
+**/\r
 \r
-  ElTorito.c\r
 \r
-Abstract:\r
+#include "Partition.h"\r
 \r
-  Decode an El Torito formatted CD-ROM\r
 \r
-Revision History\r
+/**\r
+  Install child handles if the Handle supports El Torito format.\r
 \r
---*/\r
+  @param[in]  This        Calling context.\r
+  @param[in]  Handle      Parent Handle\r
+  @param[in]  DiskIo      Parent DiskIo interface\r
+  @param[in]  BlockIo     Parent BlockIo interface\r
+  @param[in]  DevicePath  Parent Device Path\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
 \r
-#include "Partition.h"\r
+  @retval EFI_SUCCESS         Child handle(s) was added\r
+  @retval EFI_MEDIA_CHANGED   Media changed Detected\r
+  @retval other               no child handle was added\r
 \r
+**/\r
 EFI_STATUS\r
 PartitionInstallElToritoChildHandles (\r
   IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
@@ -36,24 +39,6 @@ PartitionInstallElToritoChildHandles (
   IN  EFI_BLOCK_IO_PROTOCOL        *BlockIo,\r
   IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Install child handles if the Handle supports El Torito format.\r
-\r
-Arguments:\r
-  This       - Calling context.\r
-  Handle     - Parent Handle\r
-  DiskIo     - Parent DiskIo interface\r
-  BlockIo    - Parent BlockIo interface\r
-  DevicePath - Parent Device Path\r
-\r
-Returns:\r
-  EFI_SUCCESS       - some child handle(s) was added\r
-  EFI_MEDIA_CHANGED - Media changed Detected\r
-  !EFI_SUCCESS      - no child handle was added\r
-\r
---*/\r
 {\r
   EFI_STATUS              Status;\r
   UINT32                  VolDescriptorLba;\r
index 2a8404d9704579f0cb50d8752429fa3c0445da5f..581007e92af8475d8e2f0dd07d7b0b2416f35f66 100644 (file)
@@ -1,33 +1,22 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation\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
-Module Name:\r
-\r
-  Gpt.c\r
-\r
-Abstract:\r
-\r
+/** @file\r
   Decode a hard disk partitioned with the GPT scheme in the EFI 1.0\r
   specification.\r
 \r
---*/\r
+  Copyright (c) 2006 - 2007, Intel Corporation                                              \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
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
 \r
 #include "Partition.h"\r
 \r
-STATIC\r
+\r
 BOOLEAN\r
 PartitionValidGptTable (\r
   IN  EFI_BLOCK_IO_PROTOCOL       *BlockIo,\r
@@ -36,7 +25,7 @@ PartitionValidGptTable (
   OUT EFI_PARTITION_TABLE_HEADER  *PartHeader\r
   );\r
 \r
-STATIC\r
+\r
 BOOLEAN\r
 PartitionCheckGptEntryArrayCRC (\r
   IN  EFI_BLOCK_IO_PROTOCOL       *BlockIo,\r
@@ -44,7 +33,7 @@ PartitionCheckGptEntryArrayCRC (
   IN  EFI_PARTITION_TABLE_HEADER  *PartHeader\r
   );\r
 \r
-STATIC\r
+\r
 BOOLEAN\r
 PartitionRestoreGptTable (\r
   IN  EFI_BLOCK_IO_PROTOCOL       *BlockIo,\r
@@ -52,7 +41,7 @@ PartitionRestoreGptTable (
   IN  EFI_PARTITION_TABLE_HEADER  *PartHeader\r
   );\r
 \r
-STATIC\r
+\r
 VOID\r
 PartitionCheckGptEntry (\r
   IN  EFI_PARTITION_TABLE_HEADER  *PartHeader,\r
@@ -60,7 +49,7 @@ PartitionCheckGptEntry (
   OUT EFI_PARTITION_ENTRY_STATUS  *PEntryStatus\r
   );\r
 \r
-STATIC\r
+\r
 BOOLEAN\r
 PartitionCheckCrcAltSize (\r
   IN UINTN                 MaxSize,\r
@@ -68,26 +57,40 @@ PartitionCheckCrcAltSize (
   IN OUT EFI_TABLE_HEADER  *Hdr\r
   );\r
 \r
-STATIC\r
+\r
 BOOLEAN\r
 PartitionCheckCrc (\r
   IN UINTN                 MaxSize,\r
   IN OUT EFI_TABLE_HEADER  *Hdr\r
   );\r
 \r
-STATIC\r
+\r
 VOID\r
 PartitionSetCrcAltSize (\r
   IN UINTN                 Size,\r
   IN OUT EFI_TABLE_HEADER  *Hdr\r
   );\r
 \r
-STATIC\r
+\r
 VOID\r
 PartitionSetCrc (\r
   IN OUT EFI_TABLE_HEADER *Hdr\r
   );\r
 \r
+/**\r
+  Install child handles if the Handle supports GPT partition structure.\r
+\r
+  @param[in]  This       - Calling context.\r
+  @param[in]  Handle     - Parent Handle\r
+  @param[in]  DiskIo     - Parent DiskIo interface\r
+  @param[in]  BlockIo    - Parent BlockIo interface\r
+  @param[in]  DevicePath - Parent Device Path\r
+\r
+  @retval EFI_SUCCESS         Valid GPT disk\r
+  @retval EFI_MEDIA_CHANGED   Media changed Detected\r
+  @retval other               Not a valid GPT disk\r
+\r
+**/\r
 EFI_STATUS\r
 PartitionInstallGptChildHandles (\r
   IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
@@ -96,24 +99,6 @@ PartitionInstallGptChildHandles (
   IN  EFI_BLOCK_IO_PROTOCOL        *BlockIo,\r
   IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Install child handles if the Handle supports GPT partition structure.\r
-\r
-Arguments:\r
-  This       - Calling context.\r
-  Handle     - Parent Handle\r
-  DiskIo     - Parent DiskIo interface\r
-  BlockIo    - Parent BlockIo interface\r
-  DevicePath - Parent Device Path\r
-\r
-Returns:\r
-  EFI_SUCCESS  - Valid GPT disk\r
-  EFI_MEDIA_CHANGED - Media changed Detected\r
-  !EFI_SUCCESS - Not a valid GPT disk\r
-\r
---*/\r
 {\r
   EFI_STATUS                  Status;\r
   UINT32                      BlockSize;\r
@@ -333,7 +318,19 @@ Done:
   return GptValid;\r
 }\r
 \r
-STATIC\r
+\r
+/**\r
+  Install child handles if the Handle supports GPT partition structure.\r
+\r
+  @param[in]  BlockIo     Parent BlockIo interface\r
+  @param[in]  DiskIo      Disk Io protocol.\r
+  @param[in]  Lba         The starting Lba of the Partition Table\r
+  @param[in]  PartHeader  Stores the partition table that is read\r
+\r
+  @retval TRUE      The partition table is valid\r
+  @retval FALSE     The partition table is not valid\r
+\r
+**/\r
 BOOLEAN\r
 PartitionValidGptTable (\r
   IN  EFI_BLOCK_IO_PROTOCOL       *BlockIo,\r
@@ -341,22 +338,6 @@ PartitionValidGptTable (
   IN  EFI_LBA                     Lba,\r
   OUT EFI_PARTITION_TABLE_HEADER  *PartHeader\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Check if the GPT partition table is valid\r
-\r
-Arguments:\r
-  BlockIo   - Parent BlockIo interface\r
-  DiskIo    - Disk Io protocol.\r
-  Lba       - The starting Lba of the Partition Table\r
-  PartHeader   - Stores the partition table that is read\r
-\r
-Returns:\r
-  TRUE       - The partition table is valid\r
-  FALSE      - The partition table is not valid\r
-\r
---*/\r
 {\r
   EFI_STATUS                  Status;\r
   UINT32                      BlockSize;\r
@@ -405,32 +386,25 @@ Returns:
   return TRUE;\r
 }\r
 \r
-STATIC\r
+\r
+/**\r
+  Check if the CRC field in the Partition table header is valid\r
+  for Partition entry array.\r
+\r
+  @param[in]  BlockIo     Parent BlockIo interface\r
+  @param[in]  DiskIo      Disk Io Protocol.\r
+  @param[in]  PartHeader  Partition table header structure\r
+\r
+  @retval TRUE      the CRC is valid\r
+  @retval FALSE     the CRC is invalid\r
+\r
+**/\r
 BOOLEAN\r
 PartitionCheckGptEntryArrayCRC (\r
   IN  EFI_BLOCK_IO_PROTOCOL       *BlockIo,\r
   IN  EFI_DISK_IO_PROTOCOL        *DiskIo,\r
   IN  EFI_PARTITION_TABLE_HEADER  *PartHeader\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Check if the CRC field in the Partition table header is valid\r
-  for Partition entry array\r
-\r
-Arguments:\r
-\r
-  BlockIo   - parent BlockIo interface\r
-  DiskIo    - Disk Io Protocol.\r
-  PartHeader   - Partition table header structure\r
-\r
-Returns:\r
-\r
-  TRUE      - the CRC is valid\r
-  FALSE     - the CRC is invalid\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   UINT8       *Ptr;\r
@@ -472,32 +446,25 @@ Returns:
   return (BOOLEAN) (PartHeader->PartitionEntryArrayCRC32 == Crc);\r
 }\r
 \r
-STATIC\r
-BOOLEAN\r
-PartitionRestoreGptTable (\r
-  IN  EFI_BLOCK_IO_PROTOCOL       *BlockIo,\r
-  IN  EFI_DISK_IO_PROTOCOL        *DiskIo,\r
-  IN  EFI_PARTITION_TABLE_HEADER  *PartHeader\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Restore Partition Table to its alternate place\r
   (Primary -> Backup or Backup -> Primary)\r
 \r
-Arguments:\r
-\r
-  BlockIo   - parent BlockIo interface\r
-  DiskIo    - Disk Io Protocol.\r
-  PartHeader   - the source Partition table header structure\r
+  @param[in]  BlockIo     Parent BlockIo interface\r
+  @param[in]  DiskIo      Disk Io Protocol.\r
+  @param[in]  PartHeader  Partition table header structure\r
 \r
-Returns:\r
+  @retval TRUE      Restoring succeeds\r
+  @retval FALSE     Restoring failed\r
 \r
-  TRUE      - Restoring succeeds\r
-  FALSE     - Restoring failed\r
-\r
---*/\r
+**/\r
+BOOLEAN\r
+PartitionRestoreGptTable (\r
+  IN  EFI_BLOCK_IO_PROTOCOL       *BlockIo,\r
+  IN  EFI_DISK_IO_PROTOCOL        *DiskIo,\r
+  IN  EFI_PARTITION_TABLE_HEADER  *PartHeader\r
+  )\r
 {\r
   EFI_STATUS                  Status;\r
   UINTN                       BlockSize;\r
@@ -570,30 +537,22 @@ Done:
   return TRUE;\r
 }\r
 \r
-STATIC\r
+\r
+/**\r
+  Restore Partition Table to its alternate place\r
+  (Primary -> Backup or Backup -> Primary)\r
+\r
+  @param[in]    PartHeader    Partition table header structure\r
+  @param[in]    PartEntry     The partition entry array\r
+  @param[out]   PEntryStatus  the partition entry status array \r
+                              recording the status of each partition\r
+**/\r
 VOID\r
 PartitionCheckGptEntry (\r
   IN  EFI_PARTITION_TABLE_HEADER  *PartHeader,\r
   IN  EFI_PARTITION_ENTRY         *PartEntry,\r
   OUT EFI_PARTITION_ENTRY_STATUS  *PEntryStatus\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Check each partition entry for its range\r
-\r
-Arguments:\r
-\r
-  PartHeader       - the partition table header\r
-  PartEntry        - the partition entry array\r
-  PEntryStatus  - the partition entry status array recording the status of\r
-                  each partition\r
-\r
-Returns:\r
-  VOID\r
-\r
---*/\r
 {\r
   EFI_LBA StartingLBA;\r
   EFI_LBA EndingLBA;\r
@@ -639,52 +598,35 @@ Returns:
   DEBUG ((EFI_D_INFO, " End check partition entries\n"));\r
 }\r
 \r
-STATIC\r
+\r
+/**\r
+  Updates the CRC32 value in the table header\r
+\r
+  @param[in,out]  Hdr    Table to update\r
+\r
+**/\r
 VOID\r
 PartitionSetCrc (\r
   IN OUT EFI_TABLE_HEADER *Hdr\r
   )\r
-/*++\r
+{\r
+  PartitionSetCrcAltSize (Hdr->HeaderSize, Hdr);\r
+}\r
 \r
-Routine Description:\r
 \r
+/**\r
   Updates the CRC32 value in the table header\r
 \r
-Arguments:\r
-\r
-  Hdr     - The table to update\r
+  @param[in]      Size   The size of the table\r
+  @param[in,out]  Hdr    Table to update\r
 \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-{\r
-  PartitionSetCrcAltSize (Hdr->HeaderSize, Hdr);\r
-}\r
-\r
-STATIC\r
+**/\r
 VOID\r
 PartitionSetCrcAltSize (\r
   IN UINTN                 Size,\r
   IN OUT EFI_TABLE_HEADER  *Hdr\r
   )\r
-/*++\r
-\r
-Routine Description:\r
 \r
-  Updates the CRC32 value in the table header\r
-\r
-Arguments:\r
-\r
-  Size    - The size of the table\r
-  Hdr     - The table to update\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   UINT32  Crc;\r
 \r
@@ -693,56 +635,44 @@ Returns:
   Hdr->CRC32 = Crc;\r
 }\r
 \r
-STATIC\r
+\r
+/**\r
+  Checks the CRC32 value in the table header\r
+\r
+  @param[in]      MaxSize   Max Size limit\r
+  @param[in,out]  Hdr       Table to check\r
+\r
+  @return TRUE    CRC Valid\r
+  @return FALSE   CRC Invalid\r
+\r
+**/\r
 BOOLEAN\r
 PartitionCheckCrc (\r
   IN UINTN                 MaxSize,\r
   IN OUT EFI_TABLE_HEADER  *Hdr\r
   )\r
-/*++\r
+{\r
+  return PartitionCheckCrcAltSize (MaxSize, Hdr->HeaderSize, Hdr);\r
+}\r
 \r
-Routine Description:\r
 \r
+/**\r
   Checks the CRC32 value in the table header\r
 \r
-Arguments:\r
+  @param[in]      MaxSize   Max Size limit\r
+  @param[in]      Size      The size of the table\r
+  @param[in,out]  Hdr       Table to check\r
 \r
-  MaxSize - Max Size limit\r
-  Hdr     - The table to check\r
+  @return TRUE    CRC Valid\r
+  @return FALSE   CRC Invalid\r
 \r
-Returns:\r
-\r
-  TRUE if the CRC is OK in the table\r
-\r
---*/\r
-{\r
-  return PartitionCheckCrcAltSize (MaxSize, Hdr->HeaderSize, Hdr);\r
-}\r
-\r
-STATIC\r
+**/\r
 BOOLEAN\r
 PartitionCheckCrcAltSize (\r
   IN UINTN                 MaxSize,\r
   IN UINTN                 Size,\r
   IN OUT EFI_TABLE_HEADER  *Hdr\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Checks the CRC32 value in the table header\r
-\r
-Arguments:\r
-\r
-  MaxSize - Max Size Limit\r
-  Size    - The size of the table\r
-  Hdr     - The table to check\r
-\r
-Returns:\r
-\r
-  TRUE if the CRC is OK in the table\r
-\r
---*/\r
 {\r
   UINT32      Crc;\r
   UINT32      OrgCrc;\r
index bc08963e5402fa627cc9396138e9078755289b7b..d71698c82673dcb08641b05b5482c4c4eca4f755 100644 (file)
@@ -29,11 +29,6 @@ Abstract:
 \r
 --*/\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
-\r
 #include "Partition.h"\r
 \r
 STATIC\r
index 63e771eb1586bbff16454a362a20b51f79fe5a38..4d0c76f251960d54d5a908290813e4c054064e87 100644 (file)
@@ -1,31 +1,20 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation\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
-Module Name:\r
-\r
-  Partition.c\r
-\r
-Abstract:\r
-\r
+/** @file\r
   Partition driver that produces logical BlockIo devices from a physical\r
   BlockIo device. The logical BlockIo devices are based on the format\r
   of the raw block devices media. Currently "El Torito CD-ROM", Legacy\r
   MBR, and GPT partition schemes are supported.\r
 \r
---*/\r
+  Copyright (c) 2006 - 2007, Intel Corporation                                              \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
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
 \r
 #include "Partition.h"\r
 \r
@@ -50,6 +39,21 @@ PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] = {
 };\r
 \r
 \r
+\r
+/**\r
+  Test to see if this driver supports ControllerHandle. Any ControllerHandle\r
+  than contains a BlockIo and DiskIo protocol can be supported.\r
+\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
+\r
+  @retval EFI_SUCCESS         This driver supports this device\r
+  @retval EFI_ALREADY_STARTED This driver is already running on this device\r
+  @retval other               This driver does not support this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PartitionDriverBindingSupported (\r
@@ -57,23 +61,6 @@ PartitionDriverBindingSupported (
   IN EFI_HANDLE                   ControllerHandle,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Test to see if this driver supports ControllerHandle. Any ControllerHandle\r
-    than contains a BlockIo and DiskIo protocol can be supported.\r
-\r
-  Arguments:\r
-    This                - Protocol instance pointer.\r
-    ControllerHandle    - Handle of device to test\r
-    RemainingDevicePath - Not used\r
-\r
-  Returns:\r
-    EFI_SUCCESS         - This driver supports this device\r
-    EFI_ALREADY_STARTED - This driver is already running on this device\r
-    EFI_UNSUPPORTED     - This driver does not support this device\r
-\r
---*/\r
 {\r
   EFI_STATUS                Status;\r
   EFI_DEVICE_PATH_PROTOCOL  *ParentDevicePath;\r
@@ -160,6 +147,22 @@ PartitionDriverBindingSupported (
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Start this driver on ControllerHandle by opening a Block IO and Disk IO\r
+  protocol, reading Device Path, and creating a child handle with a\r
+  Disk IO and device path protocol.\r
+\r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
+\r
+  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
+  @retval EFI_ALREADY_STARTED  This driver is already running on ControllerHandle\r
+  @retval other                This driver does not support this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PartitionDriverBindingStart (\r
@@ -167,24 +170,6 @@ PartitionDriverBindingStart (
   IN EFI_HANDLE                   ControllerHandle,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Start this driver on ControllerHandle by opening a Block IO and Disk IO\r
-    protocol, reading Device Path, and creating a child handle with a\r
-    Disk IO and device path protocol.\r
-\r
-  Arguments:\r
-    This                - Protocol instance pointer.\r
-    ControllerHandle    - Handle of device to bind driver to\r
-    RemainingDevicePath - Not used\r
-\r
-  Returns:\r
-    EFI_SUCCESS         - This driver is added to DeviceHandle\r
-    EFI_ALREADY_STARTED - This driver is already running on DeviceHandle\r
-    other               - This driver does not support this device\r
-\r
---*/\r
 {\r
   EFI_STATUS                Status;\r
   EFI_STATUS                OpenStatus;\r
@@ -289,6 +274,21 @@ PartitionDriverBindingStart (
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Stop this driver on ControllerHandle. Support stoping any child handles\r
+  created by this driver.\r
+\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PartitionDriverBindingStop (\r
@@ -297,23 +297,6 @@ PartitionDriverBindingStop (
   IN  UINTN                         NumberOfChildren,\r
   IN  EFI_HANDLE                    *ChildHandleBuffer\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Stop this driver on ControllerHandle. Support stoping any child handles\r
-    created by this driver.\r
-\r
-  Arguments:\r
-    This              - Protocol instance pointer.\r
-    ControllerHandle  - Handle of device to stop driver on\r
-    NumberOfChildren  - Number of Children in the ChildHandleBuffer\r
-    ChildHandleBuffer - List of handles for the children we need to stop.\r
-\r
-  Returns:\r
-    EFI_SUCCESS         - This driver is removed DeviceHandle\r
-    EFI_DEVICE_ERROR    - This driver was not removed from this device\r
-\r
---*/\r
 {\r
   EFI_STATUS              Status;\r
   UINTN                   Index;\r
@@ -407,6 +390,18 @@ PartitionDriverBindingStop (
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  Reset the Block Device.\r
+\r
+  @param  This                 Protocol instance pointer.\r
+  @param  ExtendedVerification Driver may perform diagnostics on reset.\r
+\r
+  @retval EFI_SUCCESS          The device was reset.\r
+  @retval EFI_DEVICE_ERROR     The device is not functioning properly and could\r
+                               not be reset.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 EFIAPI\r
@@ -414,21 +409,6 @@ PartitionReset (
   IN EFI_BLOCK_IO_PROTOCOL  *This,\r
   IN BOOLEAN                ExtendedVerification\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Reset the parent Block Device.\r
-\r
-  Arguments:\r
-    This                 - Protocol instance pointer.\r
-    ExtendedVerification - Driver may perform diagnostics on reset.\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The device was reset.\r
-    EFI_DEVICE_ERROR      - The device is not functioning properly and could\r
-                            not be reset.\r
-\r
---*/\r
 {\r
   PARTITION_PRIVATE_DATA  *Private;\r
 \r
@@ -440,6 +420,26 @@ PartitionReset (
                                   );\r
 }\r
 \r
+\r
+/**\r
+  Read by using the Disk IO protocol on the parent device. Lba addresses\r
+  must be converted to byte offsets.\r
+\r
+  @param  This       Protocol instance pointer.\r
+  @param  MediaId    Id of the media, changes every time the media is replaced.\r
+  @param  Lba        The starting Logical Block Address to read from\r
+  @param  BufferSize Size of Buffer, must be a multiple of device block size.\r
+  @param  Buffer     Buffer containing read data\r
+\r
+  @retval EFI_SUCCESS           The data was read correctly from the device.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error while performing the read.\r
+  @retval EFI_NO_MEDIA          There is no media in the device.\r
+  @retval EFI_MEDIA_CHANGED     The MediaId does not matched the current device.\r
+  @retval EFI_BAD_BUFFER_SIZE   The Buffer was not a multiple of the block size of the device.\r
+  @retval EFI_INVALID_PARAMETER The read request contains device addresses that are not\r
+                                valid for the device.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 EFIAPI\r
@@ -450,30 +450,6 @@ PartitionReadBlocks (
   IN UINTN                  BufferSize,\r
   OUT VOID                  *Buffer\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Read by using the Disk IO protocol on the parent device. Lba addresses\r
-    must be converted to byte offsets.\r
-\r
-  Arguments:\r
-    This       - Protocol instance pointer.\r
-    MediaId    - Id of the media, changes every time the media is replaced.\r
-    Lba        - The starting Logical Block Address to read from\r
-    BufferSize - Size of Buffer, must be a multiple of device block size.\r
-    Buffer     - Buffer containing read data\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The data was read correctly from the device.\r
-    EFI_DEVICE_ERROR      - The device reported an error while performing the read.\r
-    EFI_NO_MEDIA          - There is no media in the device.\r
-    EFI_MEDIA_CHANGED     - The MediaId does not matched the current device.\r
-    EFI_BAD_BUFFER_SIZE   - The Buffer was not a multiple of the block size of the\r
-                            device.\r
-    EFI_INVALID_PARAMETER - The read request contains device addresses that are not\r
-                            valid for the device.\r
-\r
---*/\r
 {\r
   PARTITION_PRIVATE_DATA  *Private;\r
   UINT64                  Offset;\r
@@ -496,6 +472,26 @@ PartitionReadBlocks (
   return Private->DiskIo->ReadDisk (Private->DiskIo, MediaId, Offset, BufferSize, Buffer);\r
 }\r
 \r
+/**\r
+  Write by using the Disk IO protocol on the parent device. Lba addresses\r
+  must be converted to byte offsets.\r
+\r
+  @param  This       Protocol instance pointer.\r
+  @param  MediaId    Id of the media, changes every time the media is replaced.\r
+  @param  Lba        The starting Logical Block Address to read from\r
+  @param  BufferSize Size of Buffer, must be a multiple of device block size.\r
+  @param  Buffer     Buffer containing read data\r
+\r
+  @retval EFI_SUCCESS           The data was written correctly to the device.\r
+  @retval EFI_WRITE_PROTECTED   The device can not be written to.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error while performing the write.\r
+  @retval EFI_NO_MEDIA          There is no media in the device.\r
+  @retval EFI_MEDIA_CHNAGED     The MediaId does not matched the current device.\r
+  @retval EFI_BAD_BUFFER_SIZE   The Buffer was not a multiple of the block size of the device.\r
+  @retval EFI_INVALID_PARAMETER The write request contains a LBA that is not\r
+                                valid for the device.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 EFIAPI\r
@@ -506,31 +502,6 @@ PartitionWriteBlocks (
   IN UINTN                  BufferSize,\r
   OUT VOID                  *Buffer\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Write by using the Disk IO protocol on the parent device. Lba addresses\r
-    must be converted to byte offsets.\r
-\r
-  Arguments:\r
-    This       - Protocol instance pointer.\r
-    MediaId    - Id of the media, changes every time the media is replaced.\r
-    Lba        - The starting Logical Block Address to read from\r
-    BufferSize - Size of Buffer, must be a multiple of device block size.\r
-    Buffer     - Buffer containing read data\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The data was written correctly to the device.\r
-    EFI_WRITE_PROTECTED   - The device can not be written to.\r
-    EFI_DEVICE_ERROR      - The device reported an error while performing the write.\r
-    EFI_NO_MEDIA          - There is no media in the device.\r
-    EFI_MEDIA_CHNAGED     - The MediaId does not matched the current device.\r
-    EFI_BAD_BUFFER_SIZE   - The Buffer was not a multiple of the block size of the\r
-                            device.\r
-    EFI_INVALID_PARAMETER - The write request contains a LBA that is not\r
-                            valid for the device.\r
-\r
---*/\r
 {\r
   PARTITION_PRIVATE_DATA  *Private;\r
   UINT64                  Offset;\r
@@ -553,26 +524,23 @@ PartitionWriteBlocks (
   return Private->DiskIo->WriteDisk (Private->DiskIo, MediaId, Offset, BufferSize, Buffer);\r
 }\r
 \r
+\r
+/**\r
+  Flush the parent Block Device.\r
+\r
+  @param  This              Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS       All outstanding data was written to the device\r
+  @retval EFI_DEVICE_ERROR  The device reported an error while writting back the data\r
+  @retval EFI_NO_MEDIA      There is no media in the device.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 EFIAPI\r
 PartitionFlushBlocks (\r
   IN EFI_BLOCK_IO_PROTOCOL  *This\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Flush the parent Block Device.\r
-\r
-  Arguments:\r
-    This             - Protocol instance pointer.\r
-\r
-  Returns:\r
-    EFI_SUCCESS      - All outstanding data was written to the device\r
-    EFI_DEVICE_ERROR - The device reported an error while writing back the data\r
-    EFI_NO_MEDIA     - There is no media in the device.\r
-\r
---*/\r
 {\r
   PARTITION_PRIVATE_DATA  *Private;\r
 \r
@@ -581,6 +549,28 @@ PartitionFlushBlocks (
   return Private->ParentBlockIo->FlushBlocks (Private->ParentBlockIo);\r
 }\r
 \r
+\r
+\r
+/**\r
+  Create a child handle for a logical block device that represents the\r
+  bytes Start to End of the Parent Block IO device.\r
+\r
+  @param[in]  This              Protocol instance pointer.\r
+  @param[in]  This              Calling context.\r
+  @param[in]  ParentHandle      Parent Handle for new child\r
+  @param[in]  ParentDiskIo      Parent DiskIo interface\r
+  @param[in]  ParentBlockIo     Parent BlockIo interface\r
+  @param[in]  ParentDevicePath  Parent Device Path\r
+  @param[in]  DevicePathNode    Child Device Path node\r
+  @param[in]  Start             Start Block\r
+  @param[in]  End               End Block\r
+  @param[in]  BlockSize         Child block size\r
+  @param[in]  InstallEspGuid    Flag to install EFI System Partition GUID on handle\r
+\r
+  @retval EFI_SUCCESS       A child handle was added\r
+  @retval other             A child handle was not added\r
+\r
+**/\r
 EFI_STATUS\r
 PartitionInstallChildHandle (\r
   IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
@@ -594,29 +584,6 @@ PartitionInstallChildHandle (
   IN  UINT32                       BlockSize,\r
   IN  BOOLEAN                      InstallEspGuid\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Create a child handle for a logical block device that represents the\r
-  bytes Start to End of the Parent Block IO device.\r
-\r
-Arguments:\r
-  This             - Calling context.\r
-  ParentHandle     - Parent Handle for new child\r
-  ParentDiskIo     - Parent DiskIo interface\r
-  ParentBlockIo    - Parent BlockIo interface\r
-  ParentDevicePath - Parent Device Path\r
-  DevicePathNode   - Child Device Path node\r
-  Start            - Start Block\r
-  End              - End Block\r
-  BlockSize        - Child block size\r
-  InstallEspGuid   - Flag to install EFI System Partition GUID on handle\r
-\r
-Returns:\r
-  EFI_SUCCESS - If a child handle was added\r
-  EFI_OUT_OF_RESOURCES  - A child handle was not added\r
-\r
---*/\r
 {\r
   EFI_STATUS              Status;\r
   PARTITION_PRIVATE_DATA  *Private;\r
@@ -704,3 +671,42 @@ Returns:
 \r
   return Status;\r
 }\r
+\r
+\r
+/**\r
+  The user Entry Point for module Partition. The user code starts with this function.\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
+  \r
+  @retval EFI_SUCCESS       The entry point is executed successfully.\r
+  @retval other             Some error occurs when executing this entry point.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+InitializePartition (\r
+  IN EFI_HANDLE           ImageHandle,\r
+  IN EFI_SYSTEM_TABLE     *SystemTable\r
+  )\r
+{\r
+  EFI_STATUS              Status;\r
+\r
+  //\r
+  // Install driver model protocol(s).\r
+  //\r
+  Status = EfiLibInstallAllDriverProtocols (\r
+             ImageHandle,\r
+             SystemTable,\r
+             &gPartitionDriverBinding,\r
+             ImageHandle,\r
+             &gPartitionComponentName,\r
+             NULL,\r
+             NULL\r
+             );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+\r
+  return Status;\r
+}\r
+\r
index 90478a551349d80f79f8e61ba538c07372732246..469c94815789bc253e30eb96065c3f659b02a697 100644 (file)
@@ -1,36 +1,42 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation\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
-Module Name:\r
-\r
-  Partition.h\r
-  \r
-Abstract:\r
-\r
+/** @file\r
   Partition driver that produces logical BlockIo devices from a physical \r
   BlockIo device. The logical BlockIo devices are based on the format\r
   of the raw block devices media. Currently "El Torito CD-ROM", Legacy \r
   MBR, and GPT partition schemes are supported.\r
 \r
-Revision History\r
-\r
---*/\r
-\r
-#ifndef __PARTITION_H__\r
-#define __PARTITION_H__\r
+  Copyright (c) 2006 - 2007, Intel Corporation                                              \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
+#include <Uefi.h>\r
+#include <Protocol/BlockIo.h>\r
+#include <Guid/Gpt.h>\r
+#include <Protocol/ComponentName.h>\r
+#include <Protocol/DevicePath.h>\r
+#include <Protocol/DriverBinding.h>\r
+#include <Protocol/DiskIo.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/BaseLib.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/DevicePathLib.h>\r
 \r
 //\r
-// Include common header file for this module.\r
+// Driver Binding Externs\r
 //\r
-#include "CommonHeader.h"\r
+extern EFI_DRIVER_BINDING_PROTOCOL gPartitionDriverBinding;\r
+extern EFI_COMPONENT_NAME_PROTOCOL gPartitionComponentName;\r
 \r
 #include <IndustryStandard/Mbr.h>\r
 #include <IndustryStandard/ElTorito.h>\r
@@ -186,4 +192,3 @@ EFI_STATUS
   IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath\r
   );\r
 \r
-#endif\r
index 832de945c174ee93bb4a500bb3274eff5831d52c..1e00fccfd6898ded261b32cc6aa1fe9fc2a3bbf5 100644 (file)
@@ -5,12 +5,13 @@
 #  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
-# Copyright (c) 2006 - 2007, Intel Corporation\r
 #\r
+#  Copyright (c) 2006 - 2007, Intel Corporation\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
@@ -55,8 +56,6 @@
   ElTorito.c\r
   Partition.c\r
   Partition.h\r
-  CommonHeader.h\r
-  EntryPoint.c\r
 \r
 \r
 ################################################################################\r
@@ -67,7 +66,7 @@
 ################################################################################\r
 \r
 [Includes]\r
-  $(WORKSPACE)/MdePkg\Include/Library\r
+  $(WORKSPACE)/MdePkg/Include/Library\r
 \r
 ################################################################################\r
 #\r
index 37dfad8cd8648ded8957c3f2443797d4b0685dde..2eb325ec56148fc124c0d944148a1701ba2f839c 100644 (file)
@@ -1,28 +1,17 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation                                                         \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
-Module Name:\r
-\r
-  SecurityStub.c\r
-\r
-Abstract:\r
+/** @file\r
+  This driver supports platform security service.\r
   \r
-  This driver supports platform security service\r
+  Copyright (c) 2006 - 2007, Intel Corporation                                              \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
---*/\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
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
 \r
 #include "SecurityStub.h"\r
 \r
@@ -38,20 +27,8 @@ EFI_SECURITY_ARCH_PROTOCOL  mSecurityStub = {
   SecurityStubAuthenticateState \r
 };\r
 \r
-//\r
-// Worker functions\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-SecurityStubAuthenticateState (\r
-  IN EFI_SECURITY_ARCH_PROTOCOL  *This,\r
-  IN UINT32                      AuthenticationStatus,\r
-  IN EFI_DEVICE_PATH_PROTOCOL    *File\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   The EFI_SECURITY_ARCH_PROTOCOL (SAP) is used to abstract platform-specific \r
   policy from the DXE core response to an attempt to use a file that returns a \r
   given status for the authentication check from the section extraction protocol.  \r
@@ -75,35 +52,34 @@ Routine Description:
   might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is \r
   returned.\r
 \r
-Arguments:\r
-\r
-  This                 - The EFI_SECURITY_ARCH_PROTOCOL instance.\r
-\r
-  AuthenticationStatus - This is the authentication type returned from the Section \r
-                         Extraction protocol.  See the Section Extraction Protocol \r
-                         Specification for details on this type.\r
-\r
-  File                 - This is a pointer to the device path of the file that is \r
-                         being dispatched.  This will optionally be used for logging.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS            - The file specified by File did authenticate, and the \r
-                           platform policy dictates that the DXE Core may use File.\r
-\r
-  EFI_INVALID_PARAMETER  - File is NULL.\r
-\r
-  EFI_SECURITY_VIOLATION - The file specified by File did not authenticate, and \r
-                           the platform policy dictates that File should be placed \r
-                           in the untrusted state.   A file may be promoted from \r
-                           the untrusted to the trusted state at a future time \r
-                           with a call to the Trust() DXE Service.\r
-\r
-  EFI_ACCESS_DENIED      - The file specified by File did not authenticate, and \r
-                           the platform policy dictates that File should not be \r
-                           used for any purpose. \r
-\r
---*/\r
+  @param  This             The EFI_SECURITY_ARCH_PROTOCOL instance.\r
+  @param  AuthenticationStatus \r
+                           This is the authentication type returned from the Section\r
+                           Extraction protocol. See the Section Extraction Protocol\r
+                           Specification for details on this type.\r
+  @param  File             This is a pointer to the device path of the file that is\r
+                           being dispatched. This will optionally be used for logging.\r
+\r
+  @retval EFI_SUCCESS           The file specified by File did authenticate, and the\r
+                                platform policy dictates that the DXE Core may use File.\r
+  @retval EFI_INVALID_PARAMETER Driver is NULL.\r
+  @retval EFI_SECURITY_VIOLATION The file specified by File did not authenticate, and\r
+                                the platform policy dictates that File should be placed\r
+                                in the untrusted state. A file may be promoted from\r
+                                the untrusted to the trusted state at a future time\r
+                                with a call to the Trust() DXE Service.\r
+  @retval EFI_ACCESS_DENIED     The file specified by File did not authenticate, and\r
+                                the platform policy dictates that File should not be\r
+                                used for any purpose.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SecurityStubAuthenticateState (\r
+  IN EFI_SECURITY_ARCH_PROTOCOL  *This,\r
+  IN UINT32                      AuthenticationStatus,\r
+  IN EFI_DEVICE_PATH_PROTOCOL    *File\r
+  )\r
 {\r
   if (File == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -112,32 +88,25 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  The user Entry Point for DXE driver. The user code starts with this function\r
+  as the real entry point for the image goes into a library that calls this \r
+  function.\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
+  \r
+  @retval EFI_SUCCESS       The entry point is executed successfully.\r
+  @retval other             Some error occurs when executing this entry point.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 SecurityStubInitialize (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the state information for the Security Architectural Protocol\r
-\r
-Arguments:\r
-\r
-  ImageHandle of the loaded driver\r
-  Pointer to the System Table\r
-\r
-Returns:\r
-\r
-  Status\r
-\r
-  EFI_SUCCESS           - successful installation of the service\r
-  EFI_OUT_OF_RESOURCES  - cannot allocate protocol data structure\r
-  EFI_DEVICE_ERROR      - cannot create the timer service\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
 \r
index 2f4d92233a6b65be0d15eaf2234e33657e3c1baf..e94015d4e3cb4f86559f27b4f7965e3d88531c76 100644 (file)
@@ -23,11 +23,14 @@ Abstract:
 #define _SECURITY_STUB_ARCH_PROTOCOL_H\r
 \r
 \r
-\r
 //\r
-// Include common header file for this module.\r
+// Common header files for this module.\r
 //\r
-#include "CommonHeader.h"\r
+#include <PiDxe.h>\r
+#include <Protocol/Security.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
 \r
 //\r
 // Function prototypes\r
index bd9058374a71d9f65bd3593c76dbb19bb5a426d4..ec17ceacf809116109129d2d8c6337b405e5965b 100644 (file)
@@ -1,13 +1,12 @@
 #/** @file\r
-# Component description file for SecurityStub module\r
-#\r
-# This driver supports platform security service.\r
-# Copyright (c) 2006 - 2007, Intel Corporation\r
+#  Component description file for SecurityStub module\r
 #\r
+#  Copyright (c) 2006 - 2007, Intel Corporation\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
@@ -46,7 +45,6 @@
   SecurityStub.c\r
   SecurityStub.h\r
   SecurityStub.dxs\r
-  CommonHeader.h\r
 \r
 \r
 ################################################################################\r
@@ -57,7 +55,7 @@
 ################################################################################\r
 \r
 [Includes]\r
-  $(WORKSPACE)/MdePkg\Include/Library\r
+  $(WORKSPACE)/MdePkg/Include/Library\r
 \r
 ################################################################################\r
 #\r