aboutsummaryrefslogtreecommitdiff
path: root/plat/qti
diff options
context:
space:
mode:
authorSaurabh Gorecha <sgorecha@codeaurora.org>2020-09-07 14:52:20 +0530
committerSaurabh Gorecha <sgorecha@codeaurora.org>2020-09-09 12:27:02 +0530
commit9ac093b6518bb029d324b08590881ad78cfb1477 (patch)
tree74757be26436ebca0b595614c2f4ca66259bee01 /plat/qti
parent7ef3e0b31baa6a718e0e99d96e65b82c27a08f0b (diff)
downloadtrusted-firmware-a-9ac093b6518bb029d324b08590881ad78cfb1477.tar.gz
Addition of standard APIs in qtiseclib interface
Follwing APIs wrappers are exposed to qtiseclib * strcmp * memset * memmove Change-Id: I79d50f358239cfda607d5f1a53314aa3b8f430cb Signed-off-by: Saurabh Gorecha <sgorecha@codeaurora.org>
Diffstat (limited to 'plat/qti')
-rw-r--r--plat/qti/qtiseclib/inc/qtiseclib_cb_interface.h5
-rw-r--r--plat/qti/qtiseclib/src/qtiseclib_cb_interface.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/plat/qti/qtiseclib/inc/qtiseclib_cb_interface.h b/plat/qti/qtiseclib/inc/qtiseclib_cb_interface.h
index 9c4a7247b9..2252557a0b 100644
--- a/plat/qti/qtiseclib/inc/qtiseclib_cb_interface.h
+++ b/plat/qti/qtiseclib/inc/qtiseclib_cb_interface.h
@@ -16,6 +16,9 @@
/* Standard Library API's */
void *qtiseclib_cb_memcpy(void *dst, const void *src, size_t len);
+int qtiseclib_cb_strcmp(const char *s1, const char *s2);
+void *qtiseclib_cb_memset(void *s, int c, size_t n);
+void *qtiseclib_cb_memmove(void *dest, const void *src, size_t n);
#define QTISECLIB_CB_ERROR(...) qtiseclib_cb_log(QTISECLIB_LOG_LEVEL_ERROR, __VA_ARGS__)
#define QTISECLIB_CB_NOTICE(...) qtiseclib_cb_log(QTISECLIB_LOG_LEVEL_NOTICE, __VA_ARGS__)
@@ -41,6 +44,8 @@ void qtiseclib_cb_switch_console_to_crash_state(void);
void qtiseclib_cb_udelay(uint32_t usec);
+int qtiseclib_cb_console_flush(void);
+
#if QTI_SDI_BUILD
int qtiseclib_cb_mmap_remove_dynamic_region(uintptr_t base_va, size_t size);
int qtiseclib_cb_mmap_add_dynamic_region(unsigned long long base_pa,
diff --git a/plat/qti/qtiseclib/src/qtiseclib_cb_interface.c b/plat/qti/qtiseclib/src/qtiseclib_cb_interface.c
index 1b1393e1ee..331a104b2a 100644
--- a/plat/qti/qtiseclib/src/qtiseclib_cb_interface.c
+++ b/plat/qti/qtiseclib/src/qtiseclib_cb_interface.c
@@ -29,6 +29,21 @@ void *qtiseclib_cb_memcpy(void *dst, const void *src, size_t len)
return memcpy(dst, src, len);
}
+int qtiseclib_cb_strcmp(const char *s1, const char *s2)
+{
+ return strcmp(s1, s2);
+}
+
+void *qtiseclib_cb_memset(void *s, int c, size_t n)
+{
+ return memset(s, c, n);
+}
+
+void *qtiseclib_cb_memmove(void *dest, const void *src, size_t n)
+{
+ return memmove(dest, src, n);
+}
+
/* Printing logs below or equal LOG_LEVEL from QTISECLIB. */
void qtiseclib_cb_log(unsigned int loglvl, const char *fmt, ...)
{
@@ -106,6 +121,11 @@ void qtiseclib_cb_udelay(uint32_t usec)
udelay(usec);
}
+int qtiseclib_cb_console_flush(void)
+{
+ return console_flush();
+}
+
#if QTI_SDI_BUILD
void qtiseclib_cb_get_ns_ctx(qtiseclib_dbg_a64_ctxt_regs_type *qti_ns_ctx)
{