-
Notifications
You must be signed in to change notification settings - Fork 140
New memory domain logic #5537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: topic/sof-dev
Are you sure you want to change the base?
New memory domain logic #5537
Changes from all commits
fa0de06
a94d278
4ddf658
df3a5df
79f90d8
91c9b6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -188,6 +188,10 @@ enum sof_ipc4_pipeline_state { | |
| #define SOF_IPC4_GLB_PIPE_EXT_CORE_ID_MASK GENMASK(23, 20) | ||
| #define SOF_IPC4_GLB_PIPE_EXT_CORE_ID(x) ((x) << SOF_IPC4_GLB_PIPE_EXT_CORE_ID_SHIFT) | ||
|
|
||
| #define SOF_IPC4_GLB_PIPE_PAYLOAD_SHIFT 29 | ||
| #define SOF_IPC4_GLB_PIPE_PAYLOAD_MASK BIT(29) | ||
| #define SOF_IPC4_GLB_PIPE_PAYLOAD(x) ((x) << SOF_IPC4_GLB_PIPE_PAYLOAD_SHIFT) | ||
|
|
||
| /* pipeline set state ipc msg */ | ||
| #define SOF_IPC4_GLB_PIPE_STATE_ID_SHIFT 16 | ||
| #define SOF_IPC4_GLB_PIPE_STATE_ID_MASK GENMASK(23, 16) | ||
|
|
@@ -691,6 +695,79 @@ struct sof_ipc4_mod_init_ext_dp_memory_data { | |
| u32 heap_bytes; /* stack size in bytes, 0 means default size */ | ||
| } __packed __aligned(4); | ||
|
|
||
|
|
||
| /* | ||
| * This set of macros are very similar to the set above, but these are | ||
| * for building payload to SOF_IPC4_GLB_CREATE_PIPELINE message. | ||
| * | ||
| * Macros for creating struct sof_ipc4_glb_pipe_payload payload with | ||
| * its associated data. ext_init payload should be the first piece of | ||
| * payload following SOF_IPC4_GLB_CREATE_PIPELINE msg, and its | ||
| * existence is indicated with SOF_IPC4_GLB_PIPE_PAYLOAD bit. | ||
| * | ||
| * The macros below apply to sof_ipc4_glb_pipe_payload.word0 | ||
| */ | ||
| #define SOF_IPC4_GLB_PIPE_PAYLOAD_WORDS_SHIFT 0 | ||
| #define SOF_IPC4_GLB_PIPE_PAYLOAD_WORDS_MASK GENMASK(23, 0) | ||
| #define SOF_IPC4_GLB_PIPE_PAYLOAD_WORDS(x) ((x) << SOF_IPC4_GLB_PIPE_PAYLOAD_WORDS_SHIFT) | ||
|
|
||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_ARRAY_SHIFT 24 | ||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_ARRAY_MASK BIT(24) | ||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_ARRAY(x) ((x) << SOF_IPC4_GLB_PIPE_EXT_OBJ_ARRAY_SHIFT) | ||
|
|
||
| struct sof_ipc4_glb_pipe_payload { | ||
| u32 word0; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you do bitfields instead e.g. ? Or at least pick up a more informative name like
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is Linux kernel style, at least in SOF driver, and in all other Linux drivers I've been working on. In SOF driver every other IPC message and payload structure is defined with macros, not with bitfields. I don't think I should diverge from this in PR either. |
||
| u32 rsvd1; | ||
| u32 rsvd2; | ||
| } __packed __aligned(4); | ||
|
|
||
| /* | ||
| * SOF_IPC4_GLB_CREATE_PIPELINE payload may be followed by arbitrary | ||
| * number of object array objects. SOF_IPC4_GLB_PIPE_EXT_OBJ_ARRAY-bit | ||
| * indicates that an array object follows struct | ||
| * sof_ipc4_glb_pipe_payload. | ||
| * | ||
| * The object header's SOF_IPC4_GLB_PIPE_EXT_OBJ_LAST-bit in struct | ||
| * sof_ipc4_module_init_ext_object indicates if the array is continued | ||
| * with another object. The header has also fields to identify the | ||
| * object, SOF_IPC4_GLB_PIPE_EXT_OBJ_ID, and to indicate the object's | ||
| * size in 32-bit words, SOF_IPC4_GLB_PIPE_EXT_OBJ_WORDS, not | ||
| * including the header itself. | ||
| * | ||
| * The macros below apply to sof_ipc4_glb_pipe_ext_object.header | ||
| */ | ||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_LAST_SHIFT 0 | ||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_LAST_MASK BIT(0) | ||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_LAST(x) ((x) << SOF_IPC4_GLB_PIPE_EXT_OBJ_LAST_SHIFT) | ||
|
|
||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_ID_SHIFT 1 | ||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_ID_MASK GENMASK(15, 1) | ||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_ID(x) ((x) << SOF_IPC4_GLB_PIPE_EXT_OBJ_ID_SHIFT) | ||
|
|
||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_WORDS_SHIFT 16 | ||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_WORDS_MASK GENMASK(31, 16) | ||
| #define SOF_IPC4_GLB_PIPE_EXT_OBJ_WORDS(x) ((x) << SOF_IPC4_GLB_PIPE_EXT_OBJ_WORDS_SHIFT) | ||
|
|
||
| struct sof_ipc4_glb_pipe_ext_object { | ||
| u32 header; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could also be split into sub-fields
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
| u32 data[]; | ||
| } __packed __aligned(4); | ||
|
|
||
| enum sof_ipc4_glb_pipe_ext_obj_id { | ||
| SOF_IPC4_GLB_PIPE_DATA_ID_INVALID = 0, | ||
| SOF_IPC4_GLB_PIPE_DATA_ID_MEM_DATA, | ||
| SOF_IPC4_GLB_PIPE_DATA_ID_MAX = SOF_IPC4_GLB_PIPE_DATA_ID_MEM_DATA, | ||
| }; | ||
|
|
||
| /* Pipeline memory configuration data object for ext_init object array */ | ||
| struct sof_ipc4_glb_pipe_ext_obj_memory_data { | ||
| u32 domain_id; /* userspace domain ID */ | ||
| u32 stack_bytes; /* stack size in bytes */ | ||
| u32 interim_bytes; /* interim heap size in bytes */ | ||
| u32 lifetime_bytes; /* lifetime heap size in bytes */ | ||
| u32 shared_bytes; /* shared size in bytes */ | ||
| } __packed __aligned(4); | ||
|
|
||
| /** @}*/ | ||
|
|
||
| #endif | ||
Uh oh!
There was an error while loading. Please reload this page.