]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Rework the EARLY_PRINTF mechanism. Instead of defining a special eprintf()
authorIan Lepore <ian@FreeBSD.org>
Wed, 12 Feb 2014 00:53:38 +0000 (00:53 +0000)
committerIan Lepore <ian@FreeBSD.org>
Wed, 12 Feb 2014 00:53:38 +0000 (00:53 +0000)
commit42c8459bed0a06ec991ee8b06158595e2039ff73
treed3f726070c72e06a4205b4833757683bb49c7245
parent2a261121af7f78208bc93aa74aeb8786dc5452bb
Rework the EARLY_PRINTF mechanism.  Instead of defining a special eprintf()
routine, now a platform can provide a pointer to an early_putc() routine
which is used instead of cn_putc().  Control can be handed off from early
printf support to standard console support by NULLing out the pointer
during standard console init.

This leverages all the existing error reporting that uses printf calls,
such as panic() which can now be usefully employed even in early
platform init code (useful at least to those who maintain that code and
build kernels with EARLY_PRINTF defined).

Reviewed by: imp, eadler
sys/arm/at91/uart_dev_at91usart.c
sys/kern/kern_cons.c
sys/kern/subr_prf.c
sys/sys/systm.h