errcode.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. /**
  6. * @file errcode.h
  7. * @date Wed Feb 29 18:58:30 2012
  8. *
  9. * @brief Host-visible error code definition
  10. */
  11. #ifndef BEIHAI_ERRCODE_H
  12. #define BEIHAI_ERRCODE_H
  13. /**
  14. * Responses to all remote requests from host to Beihai runtime has a
  15. * return error code, which is used to indicate the processing result:
  16. * successful or any error occurs. The following definitions include
  17. * all those error codes that may be returned to host.
  18. */
  19. enum {
  20. BHE_SUCCESS = 0x000, /* Successful */
  21. /* General errors: 0x100 */
  22. BHE_OUT_OF_MEMORY = 0x101, /* Out of memory */
  23. BHE_BAD_PARAMETER = 0x102, /* Bad parameters to native */
  24. BHE_INSUFFICIENT_BUFFER = 0x103,
  25. BHE_MUTEX_INIT_FAIL = 0x104,
  26. BHE_COND_INIT_FAIL = 0x105, /* Cond init fail is not return to
  27. * host now, it may be used later.
  28. */
  29. BHE_WD_TIMEOUT = 0x106, /* Watchdog time out */
  30. /* Communication: 0x200 */
  31. BHE_MAILBOX_NOT_FOUND = 0x201, /* Mailbox not found */
  32. BHE_MSG_QUEUE_IS_FULL = 0x202, /* Message queue is full */
  33. BHE_MAILBOX_DENIED = 0x203, /* Mailbox is denied by firewall */
  34. /* Applet manager: 0x300 */
  35. BHE_LOAD_JEFF_FAIL = 0x303, /* JEFF file load fail, OOM or file
  36. * format error not distinct by
  37. * current JEFF loading
  38. * process (bool jeff_loader_load).
  39. */
  40. BHE_PACKAGE_NOT_FOUND = 0x304, /* Request operation on a package,
  41. * but it does not exist.
  42. */
  43. BHE_EXIST_LIVE_SESSION = 0x305, /* Uninstall package fail because of
  44. * live session exist.
  45. */
  46. BHE_VM_INSTANCE_INIT_FAIL = 0x306, /* VM instance init fail when create
  47. * session.
  48. */
  49. BHE_QUERY_PROP_NOT_SUPPORT = 0x307, /* Query applet property that Beihai
  50. * does not support.
  51. */
  52. BHE_INVALID_BPK_FILE = 0x308, /* Incorrect Beihai package format */
  53. BHE_VM_INSTNACE_NOT_FOUND = 0x312, /* VM instance not found */
  54. BHE_STARTING_JDWP_FAIL = 0x313, /* JDWP agent starting fail */
  55. BHE_GROUP_CHECK_FAIL = 0x314, /* Group access checking fail*/
  56. /* Applet instance: 0x400 */
  57. BHE_UNCAUGHT_EXCEPTION = 0x401, /* uncaught exception */
  58. BHE_APPLET_BAD_PARAMETER = 0x402, /* Bad parameters to applet */
  59. BHE_APPLET_SMALL_BUFFER = 0x403, /* Small response buffer */
  60. /*TODO: Should be removed these UI error code when integrate with ME 9 */
  61. /* UI: 0x500 */
  62. BHE_UI_EXCEPTION = 0x501,
  63. BHE_UI_ILLEGAL_USE = 0x502,
  64. BHE_UI_ILLEGAL_PARAMETER = 0x503,
  65. BHE_UI_NOT_INITIALIZED = 0x504,
  66. BHE_UI_NOT_SUPPORTED = 0x505,
  67. BHE_UI_OUT_OF_RESOURCES = 0x506
  68. };
  69. #endif