Skip to content

Commit

Permalink
update(ipc): include note regarding to base and size
Browse files Browse the repository at this point in the history
Signed-off-by: Diogo Costa <diogoandreveigacosta@gmail.com>
  • Loading branch information
Diogo21Costa committed Jan 19, 2024
1 parent 854fe14 commit ae5a5bd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions source/bao_hyp/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,15 @@ Inter-Process Communication (IPC) enables seamless communication between distinc
computing system. This mechanism facilitates data exchange, synchronization, and coordination,
fostering enhanced functionality and system efficiency.

.. figure:: img/ipc.svg
:align: center
:name: ipc-fig

Bao provides support for IPC, allowing VMs to establish communication channels. The IPC
configuration involves defining the number of IPCs using the ``ipc_num`` field within the
``vm_config`` struct. The specifics of each IPC are then outlined through the ``ipcs`` structure,
including fields such as ``base``, ``size``, ``shmem_id``, ``interrupt_num``, and ``interrupts``.

.. figure:: img/ipc.svg
:align: center
:name: ipc-fig

- **ipc_num** [optional] - defines the number of IPCs assigned to the VM. By default, ``ipc_num``
equals to zero;
- **ipcs** [mandatory if ``ipc_num`` > 0] - corresponds to the specification of the IPC and is
Expand Down Expand Up @@ -361,6 +361,11 @@ where:
- **pa** [mandatory] - corresponds to the base physical address of the device;
- **va** [mandatory] - corresponds to the base virtual address of the device;
- **size** [mandatory] - corresponds to the size of the device memory region;

.. note::
It is mandatory for `base` and `size` to align with the smallest page size of the architecture.
For MMU systems, this typically aligns to 4K, while for MPU systems, it aligns to 64 bytes.

- **interrupt_num** [optional] - corresponds to the number of interrupts generated by the device to
the VM. By default, ``interrupt_num`` equals to 0;
- **interrupts** [mandatory if *interrupt_num*>0] - defines a list of interrupt IDs generated by
Expand Down

0 comments on commit ae5a5bd

Please sign in to comment.