Probably, I should have asked this before pushing my code.
I have a question about finalize_console_register.
Platforms call console_*_register() from C code. I do not know why we need to fill the callbacks in the assembler macro, finalize_console_register.
We could call console_register() directly from C code, like this: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/1426/3/plat/s...
Maybe, we may want to register the console so early in order to enable plat/common/aarch64/crash_console_helpers.S in the boot-up code?
Yes, I think this is mostly a hold-over from when we needed everything in assembly. Now that the main parts of the multi-console framework are written in C, the registration could be written in C as well (unless you want to specifically call it from assembly context by overriding plat_crash_console_init, but I'd recommend using the normal framework and crash_console_helper.S instead). For most current console drivers I think it's just easier to have the register function in assembly because all the rest is already written in assembly anyway, and it's just a couple of extra lines. So I think keeping the finish_console_register macro in assembly makes sense, but you could introduce an equivalent for C code if you want. Or you can just set the console_t fields directly, it's not very complicated to do from C code.