]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Clean up Runtime for Doxygen comments requirement.
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 14 Jul 2008 05:43:37 +0000 (05:43 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 14 Jul 2008 05:43:37 +0000 (05:43 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5460 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/RuntimeDxe/Crc32.c
MdeModulePkg/Core/RuntimeDxe/Runtime.c
MdeModulePkg/Core/RuntimeDxe/Runtime.h

index 0e7e793365d2f1f5096e32c845b54747c763e0dd..0f22d1f6b7e598916d87c04d678bc113a8069cfe 100644 (file)
@@ -31,7 +31,7 @@ UINT32  mCrcTable[256];
 /**\r
   Calculate CRC32 for target data.\r
 \r
-  @param  Len                   The target data.\r
+  @param  Data                  The target data.\r
   @param  DataSize              The target data size.\r
   @param  CrcOut                The CRC32 for target data.\r
 \r
@@ -68,13 +68,13 @@ RuntimeDriverCalculateCrc32 (
 \r
 /**\r
   Reverse bits for 32bit data.\r
+  This is a internal function.\r
 \r
   @param  Value                 The data to be reversed.\r
 \r
-  @retrun                       Data reversed.\r
+  @return                       Data reversed.\r
 \r
 **/\r
-STATIC\r
 UINT32\r
 ReverseBits (\r
   UINT32  Value\r
@@ -85,7 +85,7 @@ ReverseBits (
 \r
   NewValue = 0;\r
   for (Index = 0; Index < 32; Index++) {\r
-    if (Value & (1 << Index)) {\r
+    if ((Value & (1 << Index)) != 0) {\r
       NewValue = NewValue | (1 << (31 - Index));\r
     }\r
   }\r
@@ -95,11 +95,6 @@ ReverseBits (
 \r
 /**\r
   Initialize CRC32 table.\r
-\r
-  @param  None\r
-\r
-  @retrun None\r
-\r
 **/\r
 VOID\r
 RuntimeDriverInitializeCrc32Table (\r
@@ -113,7 +108,7 @@ RuntimeDriverInitializeCrc32Table (
   for (TableEntry = 0; TableEntry < 256; TableEntry++) {\r
     Value = ReverseBits ((UINT32) TableEntry);\r
     for (Index = 0; Index < 8; Index++) {\r
-      if (Value & 0x80000000) {\r
+      if ((Value & 0x80000000) != 0) {\r
         Value = (Value << 1) ^ 0x04c11db7;\r
       } else {\r
         Value = Value << 1;\r
index efd7dec05cfdfc6d95c28816ccb09268fdbbf43e..6abe54668e5d1f3bb3520231cbcea1bfc91d0a4e 100644 (file)
@@ -1,21 +1,6 @@
 /** @file\r
   Runtime Architectural Protocol as defined in the DXE CIS.\r
 \r
-Copyright (c) 2006, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-Module Name:\r
-\r
-  Runtime.c\r
-\r
-Abstract:\r
-\r
   This code is used to produce the EFI runtime virtual switch over\r
 \r
   THIS IS VERY DANGEROUS CODE BE VERY CAREFUL IF YOU CHANGE IT\r
@@ -48,6 +33,16 @@ Revision History:
   Runtime Arch Protocol definition no longer contains CalculateCrc32. Boot Service\r
   Table now contains an item named CalculateCrc32.\r
 \r
+\r
+Copyright (c) 2006, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
 **/\r
 \r
 #include "Runtime.h"\r
@@ -89,28 +84,21 @@ EFI_RUNTIME_ARCH_PROTOCOL     mRuntime = {
 //\r
 // Worker Functions\r
 //\r
-STATIC\r
-VOID\r
-RuntimeDriverCalculateEfiHdrCrc (\r
-  IN OUT EFI_TABLE_HEADER  *Hdr\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Calcualte the 32-bit CRC in a EFI table using the Runtime Drivers\r
   internal function.  The EFI Boot Services Table can not be used because\r
-  the EFI Boot Services Table was destroyed at ExitBootServices()\r
-\r
-Arguments:\r
-\r
-  Hdr  - Pointer to an EFI standard header\r
+  the EFI Boot Services Table was destroyed at ExitBootServices().\r
+  This is a internal function.\r
 \r
-Returns:\r
 \r
-  None\r
+  @param Hdr             Pointer to an EFI standard header\r
 \r
---*/\r
+**/\r
+VOID\r
+RuntimeDriverCalculateEfiHdrCrc (\r
+  IN OUT EFI_TABLE_HEADER  *Hdr\r
+  )\r
 {\r
   UINT32  Crc;\r
 \r
@@ -121,32 +109,27 @@ Returns:
   Hdr->CRC32 = Crc;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-RuntimeDriverConvertPointer (\r
-  IN     UINTN  DebugDisposition,\r
-  IN OUT VOID   **ConvertAddress\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Determines the new virtual address that is to be used on subsequent memory accesses.\r
 \r
-Arguments:\r
-\r
-  DebugDisposition    - Supplies type information for the pointer being converted.\r
-  ConvertAddress      - A pointer to a pointer that is to be fixed to be the value needed\r
-                        for the new virtual address mappings being applied.\r
 \r
-Returns:\r
+  @param DebugDisposition Supplies type information for the pointer being converted.\r
+  @param ConvertAddress  A pointer to a pointer that is to be fixed to be the value needed\r
+                         for the new virtual address mappings being applied.\r
 \r
-  EFI_SUCCESS             - The pointer pointed to by Address was modified.\r
-  EFI_NOT_FOUND           - The pointer pointed to by Address was not found to be part\r
-                            of the current memory map. This is normally fatal.\r
-  EFI_INVALID_PARAMETER   - One of the parameters has an invalid value.\r
+  @retval  EFI_SUCCESS              The pointer pointed to by Address was modified.\r
+  @retval  EFI_NOT_FOUND            The pointer pointed to by Address was not found to be part\r
+                                    of the current memory map. This is normally fatal.\r
+  @retval  EFI_INVALID_PARAMETER    One of the parameters has an invalid value.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+RuntimeDriverConvertPointer (\r
+  IN     UINTN  DebugDisposition,\r
+  IN OUT VOID   **ConvertAddress\r
+  )\r
 {\r
   UINTN                 Address;\r
   UINT64                VirtEndOfRange;\r
@@ -168,7 +151,7 @@ Returns:
   // If this is a null pointer, return if it's allowed\r
   //\r
   if (Address == 0) {\r
-    if (DebugDisposition & EFI_OPTIONAL_POINTER) {\r
+    if ((DebugDisposition & EFI_OPTIONAL_POINTER) != 0) {\r
       return EFI_SUCCESS;\r
     }\r
 \r
@@ -204,35 +187,51 @@ Returns:
   return EFI_NOT_FOUND;\r
 }\r
 \r
-STATIC\r
-EFI_STATUS\r
-RuntimeDriverConvertInternalPointer (\r
-  IN OUT VOID   **ConvertAddress\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Determines the new virtual address that is to be used on subsequent memory accesses\r
   for internal pointers.\r
+  This is a internal function.\r
 \r
-Arguments:\r
 \r
-  ConvertAddress  - A pointer to a pointer that is to be fixed to be the value needed\r
-                    for the new virtual address mappings being applied.\r
+  @param ConvertAddress  A pointer to a pointer that is to be fixed to be the value needed\r
+                         for the new virtual address mappings being applied.\r
 \r
-Returns:\r
+  @retval  EFI_SUCCESS              The pointer pointed to by Address was modified.\r
+  @retval  EFI_NOT_FOUND            The pointer pointed to by Address was not found to be part\r
+                                    of the current memory map. This is normally fatal.\r
+  @retval  EFI_INVALID_PARAMETER    One of the parameters has an invalid value.\r
 \r
-  EFI_SUCCESS             - The pointer pointed to by Address was modified.\r
-  EFI_NOT_FOUND           - The pointer pointed to by Address was not found to be part\r
-                            of the current memory map. This is normally fatal.\r
-  EFI_INVALID_PARAMETER   - One of the parameters has an invalid value.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+RuntimeDriverConvertInternalPointer (\r
+  IN OUT VOID   **ConvertAddress\r
+  )\r
 {\r
   return RuntimeDriverConvertPointer (0x0, ConvertAddress);\r
 }\r
 \r
+/**\r
+\r
+  Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
+\r
+\r
+  @param MemoryMapSize   The size in bytes of VirtualMap.\r
+  @param DescriptorSize  The size in bytes of an entry in the VirtualMap.\r
+  @param DescriptorVersion The version of the structure entries in VirtualMap.\r
+  @param VirtualMap      An array of memory descriptors which contain new virtual\r
+                         address mapping information for all runtime ranges.\r
+\r
+  @retval  EFI_SUCCESS            The virtual address map has been applied.\r
+  @retval  EFI_UNSUPPORTED        EFI firmware is not at runtime, or the EFI firmware is already in\r
+                                  virtual address mapped mode.\r
+  @retval  EFI_INVALID_PARAMETER  DescriptorSize or DescriptorVersion is invalid.\r
+  @retval  EFI_NO_MAPPING         A virtual address was not supplied for a range in the memory\r
+                                  map that requires a mapping.\r
+  @retval  EFI_NOT_FOUND          A virtual address was supplied for an address that is not found\r
+                                  in the memory map.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RuntimeDriverSetVirtualAddressMap (\r
@@ -241,32 +240,6 @@ RuntimeDriverSetVirtualAddressMap (
   IN UINT32                 DescriptorVersion,\r
   IN EFI_MEMORY_DESCRIPTOR  *VirtualMap\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
-\r
-Arguments:\r
-\r
-  MemoryMapSize     - The size in bytes of VirtualMap.\r
-  DescriptorSize    - The size in bytes of an entry in the VirtualMap.\r
-  DescriptorVersion - The version of the structure entries in VirtualMap.\r
-  VirtualMap        - An array of memory descriptors which contain new virtual\r
-                      address mapping information for all runtime ranges.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The virtual address map has been applied.\r
-  EFI_UNSUPPORTED       - EFI firmware is not at runtime, or the EFI firmware is already in\r
-                          virtual address mapped mode.\r
-  EFI_INVALID_PARAMETER - DescriptorSize or DescriptorVersion is invalid.\r
-  EFI_NO_MAPPING        - A virtual address was not supplied for a range in the memory\r
-                          map that requires a mapping.\r
-  EFI_NOT_FOUND         - A virtual address was supplied for an address that is not found\r
-                          in the memory map.\r
-\r
---*/\r
 {\r
   EFI_STATUS                    Status;\r
   EFI_RUNTIME_EVENT_ENTRY       *RuntimeEvent;\r
@@ -388,29 +361,26 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-RuntimeDriverInitialize (\r
-  IN EFI_HANDLE                            ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                      *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   Install Runtime AP. This code includes the EfiDriverLib, but it functions at\r
   RT in physical mode. The only Lib services are gBS, gRT, and the DEBUG and\r
   ASSERT macros (they do ReportStatusCode).\r
 \r
-Arguments:\r
-  (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)\r
 \r
-Returns:\r
+  @param ImageHandle     Image handle of this driver.\r
+  @param SystemTable     Pointer to the EFI System Table.\r
 \r
-  EFI_SUCEESS - Runtime Driver Architectural Protocol Installed\r
+  @retval  EFI_SUCEESS  Runtime Driver Architectural Protocol Installed\r
+  @return  Other value if gBS->InstallMultipleProtocolInterfaces fails. Check\r
+           gBS->InstallMultipleProtocolInterfaces for details.\r
 \r
-  Other       - Return value from gBS->InstallMultipleProtocolInterfaces\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+RuntimeDriverInitialize (\r
+  IN EFI_HANDLE                            ImageHandle,\r
+  IN EFI_SYSTEM_TABLE                      *SystemTable\r
+  )\r
 {\r
   EFI_STATUS                Status;\r
   EFI_LOADED_IMAGE_PROTOCOL *MyLoadedImage;\r
index 4ff21ea5b68fb6c7a727ff6d1da83cc5399fbd0a..e85c47d9b111ba4a83f51964357d53cb30f794cc 100644 (file)
@@ -42,6 +42,20 @@ Abstract:
 //\r
 // Function Prototypes\r
 //\r
+/**\r
+\r
+  Calculate CRC32 for target data\r
+\r
+\r
+  @param Data            The target data.\r
+  @param DataSize        The target data size.\r
+  @param CrcOut          The CRC32 for target data.\r
+\r
+  @retval  EFI_SUCCESS            The CRC32 for target data is calculated successfully.\r
+  @retval  EFI_INVALID_PARAMETER  Some parameter is not valid, so the CRC32 is not\r
+                                  calculated.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RuntimeDriverCalculateCrc32 (\r
@@ -49,55 +63,52 @@ RuntimeDriverCalculateCrc32 (
   IN  UINTN   DataSize,\r
   OUT UINT32  *CrcOut\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Calculate CRC32 for target data\r
+;\r
 \r
-Arguments:\r
+/**\r
 \r
-  Data     - The target data.\r
-  DataSize - The target data size.\r
-  CrcOut   - The CRC32 for target data.\r
+  Determines the new virtual address that is to be used on subsequent memory accesses.\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS           - The CRC32 for target data is calculated successfully.\r
-  EFI_INVALID_PARAMETER - Some parameter is not valid, so the CRC32 is not\r
-                          calculated.\r
+  @param DebugDisposition Supplies type information for the pointer being converted.\r
+  @param ConvertAddress  A pointer to a pointer that is to be fixed to be the value needed\r
+                         for the new virtual address mappings being applied.\r
 \r
---*/\r
-;\r
+  @retval  EFI_SUCCESS              The pointer pointed to by Address was modified.\r
+  @retval  EFI_NOT_FOUND            The pointer pointed to by Address was not found to be part\r
+                                    of the current memory map. This is normally fatal.\r
+  @retval  EFI_INVALID_PARAMETER    One of the parameters has an invalid value.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RuntimeDriverConvertPointer (\r
   IN     UINTN  DebugDisposition,\r
   IN OUT VOID   **ConvertAddress\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Determines the new virtual address that is to be used on subsequent memory accesses.\r
+;\r
 \r
-Arguments:\r
+/**\r
 \r
-  DebugDisposition    - Supplies type information for the pointer being converted.\r
-  ConvertAddress      - A pointer to a pointer that is to be fixed to be the value needed\r
-                        for the new virtual address mappings being applied.\r
+  Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS             - The pointer pointed to by Address was modified.\r
-  EFI_NOT_FOUND           - The pointer pointed to by Address was not found to be part\r
-                            of the current memory map. This is normally fatal.\r
-  EFI_INVALID_PARAMETER   - One of the parameters has an invalid value.\r
+  @param MemoryMapSize   The size in bytes of VirtualMap.\r
+  @param DescriptorSize  The size in bytes of an entry in the VirtualMap.\r
+  @param DescriptorVersion The version of the structure entries in VirtualMap.\r
+  @param VirtualMap      An array of memory descriptors which contain new virtual\r
+                         address mapping information for all runtime ranges.\r
 \r
---*/\r
-;\r
+  @retval  EFI_SUCCESS            The virtual address map has been applied.\r
+  @retval  EFI_UNSUPPORTED        EFI firmware is not at runtime, or the EFI firmware is already in\r
+                                  virtual address mapped mode.\r
+  @retval  EFI_INVALID_PARAMETER  DescriptorSize or DescriptorVersion is invalid.\r
+  @retval  EFI_NO_MAPPING         A virtual address was not supplied for a range in the memory\r
+                                  map that requires a mapping.\r
+  @retval  EFI_NOT_FOUND          A virtual address was supplied for an address that is not found\r
+                                  in the memory map.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RuntimeDriverSetVirtualAddressMap (\r
@@ -106,78 +117,39 @@ RuntimeDriverSetVirtualAddressMap (
   IN UINT32                 DescriptorVersion,\r
   IN EFI_MEMORY_DESCRIPTOR  *VirtualMap\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
-\r
-Arguments:\r
-\r
-  MemoryMapSize     - The size in bytes of VirtualMap.\r
-  DescriptorSize    - The size in bytes of an entry in the VirtualMap.\r
-  DescriptorVersion - The version of the structure entries in VirtualMap.\r
-  VirtualMap        - An array of memory descriptors which contain new virtual\r
-                      address mapping information for all runtime ranges.\r
-\r
-Returns:\r
+;\r
 \r
-  EFI_SUCCESS           - The virtual address map has been applied.\r
-  EFI_UNSUPPORTED       - EFI firmware is not at runtime, or the EFI firmware is already in\r
-                          virtual address mapped mode.\r
-  EFI_INVALID_PARAMETER - DescriptorSize or DescriptorVersion is invalid.\r
-  EFI_NO_MAPPING        - A virtual address was not supplied for a range in the memory\r
-                          map that requires a mapping.\r
-  EFI_NOT_FOUND         - A virtual address was supplied for an address that is not found\r
-                          in the memory map.\r
+/**\r
 \r
---*/\r
-;\r
+  Initialize CRC32 table.\r
 \r
+**/\r
 VOID\r
 RuntimeDriverInitializeCrc32Table (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize CRC32 table.\r
+;\r
 \r
-Arguments:\r
+/**\r
 \r
-  None.\r
+  Install Runtime AP. This code includes the EfiRuntimeLib, but it only\r
+  functions at RT in physical mode.\r
 \r
-Returns:\r
 \r
-  None.\r
+  @param ImageHandle     Image handle of this driver.\r
+  @param SystemTable     Pointer to the EFI System Table.\r
 \r
---*/\r
-;\r
+  @retval  EFI_SUCEESS  Runtime Driver Architectural Protocol Installed\r
+  @return  Other value if gBS->InstallMultipleProtocolInterfaces fails. Check\r
+           gBS->InstallMultipleProtocolInterfaces for details.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RuntimeDriverInitialize (\r
   IN EFI_HANDLE                            ImageHandle,\r
   IN EFI_SYSTEM_TABLE                      *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Install Runtime AP. This code includes the EfiRuntimeLib, but it only\r
-  functions at RT in physical mode.\r
-\r
-Arguments:\r
-\r
-  ImageHandle   - Image handle of this driver.\r
-  SystemTable   - Pointer to the EFI System Table.\r
-\r
-Returns:\r
-\r
-  EFI_SUCEESS - Runtime Driver Architectural Protocol installed.\r
-\r
---*/\r
 ;\r
 \r
 #endif\r