-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: pager can use memory between SRAM start and core load address #1826
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With or without my comment addressed:
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
core/arch/arm/kernel/generic_boot.c
Outdated
@@ -299,6 +297,10 @@ static void init_runtime(unsigned long pageable_part) | |||
tee_pager_add_pages((vaddr_t)__pageable_start + init_size, | |||
(pageable_size - init_size) / SMALL_PAGE_SIZE, true); | |||
|
|||
/* Pager can also use pages before unpaged memory if any */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be worth commenting on when and why there may be pages before unpaged memory.
@etienne-lms can you please rebase and address the conflicts with master? |
ok |
@etienne-lms I think you could have just applied Jens' R-b, no? Did you change something significant that he did not acknowledge? |
ok, i apply and squash. |
If core is loaded some 4kB pages above the start of the physical internal ram, some 4kB memory block will not be used by the pager. This situation can occur if the beginning of the internal ram is used by a bootloader. Bootloader must load op-tee above its own used memory. Such bootloader memory is freely available to op-tee core (pager). This change adds the physical memory between TEE RAM base address and the op-tee entry point address to the pager page pool. This change also default maps this area so that pager identifies physical pages as valid page addresses. This changes fixes the plat-vexpress against CFG_TEE_RAM_START being different from CFG_TEE_LOAD_ADDR. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Thanks! |
If core is loaded some 4kB pages above the start of the physical internal ram, some 4kB memory block will not be used by the pager.
This situation can occur if the beginning of the internal ram is used by a bootloader. Bootloader must load op-tee above its own used memory. Such bootloader memory is freely available to op-tee core (pager).
This change adds the physical memory between TEE RAM base address and the op-tee entry point address to the pager page pool. This change also default maps this area so that pager identifies physical pages as valid page addresses.
I found this issue while verifying support for various locations of a flat mapped coherent memory.