SPRADG5 January 2024 AM67 , AM67A , AM68 , AM68A , AM69 , AM69A , DRA821U , DRA821U-Q1 , DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4AEN-Q1 , TDA4AH-Q1 , TDA4AL-Q1 , TDA4AP-Q1 , TDA4VE-Q1 , TDA4VEN-Q1 , TDA4VH-Q1 , TDA4VL-Q1 , TDA4VM , TDA4VM-Q1 , TDA4VP-Q1
The software-level design of printing multi-core log to a serial port is a complex process. Understanding this multi-core log output system helps to customize the design of own system output. By default, U-BOOT and kernel will initialize a serial port for log output. For the drivers and other related information in details, see this U-BOOT/Kernel document. The control of this serial port is always on the A72 side. The log of A72 cores will be printed out directly through this serial port. However, the log of other cores is firstly put into a shared memory, and then it will be read out by the A72 application. The specific process is as follows:
typedef struct {
/**< Init by reader to 0 */
uint32_t log_rd_idx;
/**< Init by writer to 0 */
uint32_t log_wr_idx;
/**< Init by writer to APP_LOG_AREA_VALID_FLAG.
reader will ignore this CPU shared mem log
until the writer sets this
to APP_LOG_AREA_VALID_FLAG */
uint32_t log_area_is_valid;
/**< CPU sync state */
uint32_t log_cpu_sync_state;
/**< Init by writer to CPU name, used by reader to add a prefix when writing to console device */
uint8_t log_cpu_name[APP_LOG_MAX_CPU_NAME];
/**< memory into which logs are written by this CPU */
uint8_t log_mem[APP_LOG_PER_CPU_MEM_SIZE];
} app_log_cpu_shared_mem_t;