prom_init.c revision 986fd29a0dc13f7608ef7f508f6e700bd7bc2720
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A#
endif /* PROMIF_DEBUG */ 2N/A * This is the string we use to print out "panic" level messages, 2N/A * so that it's easier to identify who's doing the complaining. 2N/A * The plat_setprop_enter() and plat_setprop_exit() routines are actually 2N/A * defined as #pragma weak symbols, which confuses lint since it does not grok 2N/A * #pragma weak and thus thinks the routines are used but not defined. Until 2N/A * lint is enhanced, we workaround this with the following stubs. 2N/A * This 'do-nothing' function is called immediately before and immediately 2N/A * after entry to the PROM. Some standalones (e.g. the kernel) 2N/A * may replace this routine with their own. 2N/A * Every standalone that wants to use this library must call 2N/A * prom_init() before any of the other routines can be called. 2N/A * The only state it creates is the obp_romvec_version variable, 2N/A * and the prom_aligned_allocator variable (plus the default pre- 2N/A * and post-prom handlers, and the clientname string) 2N/A * Allow implementation to validate input argument. 2N/A * Initialize the "clientname" string with the string we've 2N/A * been handed by the standalone 2N/A * Add default pre- and post-prom handlers 2N/A * (We add this null handler to avoid the numerous tests 2N/A * that would otherwise have to be included around every call) 2N/A * Fatal promif internal error, not an external interface 2N/A * No prom interface, try to cause a trap by 2N/A * dividing by zero, leaving the message in %i0.