Lines Matching +full:inter +full:- +full:cpu
1 .. zephyr:code-sample:: ivshmem-doorbell
3 :relevant-api: ivshmem
5 Use Inter-VM Shared Memory to exchange messages between two processes running on different
20 ivshmem-server needs to be available and running. The server is available in
21 Zephyr SDK or pre-built in some distributions. Otherwise, it is available in
24 ivshmem-client needs to be available as it is employed in this sample as an
25 external application. The same conditions of ivshmem-server applies to the
26 ivshmem-server, as it is also available via QEMU.
31 Building ivshmem-doorbell is as follows:
36 .. zephyr-app-commands::
37 :zephyr-app: samples/drivers/virtualization/ivshmem/doorbell
38 :host-os: unix
46 .. zephyr-app-commands::
47 :zephyr-app: samples/drivers/virtualization/ivshmem/doorbell
48 :host-os: unix
56 .. zephyr-app-commands::
57 :zephyr-app: samples/drivers/virtualization/ivshmem/doorbell
58 :host-os: unix
78 #. Run ivshmem-server. For the ivshmem-server, both number of vectors and
79 shared memory size are decided at run-time (when the server is executed).
81 decided at compile-time and run-time, respectively.
83 - (Arm64) Use vectors == 2 for the project configuration in this sample.
86 .. code-block:: console
89 $ sudo ivshmem-server -n 2
92 - (x86_64) The default shared memory size is bigger than the memory
95 .. code-block:: console
98 $ sudo ivshmem-server -n 2 -l 4096
101 - (Optional) If vectors != 2, you need to change ivshmem driver
107 .. code-block:: console
118 .. code-block:: console
120 $ west build -t run
121 -- west build: running target run
122 [0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: cortex-a53
123 *** Booting Zephyr OS build zephyr-v3.3.0-1649-g612f49da5dee ***
124 Use write_shared_memory.sh and ivshmem-client to send a message
127 the same as specified for ivshmem-server. This is the purpose of the
131 - (Arm64) a simple "hello world" message (the script assumes the default
132 size of ivshmem-server):
134 .. code-block:: console
136 # ./write_shared_memory.sh -m "your message"
137 $ ./write_shared_memory.sh -m "hello world"
140 - (x86_64) a simple "hello world" message:
142 .. code-block:: console
144 # ./write_shared_memory.sh -m "your message" -s <size of shared memory>
145 # assumption: the user created ivshmem-server with size 4096
146 $ ./write_shared_memory.sh -m "hello world" -s 4096
149 5. Send an interrupt to the guest. Using ivshmem-client, for instance:
151 .. code-block:: console
154 $ ivshmem-client
170 received (in any of the ivshmem-vectors). Example of output for arm64:
172 .. code-block:: console
174 $ west build -t run
175 -- west build: running target run
176 [0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: cortex-a53
177 *** Booting Zephyr OS build zephyr-v3.3.0-1649-g612f49da5dee ***
178 Use write_shared_memory.sh and ivshmem-client to send a message
197 with. This is straight-forward if you are writing an application and uses