FreeBSD/sys/cddl/contrib/opensolaris/uts/common/os/fm.c
/*
 * Print any appropriate FMA banner message before the panic message.  This
 * function is called by panicsys() and prints the message for fm_panic().
 * We print the message here so that it comes after the system is quiesced.
 * A one-line summary is recorded in the log only (cmn_err(9F) with "!" prefix).
 * The rest of the message is for the console only and not needed in the log,
 * so it is printed using console_printf().  We break it up into multiple
 * chunks so as to avoid overflowing any small legacy prom_printf() buffers.
 */
Print any appropriate FMA banner message before the panic message.  This
function is called by panicsys() and prints the message for fm_panic().
We print the message here so that it comes after the system is quiesced.
A one-line summary is recorded in the log only (cmn_err(9F) with "!" prefix).
The rest of the message is for the console only and not needed in the log,
so it is printed using console_printf().  We break it up into multiple
chunks so as to avoid overflowing any small legacy prom_printf() buffers.
Print any appropriate FMA banner message before the panic message . This function is called by panicsys () and prints the message for fm_panic () . We print the message here so that it comes after the system is quiesced . A one - line summary is recorded in the log only ( cmn_err ( 9F ) with " ! " prefix ) . The rest of the message is for the console only and not needed in the log so it is printed using console_printf () . We break it up into multiple chunks so as to avoid overflowing any small legacy prom_printf () buffers .
void
fm_banner(void)
{
	timespec_t tod;
	hrtime_t now;
	if (!fm_panicstr)
		return; 
	if (panicstr) {
		tod = panic_hrestime;
		now = panic_hrtime;
	} else {
		gethrestime(&tod);
		now = gethrtime_waitfree();
	}
	cmn_err(CE_NOTE, "!SUNW-MSG-ID: %s, "
	    "TYPE: Error, VER: 1, SEVERITY: Major\n", fm_msgid);
	console_printf(
"\n\rSUNW-MSG-ID: %s, TYPE: Error, VER: 1, SEVERITY: Major\n"
"EVENT-TIME: 0x%lx.0x%lx (0x%llx)\n",
	    fm_msgid, tod.tv_sec, tod.tv_nsec, (u_longlong_t)now);
	console_printf(
"PLATFORM: %s, CSN: -, HOSTNAME: %s\n"
"SOURCE: %s, REV: %s %s\n",
	    platform, utsname.nodename, utsname.sysname,
	    utsname.release, utsname.version);
	console_printf(
"DESC: Errors have been detected that require a reboot to ensure system\n"
"integrity.  See %s/%s for more information.\n",
	    fm_url, fm_msgid);
	console_printf(
"AUTO-RESPONSE: Solaris will attempt to save and diagnose the error telemetry\n"
"IMPACT: The system will sync files, save a crash dump if needed, and reboot\n"
"REC-ACTION: Save the error summary below in case telemetry cannot be saved\n");
	console_printf("\n");
}
void fm_banner ( void ) { timespec_t tod ; hrtime_t now ; if ( ! fm_panicstr ) return ; if ( panicstr ) { tod = panic_hrestime ; now = panic_hrtime ; } else { gethrestime ( & tod ) ; now = gethrtime_waitfree ( ) ; } cmn_err ( CE_NOTE , " " " \n " , fm_msgid ) ; console_printf ( " \n \r \n " " \n " , fm_msgid , tod . tv_sec , tod . tv_nsec , ( u_longlong_t ) now ) ; console_printf ( " \n " " \n " , platform , utsname . nodename , utsname . sysname , utsname . release , utsname . version ) ; console_printf ( " \n " " \n " , fm_url , fm_msgid ) ; console_printf ( " \n " " \n " " \n " ) ; console_printf ( " \n " ) ; }
Print any appropriate FMA banner message before the panic message.
Print any appropriate FMA banner message before the panic message .
/* panic was not initiated by fm_panic(); do nothing */