1 /* 2 * Copyright (c) 2018 Nordic Semiconductor ASA 3 * Copyright (c) 2018-2019 Linaro Limited 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 #ifndef COMMON_H__ 9 #define COMMON_H__ 10 11 #define VDEV_START_ADDR DT_REG_ADDR(DT_CHOSEN(zephyr_ipc_shm)) 12 #define VDEV_SIZE DT_REG_SIZE(DT_CHOSEN(zephyr_ipc_shm)) 13 14 #define VDEV_STATUS_ADDR VDEV_START_ADDR 15 #define VDEV_STATUS_SIZE 0x400 16 17 #define SHM_START_ADDR (VDEV_START_ADDR + VDEV_STATUS_SIZE) 18 #define SHM_SIZE (VDEV_SIZE - VDEV_STATUS_SIZE) 19 #define SHM_DEVICE_NAME "sramx.shm" 20 21 #define VRING_COUNT 2 22 #define VRING_RX_ADDRESS (VDEV_START_ADDR + SHM_SIZE - VDEV_STATUS_SIZE) 23 #define VRING_TX_ADDRESS (VDEV_START_ADDR + SHM_SIZE) 24 #define VRING_ALIGNMENT 4 25 #define VRING_SIZE 16 26 27 28 #endif 29