Hi - Can someone please help me answering the below?
1. What type of address CONSOLE_UART_BASE (defined in optee_os/core/arch/arm/plat-xxxxx/platform_config.h) represents? Physical (or) virtual address?
void console_init(void) { pl011_init(CONSOLE_UART_BASE, CONSOLE_UART_CLK_IN_HZ, CONSOLE_BAUDRATE); }
void pl011_init(vaddr_t base, uint32_t uart_clk, uint32_t baud_rate);
2. Are these consoles across different platforms assumed to be secure or non secure?
Regards, Chinnabha
Hi,
On Fri, Jun 17, 2016 at 8:16 AM, chinna 220 chinnabha220@gmail.com wrote:
Hi - Can someone please help me answering the below?
- What type of address CONSOLE_UART_BASE (defined in
optee_os/core/arch/arm/plat-xxxxx/platform_config.h) represents? Physical (or) virtual address?
Physical address, but now that https://github.com/OP-TEE/optee_os/pull/800 is merged you have to be careful to not mix physical with virtual. If you look at the latest on the master branch I think it will be more clear now.
void console_init(void) { pl011_init(CONSOLE_UART_BASE, CONSOLE_UART_CLK_IN_HZ, CONSOLE_BAUDRATE); }
void pl011_init(vaddr_t base, uint32_t uart_clk, uint32_t baud_rate);
- Are these consoles across different platforms assumed to be secure or
non secure?
There's normally no assumptions, but you'll need to map the device memory correctly though. On most platforms I believe the uarts are non-secure and even shared with normal world in some cases. We make no effort to synchronize accesses to a shared uart with normal world, it seems to work well enough without it. The uart is currently only used for debug purposes.
Regards, Jens
Thanks Jens, got it. -Bhaskara
On Fri, Jun 17, 2016 at 12:16 PM, Jens Wiklander jens.wiklander@linaro.org wrote:
Hi,
On Fri, Jun 17, 2016 at 8:16 AM, chinna 220 chinnabha220@gmail.com wrote:
Hi - Can someone please help me answering the below?
- What type of address CONSOLE_UART_BASE (defined in
optee_os/core/arch/arm/plat-xxxxx/platform_config.h) represents? Physical (or) virtual address?
Physical address, but now that https://github.com/OP-TEE/optee_os/pull/800 is merged you have to be careful to not mix physical with virtual. If you look at the latest on the master branch I think it will be more clear now.
void console_init(void) { pl011_init(CONSOLE_UART_BASE, CONSOLE_UART_CLK_IN_HZ, CONSOLE_BAUDRATE); }
void pl011_init(vaddr_t base, uint32_t uart_clk, uint32_t baud_rate);
- Are these consoles across different platforms assumed to be secure
or
non secure?
There's normally no assumptions, but you'll need to map the device memory correctly though. On most platforms I believe the uarts are non-secure and even shared with normal world in some cases. We make no effort to synchronize accesses to a shared uart with normal world, it seems to work well enough without it. The uart is currently only used for debug purposes.
Regards, Jens