Skip to content

Commit

Permalink
fix commments by Etienne part OP-TEE#2
Browse files Browse the repository at this point in the history
Fixed description in core_memprot.h
Fixed range in tests/invoke.c
Removed line in imx_uart.c

Signed-off-by: Anton Rybakov <[email protected]>
  • Loading branch information
a-rybakov committed Jun 3, 2021
1 parent 2f84815 commit f41a30a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion core/drivers/imx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#define UTS 0xb4 /* UART Test Register (mx31) */
#define USIZE 0xb8 /* UTS + sizeof(uint32_t) */


/* UART Control Register Bit Fields.*/
#define URXD_CHARRDY (1<<15)
#define URXD_ERR (1<<14)
Expand Down
4 changes: 2 additions & 2 deletions core/include/mm/core_memprot.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ bool core_vbuf_is(uint32_t flags, const void *vbuf, size_t len);
* Also tries to find proper mapping which have counterpart translation
* for specified length of data starting from given physical address.
* Len parameter can be set to 1 if caller knows that requested (pa + len)
* doesn`t cross granule boundary.
* doesn`t cross mapping granule boundary.
* Returns NULL on failure or a valid virtual address on success.
*/
void *phys_to_virt(paddr_t pa, enum teecore_memtypes m, size_t len);

/*
* Translate physical address to virtual address trying MEM_AREA_IO_SEC
* first then MEM_AREA_IO_NSEC if not found. Like phys_to_virt() tries
* to find proper mapping rely on length parameter.
* to find proper mapping relying on length parameter.
* Returns NULL on failure or a valid virtual address on success.
*/
void *phys_to_virt_io(paddr_t pa, size_t len);
Expand Down
4 changes: 2 additions & 2 deletions core/pta/tests/invoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ static TEE_Result test_inject_sdp(uint32_t type, TEE_Param p[TEE_NUM_PARAMS])
return TEE_SUCCESS;

/* Check that core can p2v and v2p over memory reference arguments */
if (test_v2p2v(src, sz) || test_v2p2v(src + sz - 1, 0) ||
test_v2p2v(dst, sz) || test_v2p2v(dst + sz - 1, 0))
if (test_v2p2v(src, sz) || test_v2p2v(src + sz - 1, 1) ||
test_v2p2v(dst, sz) || test_v2p2v(dst + sz - 1, 1))
return TEE_ERROR_SECURITY;

if (cache_operation(TEE_CACHEFLUSH, dst, sz) != TEE_SUCCESS)
Expand Down

0 comments on commit f41a30a

Please sign in to comment.