/**
 * @file tees_mem.h
 * @brief Multibuild's miscellaneous SWd memory function declarations.
 * @author Iaroslav Makarchuk (i.makarchuk@samsung.com)
 * @date Created Oct 3, 2016
 * @par In Samsung Ukraine R&D Center (SURC) under a contract between
 * @par LLC "Samsung Electronics Ukraine Company" (Kiev, Ukraine) and
 * @par "Samsung Elecrtronics Co", Ltd (Seoul, Republic of Korea)
 * @par Copyright: (c) Samsung Electronics Co, Ltd 2015. All rights reserved.
 *
 * This software is proprietary of Samsung Electronics.
 * No part of this software, either material or conceptual may be copied
 * or distributed, transmitted, transcribed, stored in a retrieval system
 * or translated into any human or computer language in any form by any means,
 * electronic, mechanical, manual or otherwise, or disclosed to third parties
 * without the express written permission of Samsung Electronics.
 *
 */
#ifndef TEE_MEM_H_
#define TEE_MEM_H_

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Obtains a pointer to world shared buffer start and buffer's size
 *
 * @note The function is platform specific. For t-base it obtains the address
 * of TCI/DCI buffer and its length in bytes.
 *
 * @param[out]  buffer A pointer to the World Shared Buffer
 * @param[out]  size   World Shared Buffer length in bytes
 *
 * @retval TEE_SUCCESS              Proper buffer pointer and size returned
 * @retval TEE_ERROR_BAD_PARAMETERS Bad parameters passed
 * @retval TEE_ERROR_NOT_SUPPORTED  The functionality is not supported for
 *                                  current platform
 */
TEE_Result TEES_GetSharedCommandBuffer(void **buffer, size_t *size);

#ifdef __cplusplus
}
#endif

#endif /* TEE_MEM_H_ */
