]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/RuntimeDxe/Runtime.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Core / RuntimeDxe / Runtime.h
index f9e4f1d3751e22341732576ba2b7f88317b60efb..019a0cb140e5a8737ce91bbe06a78fafe96808c7 100644 (file)
-/*++\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
-  Runtime.h\r
-\r
-Abstract:\r
-\r
-  Runtime Architectural Protocol as defined in the DXE CIS\r
+/** @file\r
+  Runtime Architectural Protocol as defined in the DXE CIS.\r
 \r
   This code is used to produce the EFI runtime architectural protocol.\r
 \r
---*/\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
 \r
 #ifndef _RUNTIME_H_\r
 #define _RUNTIME_H_\r
 \r
 #include <PiDxe.h>\r
-#include <Guid/CapsuleInfo.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/Runtime.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiLib.h>\r
 #include <Library/CacheMaintenanceLib.h>\r
 #include <Library/PeCoffLib.h>\r
-#include <Library/PcdLib.h>\r
 \r
 \r
 //\r
 // Function Prototypes\r
 //\r
+/**\r
+  Calculate CRC32 for target data.\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
   IN  VOID    *Data,\r
   IN  UINTN   DataSize,\r
   OUT UINT32  *CrcOut\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Calculate CRC32 for target data\r
-\r
-Arguments:\r
+  );\r
 \r
-  Data     - The target data.\r
-  DataSize - The target data size.\r
-  CrcOut   - The CRC32 for target data.\r
+/**\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
-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
 \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
-\r
---*/\r
-;\r
+/**\r
+  Changes the runtime addressing mode of EFI firmware from physical to virtual.\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
@@ -106,79 +95,25 @@ RuntimeDriverSetVirtualAddressMap (
   IN UINTN                  DescriptorSize,\r
   IN UINT32                 DescriptorVersion,\r
   IN EFI_MEMORY_DESCRIPTOR  *VirtualMap\r
-  )\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
-\r
-VOID\r
-RuntimeDriverInitializeCrc32Table (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize CRC32 table.\r
-\r
-Arguments:\r
-\r
-  None.\r
-\r
-Returns:\r
+/**\r
+  Install Runtime AP. This code includes the EfiRuntimeLib, but it only\r
+  functions at RT in physical mode.\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
 \r
 #endif\r