]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmMtlNullLib/ArmMtlNullLib.c
ArmPkg: MTL Library interface and Null library implementation
[mirror_edk2.git] / ArmPkg / Library / ArmMtlNullLib / ArmMtlNullLib.c
diff --git a/ArmPkg/Library/ArmMtlNullLib/ArmMtlNullLib.c b/ArmPkg/Library/ArmMtlNullLib/ArmMtlNullLib.c
new file mode 100644 (file)
index 0000000..f186237
--- /dev/null
@@ -0,0 +1,108 @@
+/** @file\r
+\r
+  Copyright (c) 2017-2018, Arm Limited. All rights reserved.\r
+\r
+  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
+  System Control and Management Interface V1.0\r
+    http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/\r
+    DEN0056A_System_Control_and_Management_Interface.pdf\r
+**/\r
+\r
+#include <Library/ArmMtlLib.h>\r
+#include <Library/DebugLib.h>\r
+\r
+/** Wait until channel is free.\r
+\r
+  @param[in] Channel                Pointer to a channel.\r
+  @param[in] TimeOutInMicroSeconds  Timeout in micro seconds.\r
+\r
+  @retval EFI_UNSUPPORTED           Interface not implemented.\r
+**/\r
+EFI_STATUS\r
+MtlWaitUntilChannelFree (\r
+  IN MTL_CHANNEL  *Channel,\r
+  IN UINTN        TimeOutInMicroSeconds\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+/** Return the address of the message payload.\r
+\r
+  @param[in] Channel   Pointer to a channel.\r
+\r
+  @retval UINT32*      Pointer to the payload.\r
+**/\r
+UINT32*\r
+MtlGetChannelPayload (\r
+  IN  MTL_CHANNEL  *Channel\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return NULL;\r
+}\r
+\r
+/** Return pointer to a channel for the requested channel type.\r
+\r
+  @param[in] ChannelType        ChannelType, Low or High priority channel.\r
+                                MTL_CHANNEL_TYPE_LOW or\r
+                                MTL_CHANNEL_TYPE_HIGH\r
+\r
+  @param[out] Channel           Holds pointer to the channel.\r
+\r
+  @retval EFI_UNSUPPORTED       Requested channel type not supported or\r
+                                interface not implemented.\r
+**/\r
+EFI_STATUS\r
+MtlGetChannel (\r
+  IN  MTL_CHANNEL_TYPE  ChannelType,\r
+  OUT MTL_CHANNEL       **Channel\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+/** Mark the channel busy and ring the doorbell.\r
+\r
+  @param[in] Channel               Pointer to a channel.\r
+  @param[in] MessageHeader         Message header.\r
+\r
+  @param[out] PayloadLength        Message length.\r
+\r
+  @retval EFI_UNSUPPORTED          Interface not implemented.\r
+**/\r
+EFI_STATUS\r
+MtlSendMessage (\r
+  IN  MTL_CHANNEL  *Channel,\r
+  IN  UINT32       MessageHeader,\r
+  OUT UINT32       PayloadLength\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+/** Wait for a response on a channel.\r
+\r
+  If channel is free after sending message, it implies SCP responded\r
+  with a response on the channel.\r
+\r
+  @param[in] Channel               Pointer to a channel.\r
+\r
+  @retval EFI_UNSUPPORTED          Interface not implemented.\r
+**/\r
+EFI_STATUS\r
+MtlReceiveMessage (\r
+  IN  MTL_CHANNEL  *Channel,\r
+  OUT UINT32       *MessageHeader,\r
+  OUT UINT32       *PayloadLength\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r