soc/xtensa/intel_adsp: Add arch_printk_char_out hook

Add a printk default hook that works in very early boot and doesn't
depend on the logging subsystem (which can still be used if desired,
of course).  It speaks the same protocol, is somewhat smaller (MUCH
smaller if the app doesn't otherwise need the logging and ring buffer
dependencies), and more efficiently uses the output slot space by
doing line buffering and flushing only when needed.

Most importantly this one is MP-safe via both locking and cache
coherence management, and can work reliably when SMP is enabled.
(Note that "reliable" means that all output appears without corruption
-- simulateous logging by two CPUs can still interleave bytes, of
course).

Longer term, if we keep this protocol it would be good to unify the
two backends to reduce duplicated code.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
3 files changed