diff options
author | Marc Bonnici <marc.bonnici@arm.com> | 2021-09-02 13:18:41 +0100 |
---|---|---|
committer | Marc Bonnici <marc.bonnici@arm.com> | 2021-10-06 16:00:34 +0100 |
commit | a6f2c49b0afc902c7455e98949869a2d64ad06a3 (patch) | |
tree | 512a730761b6947a4b8d4bd0dd2c09f2bb967aa3 | |
parent | da08535cb853cf686481ca5d5b8e25df1189f0ef (diff) | |
download | arm-trusted-firmware-a6f2c49b0afc902c7455e98949869a2d64ad06a3.tar.gz |
spmc: Add initial mailbox structs
Add the initial mailbox structs to the partition descriptor.
Change-Id: Ie80166d19763c266b6a1d23e351d312dc31fb221
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
-rw-r--r-- | services/std_svc/spm/spmc/spmc.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/services/std_svc/spm/spmc/spmc.h b/services/std_svc/spm/spmc/spmc.h index abe4c75a0..5c0bc4d74 100644 --- a/services/std_svc/spm/spmc/spmc.h +++ b/services/std_svc/spm/spmc/spmc.h @@ -25,6 +25,32 @@ enum runtime_el { EL3 }; +enum mailbox_state { + /** There is no message in the mailbox. */ + MAILBOX_STATE_EMPTY, + + /** There is a message that has been populated in the mailbox. */ + MAILBOX_STATE_FULL, +}; + + +struct mailbox { + enum mailbox_state state; + + /* RX/TX Buffers */ + uintptr_t rx_buffer; + uintptr_t tx_buffer; + + /* + * Size of RX/TX Buffer + */ + uint32_t rxtx_page_count; + + /* Lock access to mailbox */ + struct spinlock lock; +}; + + typedef struct spmc_sp_context { /* * Secure partition context @@ -41,6 +67,11 @@ typedef struct spmc_sp_context { */ uint16_t runtime_el; + /* + * Mailbox tracking + */ + struct mailbox mailbox; + } spmc_sp_context_t; #endif /* SPMC_H */ |