Ignore:
Timestamp:
2021-09-15T15:01:03Z (3 years ago)
Author:
Martin Decky <martin@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5ecac7e
Parents:
8ce56a6
Message:

Improve early kernel debugging prints

Since the early kernel debugging prints are useful only in a few
debugging scenarios, define a configuration option that disables them by
default (if enabled, it produces duplicate output which might be
confusing).

Implement early kernel debugging prints for the HiKey960.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm64/src/mach/hikey960/hikey960.c

    r8ce56a6 rebb3538  
    122122}
    123123
     124static void hikey960_early_uart_output(char32_t c)
     125{
     126        volatile uint32_t *uartdr = (volatile uint32_t *)
     127            PA2KA(HIKEY960_UART_ADDRESS);
     128        volatile uint32_t *uartfr = (volatile uint32_t *)
     129            PA2KA(HIKEY960_UART_ADDRESS + 24);
     130
     131        while (*uartfr & 0x20U) {
     132        }
     133
     134        *uartdr = c;
     135}
     136
    124137struct arm_machine_ops hikey960_machine_ops = {
    125138        hikey960_init,
     
    129142        hikey960_enable_vtimer_irq,
    130143        hikey960_get_irq_count,
    131         hikey960_get_platform_name
     144        hikey960_get_platform_name,
     145        hikey960_early_uart_output
    132146};
    133147
Note: See TracChangeset for help on using the changeset viewer.