-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module_adapter: native_system_agent: Introduce call and interface
This is part of fw which helps loaded module in communication with adsp Also it provides basic operations for creation of component driver Common part for native loadable modules and iadk is put together and remade into native API. That way system services are using generic methods defined in native system service. Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
- Loading branch information
1 parent
e2ad42f
commit 2cdf38c
Showing
9 changed files
with
244 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
/* | ||
* Copyright(c) 2023 Intel Corporation. All rights reserved. | ||
* | ||
* Author: Pawel Dobrowolski <pawelx.dobrowolski@intel.com> | ||
*/ | ||
|
||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <utilities/array.h> | ||
#include <native_system_agent.h> | ||
|
||
/* The create_instance_f is a function call type known in module. The module entry_point | ||
* points to this type of function which starts module creation. | ||
*/ | ||
|
||
typedef void* (*native_create_instance_f)(void *mod_cfg, void *parent_ppl, | ||
void **mod_ptr); | ||
|
||
struct native_system_agent native_sys_agent; | ||
|
||
void *native_system_agent_start(uint32_t *sys_service, | ||
uint32_t entry_point, uint32_t module_id, | ||
uint32_t instance_id, uint32_t core_id, uint32_t log_handle, | ||
void *mod_cfg) | ||
{ | ||
native_sys_agent.module_id = module_id; | ||
native_sys_agent.instance_id = instance_id; | ||
native_sys_agent.core_id = core_id; | ||
native_sys_agent.log_handle = log_handle; | ||
|
||
void *system_agent_p = &native_sys_agent; | ||
uint32_t **sys_service_p = &sys_service; | ||
|
||
*sys_service_p = (uint32_t *)(&native_sys_agent.system_service); | ||
|
||
native_create_instance_f ci = (native_create_instance_f)entry_point; | ||
|
||
return ci(mod_cfg, NULL, &system_agent_p); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.