blob: be6f06ae1b81a4c3c1a152d10887fc1df7baa6cc [file] [log] [blame]
Antonio Nino Diaz7e1e5e82018-12-05 14:38:15 +00001/*
Olivier Deprez231115d2020-02-03 11:27:01 +01002 * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
Antonio Nino Diaz7e1e5e82018-12-05 14:38:15 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef CACTUS_DEF_H
8#define CACTUS_DEF_H
9
10#include <utils_def.h>
11
12/*
13 * Layout of the Secure Partition image.
14 */
15
16/* Up to 2 MiB at an arbitrary address that doesn't overlap the devices. */
Olivier Deprez231115d2020-02-03 11:27:01 +010017#define CACTUS_IMAGE_BASE ULL(0x1000)
Antonio Nino Diaz7e1e5e82018-12-05 14:38:15 +000018#define CACTUS_IMAGE_SIZE ULL(0x200000)
19
Antonio Nino Diaz54287c82018-12-05 15:37:33 +000020/* Memory reserved for stacks */
21#define CACTUS_STACKS_SIZE ULL(0x1000)
22
Manish Pandey26c6f812020-04-30 11:43:00 +010023/*
24 * RX/TX buffer used by VM's in SPM for memory sharing
25 * Each VM allocated 2 pages, one for RX and one for TX buffer.
26 */
Ruari Phippsd75596a2020-07-17 16:41:34 +010027#define CACTUS_RX_BASE ULL(0x7300000)
Manish Pandey26c6f812020-04-30 11:43:00 +010028#define CACTUS_TX_BASE CACTUS_RX_BASE + PAGE_SIZE
29#define CACTUS_RX_TX_SIZE PAGE_SIZE * 2
Antonio Nino Diaz7e1e5e82018-12-05 14:38:15 +000030
Max Shvetsovc32f4782020-06-23 09:41:15 +010031/*
32 * RX/TX buffer helpers.
33 */
Olivier Deprez0be4abe2020-08-04 11:26:13 +020034#define get_sp_rx_start(sp_id) (CACTUS_RX_BASE + (((sp_id & 0x7FFFU) - 1U) * CACTUS_RX_TX_SIZE))
35#define get_sp_rx_end(sp_id) (CACTUS_RX_BASE + (((sp_id & 0x7FFFU) - 1U) * CACTUS_RX_TX_SIZE) + PAGE_SIZE)
36#define get_sp_tx_start(sp_id) (CACTUS_TX_BASE + (((sp_id & 0x7FFFU) - 1U) * CACTUS_RX_TX_SIZE))
37#define get_sp_tx_end(sp_id) (CACTUS_TX_BASE + (((sp_id & 0x7FFFU) - 1U) * CACTUS_RX_TX_SIZE) + PAGE_SIZE)
Max Shvetsovc32f4782020-06-23 09:41:15 +010038
39/*
40 * UUID of secure partition as defined in the respective manifests.
41 */
42#define PRIMARY_UUID {0xb4b5671e, 0x4a904fe1, 0xb81ffb13, 0xdae1dacb}
43#define SECONDARY_UUID {0xd1582309, 0xf02347b9, 0x827c4464, 0xf5578fc8}
Ruari Phippsd75596a2020-07-17 16:41:34 +010044#define TERTIARY_UUID {0x79b55c73, 0x1d8c44b9, 0x859361e1, 0x770ad8d2}
45
Max Shvetsovc32f4782020-06-23 09:41:15 +010046
Antonio Nino Diaz7e1e5e82018-12-05 14:38:15 +000047#endif /* CACTUS_DEF_H */