Skip to content

Support dcc console #701

@vabbarap

Description

@vabbarap

I added the dcc console in the ATF code in the below path
"drivers/arm/dcc/dcc_console.c"
static inline uint32_t __dcc_getstatus(void)
{
uint32_t ret;
asm volatile("mrs %0, mdccsr_el0" : "=r" (ret));
return ret;
}
int32_t console_core_putc(int32_t ch, unsigned long base_addr)
{
while (__dcc_getstatus() & DCC_STATUS_TX)
;
__dcc_putchar(ch);
return ch;
}
int32_t console_core_getc(unsigned long base_addr)
{
while (!(__dcc_getstatus() & DCC_STATUS_RX))
;
return __dcc_getchar();
}
static inline void __dcc_putchar(char c)
{
/*

  • The typecast is to make absolutely certain that 'c' is
  • zero-extended.
    */
    asm volatile("msr dbgdtrtx_el0, %0"
    : : "r" ((unsigned long)(unsigned char)c));
    isb();
    }

And i just included the "drivers/console/aarch64/deprecated_console.S"
which has the console_core_init and console_core_putc etc function calls.

But now i upgraded the ATF to V2.2 and i see the console architecture got changed a lot.
Could you please let me know if i want to port the DCC console to the ATF V2.2 what are the changes need to be done?

Thanks
Venkatesh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions