feat(lib/granule): Add dev_granule object type
Define dev_granule structure type and add device granule
objects to manage device memory in PCI regions.
Define device granule states:
- DEV_GRANULE_STATE_NS
- DEV_GRANULE_STATE_DELEGATED
- DEV_GRANULE_STATE_MAPPED
Add locking primitives and access functions for
dev_granule objects.
Add dev_granules[RMM_MAX_DEV_GRANULES] array of
dev_granule structures.
Change-Id: I857095a997f78d2c39b3958056460112f3b34595
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
diff --git a/docs/design/locking.rst b/docs/design/locking.rst
index 3ce4c5d..11ac059 100644
--- a/docs/design/locking.rst
+++ b/docs/design/locking.rst
@@ -528,6 +528,8 @@
- GRANULE_STATE_DELEGATED
- GRANULE_STATE_RD
- GRANULE_STATE_REC
+ - DEV_GRANULE_STATE_NS
+ - DEV_GRANULE_STATE_DELEGATED
#. **Internal**: A granule state belongs to the `internal` class iff it is not
an `external`. These are objects which are referenced from another
@@ -537,6 +539,7 @@
- GRANULE_STATE_RTT
- GRANULE_STATE_DATA
+ - DEV_GRANULE_STATE_MAPPED
We now state the locking guidelines for |RMM| as: