1 /*
2 * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7
8 /************* Include Files ****************/
9 #include "cc_pal_types.h"
10 #include "cc_pal_memmap.h"
11
12 /************************ Defines ******************************/
13
14 /************************ Enums ******************************/
15
16 /************************ Typedefs ******************************/
17
18 /************************ Global Data ******************************/
19
20 /************************ Private Functions ******************************/
21
22 /************************ Public Functions ******************************/
23
24 /**
25 * @brief This function purpose is to return the base virtual address that maps the
26 * base physical address
27 *
28 * @param[in] physicalAddress - Starts physical address of the I/O range to be mapped.
29 * @param[in] mapSize - Number of bytes that were mapped
30 * @param[out] ppVirtBuffAddr - Pointer to the base virtual address to which the physical pages were mapped
31 *
32 * @return Returns a non-zero value in case of failure
33 */
CC_PalMemMap(CCDmaAddr_t physicalAddress,uint32_t mapSize,uint32_t ** ppVirtBuffAddr)34 uint32_t CC_PalMemMap(CCDmaAddr_t physicalAddress,
35 uint32_t mapSize,
36 uint32_t **ppVirtBuffAddr)
37 {
38 CC_UNUSED_PARAM(mapSize);
39 *ppVirtBuffAddr = (uint32_t *)physicalAddress;
40
41 return 0;
42 }/* End of CC_PalMemMap */
43
44
45 /**
46 * @brief This function purpose is to Unmaps a specified address range previously mapped
47 * by CC_PalMemMap
48 *
49 *
50 * @param[in] pVirtBuffAddr - Pointer to the base virtual address to which the physical
51 * pages were mapped
52 * @param[in] mapSize - Number of bytes that were mapped
53 *
54 * @return Returns a non-zero value in case of failure
55 */
CC_PalMemUnMap(uint32_t * pVirtBuffAddr,uint32_t mapSize)56 uint32_t CC_PalMemUnMap(uint32_t *pVirtBuffAddr,
57 uint32_t mapSize)
58 {
59 CC_UNUSED_PARAM(pVirtBuffAddr);
60 CC_UNUSED_PARAM(mapSize);
61 return 0;
62 }/* End of CC_PalMemUnMap */
63