Skip to content

Commit

Permalink
libmetal: add xtensa support
Browse files Browse the repository at this point in the history
make openamp can run on xtensa dsp

Signed-off-by: Guiding Li <liguiding1@xiaomi.com>
  • Loading branch information
GUIDINGLI authored and xiaoxiang781216 committed Oct 22, 2021
1 parent af087df commit 70249cf
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/processor/xtensa/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
collect (PROJECT_LIB_HEADERS atomic.h)
collect (PROJECT_LIB_HEADERS cpu.h)
15 changes: 15 additions & 0 deletions lib/processor/xtensa/atomic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2015, Xiaomi Inc. and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

/*
* @file xtensa/atomic.h
* @brief Xtensa specific atomic primitives for libmetal.
*/

#ifndef __METAL_XTENSA_ATOMIC__H__
#define __METAL_XTENSA_ATOMIC__H__

#endif /* __METAL_XTENSA_ATOMIC__H__ */
18 changes: 18 additions & 0 deletions lib/processor/xtensa/cpu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2015, Xiaomi Inc. and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

/*
* @file cpu.h
* @brief CPU specific primatives
*/

#ifndef __METAL_XTENSA_CPU__H__
#define __METAL_XTENSA_CPU__H__

#define metal_cpu_yield()
#define __sync_synchronize()

#endif /* __METAL_XTENSA_CPU__H__ */

0 comments on commit 70249cf

Please sign in to comment.