Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: ram_console: add option to link console buffer to given section
Currently, the ram_console buffer is defined as a global var, its address is determined during the building and may be changed when code update. This is not a problem if the ram_console is just used in debug purpose. While in the heterogeneous SoCs, there can be multiple MPU Cores and several MCU cores, it can run multiple OS/bare-metal instances on these cores, but the UART ports may be not enough, so the ram_console can be leveraged. To make it easy to use, it's better make the console buffer fixed and predefined. This patch adds a option to link the console buffer to a given section, through the "zephyr,memory-region" device tree node, then the address can be known from the device tree node and easy to check from other cores running Linux/U-Boot. To use this option, the chosen property 'zephyr,ram-console' must be added, the following is a example: chosen { zephyr,ram-console = &ram_console; }; ram_console: memory@93d00000 { compatible = "zephyr,memory-region"; reg = <0x93d00000 DT_SIZE_K(4)>; zephyr,memory-region = "RAM_CONSOLE"; }; Signed-off-by: Hou Zhiqiang <[email protected]>
- Loading branch information