Skip to content

drivers: firmware: Add support for IRONside calls #88937

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

57300
Copy link
Collaborator

@57300 57300 commented Apr 23, 2025

IRONside calls are remote procedure calls which comprise the runtime interface of Nordic IRONside SE. They are realized using a simple IPC mechanism.

Comment on lines 94 to 95
alloc_buf_bit = LSB_GET(avail_buf_bits);
} while (!k_event_clear(&alloc_evts, alloc_buf_bit));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
alloc_buf_bit = LSB_GET(avail_buf_bits);
} while (!k_event_clear(&alloc_evts, alloc_buf_bit));
alloc_buf_bit = LSB_GET(avail_buf_bits);
bool event_was_taken_by_another_thread = 0 == k_event_clear(&alloc_evts, alloc_buf_bit);
} while (event_was_taken_by_another_thread);

Maybe make it more clear what this while loop is for.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment.


config NRF_IRONSIDE_CALL_INIT_PRIORITY
int "IRONside calls' initialization priority"
default 47
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a rationale here? Even if the rationale is that its a random value and we don't have a rationale.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

Copy link
Member

@carlescufi carlescufi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better suited for drivers/firmware if it's communication with a pre-existing firmware image. See the scmi driver there for similarities.

57300 added 2 commits April 25, 2025 11:59
IRONside calls are remote procedure calls which comprise the runtime
interface of Nordic IRONside SE. They are realized using a simple IPC
mechanism.

A local domain (client) issues requests to the server by exchanging data
in shared memory, which is divided into evenly sized buffers. The client
selects a buffer, writes a request into it, and sends it to the server.
The server processes that request and writes a response into the same
buffer before returning it to the client.

This patch adds the initial client-side implementation on top of MBOX.
It features cache management and a blocking alloc/dispatch/release API
for synchronous, zero-copy transfers.

A new devicetree binding is added to support this implementation. It is
patterned after the `zephyr,ipc-*` bindings, where each node associates
a pair of mailboxes and a shared memory region.

Signed-off-by: Grzegorz Swiderski <[email protected]>
Define `ipc_conf_iron.dtsi` and `memory_map_iron.dtsi`. In the future,
they will be merged with the base `ipc_conf.dtsi` and `memory_map.dtsi`
respectively. For now, they are used to replace a few devicetree nodes
when building for `nrf54h20dk/nrf54h20/*/iron` board targets.

Additional changes are included:

  * The IPC configuration includes new "nordic,ipc-ironside" nodes.
  * The memory map includes a new RAM20 layout. Its subregions are
    placed under the `/reserved-memory` node like before.
  * The MRAM partitions are moved to the common memory map, while the
    MCUboot-specific node labels are applied in `cpuapp.dts`.

Signed-off-by: Grzegorz Swiderski <[email protected]>
@57300 57300 force-pushed the nrf-ironside-call branch from aaaf30f to f7449de Compare April 25, 2025 09:59
@57300 57300 changed the title soc: nordic: Add support for IRONside calls drivers: firmware: Add support for IRONside calls Apr 25, 2025
@57300
Copy link
Collaborator Author

57300 commented Apr 25, 2025

This is better suited for drivers/firmware if it's communication with a pre-existing firmware image. See the scmi driver there for similarities.

Thanks for the tip! I think we should have all of our interfaces there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: IPC Inter-Process Communication platform: nRF Nordic nRFx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants