Skip to content

Commit

Permalink
core: add memory area for transfer list
Browse files Browse the repository at this point in the history
Adding a new area to map a transfer list if it is handed over
from previous boot stage

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
raymo200915 committed Nov 3, 2023
1 parent bb053cc commit 0ee6a91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/include/mm/core_mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
* MEM_AREA_IO_SEC: Secure HW mapped registers
* MEM_AREA_EXT_DT: Memory loads external device tree
* MEM_AREA_MANIFEST_DT: Memory loads manifest device tree
* MEM_AREA_TRANSFER_LIST: Memory area mapped for Transfer List
* MEM_AREA_RES_VASPACE: Reserved virtual memory space
* MEM_AREA_SHM_VASPACE: Virtual memory space for dynamic shared memory buffers
* MEM_AREA_TS_VASPACE: TS va space, only used with phys_to_virt()
Expand Down Expand Up @@ -106,6 +107,7 @@ enum teecore_memtypes {
MEM_AREA_IO_SEC,
MEM_AREA_EXT_DT,
MEM_AREA_MANIFEST_DT,
MEM_AREA_TRANSFER_LIST,
MEM_AREA_RES_VASPACE,
MEM_AREA_SHM_VASPACE,
MEM_AREA_TS_VASPACE,
Expand Down Expand Up @@ -140,6 +142,7 @@ static inline const char *teecore_memtype_name(enum teecore_memtypes type)
[MEM_AREA_IO_SEC] = "IO_SEC",
[MEM_AREA_EXT_DT] = "EXT_DT",
[MEM_AREA_MANIFEST_DT] = "MANIFEST_DT",
[MEM_AREA_TRANSFER_LIST] = "TRANSFER_LIST",
[MEM_AREA_RES_VASPACE] = "RES_VASPACE",
[MEM_AREA_SHM_VASPACE] = "SHM_VASPACE",
[MEM_AREA_TS_VASPACE] = "TS_VASPACE",
Expand Down
3 changes: 3 additions & 0 deletions core/mm/core_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,8 @@ uint32_t core_mmu_type_to_attr(enum teecore_memtypes t)
return attr | TEE_MATTR_PRW | cached;
case MEM_AREA_MANIFEST_DT:
return attr | TEE_MATTR_SECURE | TEE_MATTR_PR | cached;
case MEM_AREA_TRANSFER_LIST:
return attr | TEE_MATTR_SECURE | TEE_MATTR_PRW | cached;
case MEM_AREA_EXT_DT:
/*
* If CFG_MAP_EXT_DT_SECURE is enabled map the external device
Expand Down Expand Up @@ -1434,6 +1436,7 @@ static void check_mem_map(struct tee_mmap_region *map)
case MEM_AREA_IO_NSEC:
case MEM_AREA_EXT_DT:
case MEM_AREA_MANIFEST_DT:
case MEM_AREA_TRANSFER_LIST:
case MEM_AREA_RAM_SEC:
case MEM_AREA_RAM_NSEC:
case MEM_AREA_RES_VASPACE:
Expand Down

0 comments on commit 0ee6a91

Please sign in to comment.