Skip to content

Commit 8a3639a

Browse files
committed
userspace: Move selected variables to userspace-accessible memory partition
Relocate specific variables to a memory partition accessible from userspace to enable running the system agent in userspace. This change ensures that only the required structures is accessible for userspace modules, while privileged data remains in kernel-only memory. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent 67b4c7d commit 8a3639a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/audio/module_adapter/iadk/system_agent.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <stddef.h>
1414
#include <stdint.h>
1515
#include <rtos/string.h>
16+
#include <rtos/userspace_helper.h>
1617
#include <utilities/array.h>
1718
#include <module/iadk/adsp_error_code.h>
1819
#include <system_service.h>
@@ -38,7 +39,7 @@ namespace system
3839
{
3940

4041
/* Structure storing handles to system service operations */
41-
const AdspSystemService SystemAgent::system_service_ = {
42+
const APP_TASK_DATA AdspSystemService SystemAgent::system_service_ = {
4243
native_system_service_log_message,
4344
native_system_service_safe_memcpy,
4445
native_system_service_safe_memmove,

src/audio/module_adapter/library/native_system_service.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <native_system_service.h>
2020
#include <sof/lib_manager.h>
2121
#include <module/module/logger.h>
22+
#include <rtos/userspace_helper.h>
2223

2324
#define RSIZE_MAX 0x7FFFFFFF
2425

@@ -162,7 +163,7 @@ AdspErrorCode native_system_service_get_interface(enum interface_id id,
162163
return ADSP_NO_ERROR;
163164
}
164165

165-
const struct native_system_service native_system_service = {
166+
const APP_TASK_DATA struct native_system_service native_system_service = {
166167
.basic = {
167168
.log_message = native_system_service_log_message,
168169
.safe_memcpy = native_system_service_safe_memcpy,

0 commit comments

Comments
 (0)