HAL: Add HAL definition header file
The HAL definition header file includes the common status code
for all HAL APIs.
Change-Id: Ie6ce8951b16a293e4ad9244575611095e4b6c6f8
Signed-off-by: Edison Ai <edison.ai@arm.com>
diff --git a/platform/include/tfm_hal_defs.h b/platform/include/tfm_hal_defs.h
new file mode 100644
index 0000000..e099077
--- /dev/null
+++ b/platform/include/tfm_hal_defs.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#ifndef __TFM_HAL_DEFS_H__
+#define __TFM_HAL_DEFS_H__
+
+#include <limits.h>
+#include <stdint.h>
+
+enum tfm_hal_status_t {
+ TFM_HAL_ERROR_MEM_FAULT = CHAR_MIN,
+ TFM_HAL_ERROR_MAX_VALUE,
+ TFM_HAL_ERROR_BAD_STATE,
+ TFM_HAL_ERROR_NOT_SUPPORTED,
+ TFM_HAL_ERROR_INVALID_INPUT,
+ TFM_HAL_ERROR_NOT_INIT,
+ TFM_HAL_ERROR_GENERIC,
+ TFM_HAL_SUCCESS = 0
+};
+
+#endif /* __TFM_HAL_DEFS_H__ */