AcpiViewApp.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /** @file
  2. Main file for AcpiViewApp application
  3. Copyright (c) 2020, ARM Limited. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #include <Library/BaseLib.h>
  7. #include <Library/UefiBootServicesTableLib.h>
  8. #include <Library/UefiLib.h>
  9. #include <Library/ShellLib.h>
  10. #include <Library/AcpiViewCommandLib.h>
  11. #include <Protocol/ShellParameters.h>
  12. //
  13. // String token ID of help message text.
  14. // Shell supports to find help message in the resource section of an application image if
  15. // .MAN file is not found. This global variable is added to make build tool recognizes
  16. // that the help string is consumed by user and then build tool will add the string into
  17. // the resource section. Thus the application can use '-?' option to show help message in
  18. // Shell.
  19. //
  20. GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID mStringHelpTokenId = STRING_TOKEN (STR_GET_HELP_ACPIVIEW);
  21. /**
  22. Application Entry Point wrapper around the shell command
  23. @param[in] ImageHandle Handle to the Image (NULL if internal).
  24. @param[in] SystemTable Pointer to the System Table (NULL if internal).
  25. **/
  26. EFI_STATUS
  27. EFIAPI
  28. AcpiViewAppMain (
  29. IN EFI_HANDLE ImageHandle,
  30. IN EFI_SYSTEM_TABLE *SystemTable
  31. )
  32. {
  33. return ShellCommandRunAcpiView (gImageHandle, SystemTable);
  34. }