]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/Library/AcpiViewCommandLib.h
ShellPkg: Add AcpiViewCommandLib
[mirror_edk2.git] / ShellPkg / Include / Library / AcpiViewCommandLib.h
diff --git a/ShellPkg/Include/Library/AcpiViewCommandLib.h b/ShellPkg/Include/Library/AcpiViewCommandLib.h
new file mode 100644 (file)
index 0000000..11cf96c
--- /dev/null
@@ -0,0 +1,46 @@
+/** @file\r
+  Library providing 'acpiview' functionality to display and\r
+  validate installed ACPI tables.\r
+\r
+  Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+**/\r
+\r
+#ifndef ACPI_VIEW_COMMAND_LIB_H_\r
+#define ACPI_VIEW_COMMAND_LIB_H_\r
+\r
+/**\r
+  Dump a buffer to a file. Print error message if a file cannot be created.\r
+\r
+  @param[in] FileName   The filename that shall be created to contain the buffer.\r
+  @param[in] Buffer     Pointer to buffer that shall be dumped.\r
+  @param[in] BufferSize The size of buffer to be dumped in bytes.\r
+\r
+  @return The number of bytes that were written\r
+**/\r
+UINTN\r
+EFIAPI\r
+ShellDumpBufferToFile (\r
+  IN CONST CHAR16* FileNameBuffer,\r
+  IN CONST VOID*   Buffer,\r
+  IN CONST UINTN   BufferSize\r
+  );\r
+\r
+/**\r
+  Display and validate ACPI tables.\r
+\r
+  @param[in] ImageHandle  Handle to the Image (NULL if internal).\r
+  @param[in] SystemTable  Pointer to the System Table (NULL if internal).\r
+\r
+  @retval SHELL_INVALID_PARAMETER The command line invocation could not be parsed.\r
+  @retval SHELL_NOT_FOUND         The command failed.\r
+  @retval SHELL_SUCCESS           The command was successful.\r
+**/\r
+SHELL_STATUS\r
+EFIAPI\r
+ShellCommandRunAcpiView (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  );\r
+\r
+#endif // UEFI_SHELL_ACPIVIEW_COMMAND_LIB_H_\r