1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_PROMIF_H 28*7c478bd9Sstevel@tonic-gate #define _SYS_PROMIF_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 33*7c478bd9Sstevel@tonic-gate #include <sys/obpdefs.h> 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gate #if defined(_KERNEL) || defined(_KMDB) 36*7c478bd9Sstevel@tonic-gate #include <sys/va_list.h> 37*7c478bd9Sstevel@tonic-gate #endif 38*7c478bd9Sstevel@tonic-gate 39*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 40*7c478bd9Sstevel@tonic-gate extern "C" { 41*7c478bd9Sstevel@tonic-gate #endif 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate /* 44*7c478bd9Sstevel@tonic-gate * These are for V0 ops only. We sometimes have to specify 45*7c478bd9Sstevel@tonic-gate * to promif which type of operation we need to perform 46*7c478bd9Sstevel@tonic-gate * and since we can't get such a property from a V0 prom, we 47*7c478bd9Sstevel@tonic-gate * sometimes just assume it. V2 and later proms do the right thing. 48*7c478bd9Sstevel@tonic-gate */ 49*7c478bd9Sstevel@tonic-gate #define BLOCK 0 50*7c478bd9Sstevel@tonic-gate #define NETWORK 1 51*7c478bd9Sstevel@tonic-gate #define BYTE 2 52*7c478bd9Sstevel@tonic-gate 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gate #if defined(_KERNEL) || defined(_KMDB) 55*7c478bd9Sstevel@tonic-gate 56*7c478bd9Sstevel@tonic-gate #if !defined(_BOOT) 57*7c478bd9Sstevel@tonic-gate /* 58*7c478bd9Sstevel@tonic-gate * Due to FCode on sun4u machines running in a pseudo-32-bit environment 59*7c478bd9Sstevel@tonic-gate * we need to enable code in several of the promif routines to ensure 60*7c478bd9Sstevel@tonic-gate * that 64-bit pointers from the kernel are not passed through the CIF 61*7c478bd9Sstevel@tonic-gate * to OpenBoot. 62*7c478bd9Sstevel@tonic-gate * 63*7c478bd9Sstevel@tonic-gate * Client programs defining this token need to provide two callbacks to 64*7c478bd9Sstevel@tonic-gate * allow the promif routines to allocate and free memory allocated from 65*7c478bd9Sstevel@tonic-gate * the bottom 32-bits of the 64-bit address space: 66*7c478bd9Sstevel@tonic-gate * 67*7c478bd9Sstevel@tonic-gate * void *promplat_alloc(size_t); 68*7c478bd9Sstevel@tonic-gate * void promplat_free(void *, size_t); 69*7c478bd9Sstevel@tonic-gate * 70*7c478bd9Sstevel@tonic-gate * The alloc function should guarantee that it will never return an 71*7c478bd9Sstevel@tonic-gate * invalid pointer. 72*7c478bd9Sstevel@tonic-gate */ 73*7c478bd9Sstevel@tonic-gate #define PROM_32BIT_ADDRS 74*7c478bd9Sstevel@tonic-gate #endif /* _BOOT */ 75*7c478bd9Sstevel@tonic-gate 76*7c478bd9Sstevel@tonic-gate typedef void promif_preprom_f(void); 77*7c478bd9Sstevel@tonic-gate typedef void promif_postprom_f(void); 78*7c478bd9Sstevel@tonic-gate 79*7c478bd9Sstevel@tonic-gate /* 80*7c478bd9Sstevel@tonic-gate * resource allocation group: OBP and IEEE 1275-1994. 81*7c478bd9Sstevel@tonic-gate * prom_alloc is platform dependent on SPARC. 82*7c478bd9Sstevel@tonic-gate */ 83*7c478bd9Sstevel@tonic-gate extern caddr_t prom_alloc(caddr_t virthint, size_t size, uint_t align); 84*7c478bd9Sstevel@tonic-gate extern void prom_free(caddr_t virt, size_t size); 85*7c478bd9Sstevel@tonic-gate 86*7c478bd9Sstevel@tonic-gate /* 87*7c478bd9Sstevel@tonic-gate * Device tree and property group: OBP and IEEE 1275-1994. 88*7c478bd9Sstevel@tonic-gate */ 89*7c478bd9Sstevel@tonic-gate extern dnode_t prom_childnode(dnode_t nodeid); 90*7c478bd9Sstevel@tonic-gate extern dnode_t prom_nextnode(dnode_t nodeid); 91*7c478bd9Sstevel@tonic-gate extern dnode_t prom_parentnode(dnode_t nodeid); 92*7c478bd9Sstevel@tonic-gate extern dnode_t prom_rootnode(void); 93*7c478bd9Sstevel@tonic-gate extern dnode_t prom_chosennode(void); 94*7c478bd9Sstevel@tonic-gate extern dnode_t prom_alias_node(void); 95*7c478bd9Sstevel@tonic-gate extern dnode_t prom_optionsnode(void); 96*7c478bd9Sstevel@tonic-gate 97*7c478bd9Sstevel@tonic-gate extern int prom_asr_list_keys_len(); 98*7c478bd9Sstevel@tonic-gate extern int prom_asr_list_keys(caddr_t value); 99*7c478bd9Sstevel@tonic-gate extern int prom_asr_export_len(); 100*7c478bd9Sstevel@tonic-gate extern int prom_asr_export(caddr_t value); 101*7c478bd9Sstevel@tonic-gate extern int prom_asr_disable(char *keystr, int keystr_len, 102*7c478bd9Sstevel@tonic-gate char *reason, int reason_len); 103*7c478bd9Sstevel@tonic-gate extern int prom_asr_enable(char *keystr, int keystr_len); 104*7c478bd9Sstevel@tonic-gate 105*7c478bd9Sstevel@tonic-gate extern int prom_getproplen(dnode_t nodeid, caddr_t name); 106*7c478bd9Sstevel@tonic-gate extern int prom_getprop(dnode_t nodeid, caddr_t name, 107*7c478bd9Sstevel@tonic-gate caddr_t value); 108*7c478bd9Sstevel@tonic-gate extern caddr_t prom_nextprop(dnode_t nodeid, caddr_t previous, 109*7c478bd9Sstevel@tonic-gate caddr_t next); 110*7c478bd9Sstevel@tonic-gate extern int prom_setprop(dnode_t nodeid, caddr_t name, 111*7c478bd9Sstevel@tonic-gate caddr_t value, int len); 112*7c478bd9Sstevel@tonic-gate 113*7c478bd9Sstevel@tonic-gate extern int prom_getnode_byname(dnode_t id, char *name); 114*7c478bd9Sstevel@tonic-gate extern int prom_devicetype(dnode_t id, char *type); 115*7c478bd9Sstevel@tonic-gate 116*7c478bd9Sstevel@tonic-gate extern char *prom_decode_composite_string(void *buf, 117*7c478bd9Sstevel@tonic-gate size_t buflen, char *prev); 118*7c478bd9Sstevel@tonic-gate 119*7c478bd9Sstevel@tonic-gate /* 120*7c478bd9Sstevel@tonic-gate * Device tree and property group: IEEE 1275-1994 Only. 121*7c478bd9Sstevel@tonic-gate */ 122*7c478bd9Sstevel@tonic-gate extern dnode_t prom_finddevice(char *path); /* Also on obp2.x */ 123*7c478bd9Sstevel@tonic-gate 124*7c478bd9Sstevel@tonic-gate extern int prom_bounded_getprop(dnode_t nodeid, 125*7c478bd9Sstevel@tonic-gate caddr_t name, caddr_t buffer, int buflen); 126*7c478bd9Sstevel@tonic-gate 127*7c478bd9Sstevel@tonic-gate extern phandle_t prom_getphandle(ihandle_t i); 128*7c478bd9Sstevel@tonic-gate 129*7c478bd9Sstevel@tonic-gate /* 130*7c478bd9Sstevel@tonic-gate * Device pathnames and pathname conversion: OBP and IEEE 1275-1994. 131*7c478bd9Sstevel@tonic-gate */ 132*7c478bd9Sstevel@tonic-gate extern int prom_devname_from_pathname(char *path, char *buffer); 133*7c478bd9Sstevel@tonic-gate extern char *prom_path_options(char *pathname); 134*7c478bd9Sstevel@tonic-gate extern char *prom_path_gettoken(char *from, char *to); 135*7c478bd9Sstevel@tonic-gate extern void prom_pathname(char *pathname); 136*7c478bd9Sstevel@tonic-gate extern void prom_strip_options(char *from, char *to); 137*7c478bd9Sstevel@tonic-gate 138*7c478bd9Sstevel@tonic-gate /* 139*7c478bd9Sstevel@tonic-gate * Device pathnames and pathname conversion: IEEE 1275-1994 only. 140*7c478bd9Sstevel@tonic-gate */ 141*7c478bd9Sstevel@tonic-gate extern int prom_ihandle_to_path(ihandle_t, char *buf, 142*7c478bd9Sstevel@tonic-gate uint_t buflen); 143*7c478bd9Sstevel@tonic-gate extern int prom_phandle_to_path(phandle_t, char *buf, 144*7c478bd9Sstevel@tonic-gate uint_t buflen); 145*7c478bd9Sstevel@tonic-gate 146*7c478bd9Sstevel@tonic-gate /* 147*7c478bd9Sstevel@tonic-gate * Special device nodes: OBP and IEEE 1275-1994. 148*7c478bd9Sstevel@tonic-gate */ 149*7c478bd9Sstevel@tonic-gate extern ihandle_t prom_stdin_ihandle(void); 150*7c478bd9Sstevel@tonic-gate extern ihandle_t prom_stdout_ihandle(void); 151*7c478bd9Sstevel@tonic-gate extern dnode_t prom_stdin_node(void); 152*7c478bd9Sstevel@tonic-gate extern dnode_t prom_stdout_node(void); 153*7c478bd9Sstevel@tonic-gate extern char *prom_stdinpath(void); 154*7c478bd9Sstevel@tonic-gate extern char *prom_stdoutpath(void); 155*7c478bd9Sstevel@tonic-gate extern int prom_stdin_devname(char *buffer); 156*7c478bd9Sstevel@tonic-gate extern int prom_stdout_devname(char *buffer); 157*7c478bd9Sstevel@tonic-gate extern int prom_stdin_is_keyboard(void); 158*7c478bd9Sstevel@tonic-gate extern int prom_stdout_is_framebuffer(void); 159*7c478bd9Sstevel@tonic-gate extern int prom_stdin_stdout_equivalence(void); 160*7c478bd9Sstevel@tonic-gate 161*7c478bd9Sstevel@tonic-gate /* 162*7c478bd9Sstevel@tonic-gate * Special device nodes: IEEE 1275-1994 only. 163*7c478bd9Sstevel@tonic-gate */ 164*7c478bd9Sstevel@tonic-gate extern ihandle_t prom_memory_ihandle(void); 165*7c478bd9Sstevel@tonic-gate extern ihandle_t prom_mmu_ihandle(void); 166*7c478bd9Sstevel@tonic-gate 167*7c478bd9Sstevel@tonic-gate /* 168*7c478bd9Sstevel@tonic-gate * Administrative group: OBP and IEEE 1275-1994. 169*7c478bd9Sstevel@tonic-gate */ 170*7c478bd9Sstevel@tonic-gate extern void prom_enter_mon(void); 171*7c478bd9Sstevel@tonic-gate extern void prom_exit_to_mon(void) 172*7c478bd9Sstevel@tonic-gate __NORETURN; 173*7c478bd9Sstevel@tonic-gate extern void prom_reboot(char *bootstr); 174*7c478bd9Sstevel@tonic-gate 175*7c478bd9Sstevel@tonic-gate extern void prom_panic(char *string) 176*7c478bd9Sstevel@tonic-gate __NORETURN; 177*7c478bd9Sstevel@tonic-gate 178*7c478bd9Sstevel@tonic-gate extern int prom_getversion(void); 179*7c478bd9Sstevel@tonic-gate extern int prom_is_openprom(void); 180*7c478bd9Sstevel@tonic-gate extern int prom_is_p1275(void); 181*7c478bd9Sstevel@tonic-gate extern int prom_version_name(char *buf, int buflen); 182*7c478bd9Sstevel@tonic-gate extern int prom_version_check(char *buf, size_t len, dnode_t *n); 183*7c478bd9Sstevel@tonic-gate 184*7c478bd9Sstevel@tonic-gate extern void *prom_mon_id(void); /* SMCC/OBP platform centric */ 185*7c478bd9Sstevel@tonic-gate 186*7c478bd9Sstevel@tonic-gate extern uint_t prom_gettime(void); 187*7c478bd9Sstevel@tonic-gate 188*7c478bd9Sstevel@tonic-gate extern char *prom_bootpath(void); 189*7c478bd9Sstevel@tonic-gate extern char *prom_bootargs(void); 190*7c478bd9Sstevel@tonic-gate 191*7c478bd9Sstevel@tonic-gate extern void prom_interpret(char *str, uintptr_t arg1, 192*7c478bd9Sstevel@tonic-gate uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, 193*7c478bd9Sstevel@tonic-gate uintptr_t arg5); 194*7c478bd9Sstevel@tonic-gate 195*7c478bd9Sstevel@tonic-gate /* 196*7c478bd9Sstevel@tonic-gate * Return code values from prom_version_check: 197*7c478bd9Sstevel@tonic-gate * 198*7c478bd9Sstevel@tonic-gate * This routine uses past-prediction mode to determine if the firmware 199*7c478bd9Sstevel@tonic-gate * on the current system is 64-bit ready. 200*7c478bd9Sstevel@tonic-gate * 201*7c478bd9Sstevel@tonic-gate * return code 2 could happen on a board-based server with a slave CPU board 202*7c478bd9Sstevel@tonic-gate * running down-rev firmware and the current master running adequate fw. 203*7c478bd9Sstevel@tonic-gate */ 204*7c478bd9Sstevel@tonic-gate #define PROM_VER64_OK 0 /* Prom is 64-bit ready (or n/a) */ 205*7c478bd9Sstevel@tonic-gate #define PROM_VER64_UPGRADE 1 /* Down-rev firmware is running */ 206*7c478bd9Sstevel@tonic-gate #define PROM_VER64_SUGGEST 2 /* Down-rev firmware detected .. */ 207*7c478bd9Sstevel@tonic-gate /* .. but not currently active */ 208*7c478bd9Sstevel@tonic-gate 209*7c478bd9Sstevel@tonic-gate /* 210*7c478bd9Sstevel@tonic-gate * Administrative group: OBP only. 211*7c478bd9Sstevel@tonic-gate */ 212*7c478bd9Sstevel@tonic-gate extern int prom_sethandler(void (*v0_func)(), void (*v2_func)()); 213*7c478bd9Sstevel@tonic-gate 214*7c478bd9Sstevel@tonic-gate extern struct bootparam *prom_bootparam(void); 215*7c478bd9Sstevel@tonic-gate 216*7c478bd9Sstevel@tonic-gate /* 217*7c478bd9Sstevel@tonic-gate * Administrative group: IEEE 1275-1994 only. 218*7c478bd9Sstevel@tonic-gate */ 219*7c478bd9Sstevel@tonic-gate extern void *prom_set_callback(void *handler); 220*7c478bd9Sstevel@tonic-gate extern void prom_set_symbol_lookup(void *sym2val, void *val2sym); 221*7c478bd9Sstevel@tonic-gate 222*7c478bd9Sstevel@tonic-gate /* 223*7c478bd9Sstevel@tonic-gate * Administrative group: IEEE 1275 only. 224*7c478bd9Sstevel@tonic-gate */ 225*7c478bd9Sstevel@tonic-gate extern int prom_test(char *service); 226*7c478bd9Sstevel@tonic-gate extern int prom_test_method(char *method, dnode_t node); 227*7c478bd9Sstevel@tonic-gate 228*7c478bd9Sstevel@tonic-gate /* 229*7c478bd9Sstevel@tonic-gate * Promif support group: Generic. 230*7c478bd9Sstevel@tonic-gate */ 231*7c478bd9Sstevel@tonic-gate extern void prom_init(char *progname, void *prom_cookie); 232*7c478bd9Sstevel@tonic-gate 233*7c478bd9Sstevel@tonic-gate extern void prom_set_preprom(promif_preprom_f *); 234*7c478bd9Sstevel@tonic-gate extern void prom_set_postprom(promif_postprom_f *); 235*7c478bd9Sstevel@tonic-gate extern void prom_suspend_prepost(void); 236*7c478bd9Sstevel@tonic-gate extern void prom_resume_prepost(void); 237*7c478bd9Sstevel@tonic-gate 238*7c478bd9Sstevel@tonic-gate extern void (*prom_set_nextprop_preprom(void (*)(void)))(void); 239*7c478bd9Sstevel@tonic-gate extern void (*prom_set_nextprop_postprom(void (*)(void)))(void); 240*7c478bd9Sstevel@tonic-gate 241*7c478bd9Sstevel@tonic-gate extern void prom_montrap(void (*funcptr)()); 242*7c478bd9Sstevel@tonic-gate 243*7c478bd9Sstevel@tonic-gate typedef uint_t prom_generation_cookie_t; 244*7c478bd9Sstevel@tonic-gate 245*7c478bd9Sstevel@tonic-gate extern int prom_tree_access(int (*callback)(void *arg, 246*7c478bd9Sstevel@tonic-gate int has_changed), void *arg, 247*7c478bd9Sstevel@tonic-gate prom_generation_cookie_t *); 248*7c478bd9Sstevel@tonic-gate extern int prom_tree_update(int (*callback)(void *arg), void *arg); 249*7c478bd9Sstevel@tonic-gate 250*7c478bd9Sstevel@tonic-gate /* 251*7c478bd9Sstevel@tonic-gate * I/O Group: OBP and IEEE 1275. 252*7c478bd9Sstevel@tonic-gate */ 253*7c478bd9Sstevel@tonic-gate extern uchar_t prom_getchar(void); 254*7c478bd9Sstevel@tonic-gate extern void prom_putchar(char c); 255*7c478bd9Sstevel@tonic-gate extern int prom_mayget(void); 256*7c478bd9Sstevel@tonic-gate extern int prom_mayput(char c); 257*7c478bd9Sstevel@tonic-gate 258*7c478bd9Sstevel@tonic-gate extern int prom_open(char *name); 259*7c478bd9Sstevel@tonic-gate extern int prom_close(int fd); 260*7c478bd9Sstevel@tonic-gate extern ssize_t prom_read(ihandle_t fd, caddr_t buf, size_t len, 261*7c478bd9Sstevel@tonic-gate uint_t startblk, char type); 262*7c478bd9Sstevel@tonic-gate extern ssize_t prom_write(ihandle_t fd, caddr_t buf, size_t len, 263*7c478bd9Sstevel@tonic-gate uint_t startblk, char type); 264*7c478bd9Sstevel@tonic-gate extern int prom_seek(int fd, u_longlong_t offset); 265*7c478bd9Sstevel@tonic-gate 266*7c478bd9Sstevel@tonic-gate extern void prom_writestr(const char *buf, size_t bufsize); 267*7c478bd9Sstevel@tonic-gate extern void prom_dnode_to_pathname(dnode_t, char *); 268*7c478bd9Sstevel@tonic-gate 269*7c478bd9Sstevel@tonic-gate /*PRINTFLIKE1*/ 270*7c478bd9Sstevel@tonic-gate extern void prom_printf(const char *fmt, ...) 271*7c478bd9Sstevel@tonic-gate __PRINTFLIKE(1); 272*7c478bd9Sstevel@tonic-gate #pragma rarely_called(prom_printf) 273*7c478bd9Sstevel@tonic-gate 274*7c478bd9Sstevel@tonic-gate extern void prom_vprintf(const char *fmt, __va_list adx) 275*7c478bd9Sstevel@tonic-gate __VPRINTFLIKE(1); 276*7c478bd9Sstevel@tonic-gate #pragma rarely_called(prom_vprintf) 277*7c478bd9Sstevel@tonic-gate 278*7c478bd9Sstevel@tonic-gate /*PRINTFLIKE2*/ 279*7c478bd9Sstevel@tonic-gate extern char *prom_sprintf(char *s, const char *fmt, ...) 280*7c478bd9Sstevel@tonic-gate __PRINTFLIKE(2); 281*7c478bd9Sstevel@tonic-gate extern char *prom_vsprintf(char *s, const char *fmt, __va_list adx) 282*7c478bd9Sstevel@tonic-gate __VPRINTFLIKE(2); 283*7c478bd9Sstevel@tonic-gate 284*7c478bd9Sstevel@tonic-gate #define PROM_WALK_CONTINUE 0 /* keep walking to next node */ 285*7c478bd9Sstevel@tonic-gate #define PROM_WALK_TERMINATE 1 /* abort walk now */ 286*7c478bd9Sstevel@tonic-gate 287*7c478bd9Sstevel@tonic-gate extern void prom_walk_devs(dnode_t node, 288*7c478bd9Sstevel@tonic-gate int (*f)(dnode_t, void *, void *), 289*7c478bd9Sstevel@tonic-gate void *arg, void *result); 290*7c478bd9Sstevel@tonic-gate 291*7c478bd9Sstevel@tonic-gate extern dnode_t prom_findnode_byname(dnode_t id, char *name); 292*7c478bd9Sstevel@tonic-gate extern dnode_t prom_findnode_bydevtype(dnode_t id, char *devtype); 293*7c478bd9Sstevel@tonic-gate 294*7c478bd9Sstevel@tonic-gate #define PROM_STOP { \ 295*7c478bd9Sstevel@tonic-gate prom_printf("File %s line %d\n", __FILE__, __LINE__); \ 296*7c478bd9Sstevel@tonic-gate prom_enter_mon(); \ 297*7c478bd9Sstevel@tonic-gate } 298*7c478bd9Sstevel@tonic-gate 299*7c478bd9Sstevel@tonic-gate #endif /* _KERNEL || _KMDB */ 300*7c478bd9Sstevel@tonic-gate 301*7c478bd9Sstevel@tonic-gate #ifdef _KERNEL 302*7c478bd9Sstevel@tonic-gate 303*7c478bd9Sstevel@tonic-gate /* 304*7c478bd9Sstevel@tonic-gate * Used by wrappers which bring up console frame buffer before prom_printf() 305*7c478bd9Sstevel@tonic-gate * and other prom calls that may output to the console. Struct is filled in 306*7c478bd9Sstevel@tonic-gate * in prom_env.c and in sunpm.c 307*7c478bd9Sstevel@tonic-gate */ 308*7c478bd9Sstevel@tonic-gate 309*7c478bd9Sstevel@tonic-gate typedef struct promif_owrap { 310*7c478bd9Sstevel@tonic-gate void (*preout)(void); 311*7c478bd9Sstevel@tonic-gate void (*postout)(void); 312*7c478bd9Sstevel@tonic-gate } promif_owrap_t; 313*7c478bd9Sstevel@tonic-gate 314*7c478bd9Sstevel@tonic-gate /* 315*7c478bd9Sstevel@tonic-gate * WAN boot key storage interface 316*7c478bd9Sstevel@tonic-gate */ 317*7c478bd9Sstevel@tonic-gate int prom_set_security_key(char *keyname, caddr_t buf, int buflen, int *reslen, 318*7c478bd9Sstevel@tonic-gate int *status); 319*7c478bd9Sstevel@tonic-gate int prom_get_security_key(char *keyname, caddr_t buf, int buflen, int *keylen, 320*7c478bd9Sstevel@tonic-gate int *status); 321*7c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 322*7c478bd9Sstevel@tonic-gate 323*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 324*7c478bd9Sstevel@tonic-gate } 325*7c478bd9Sstevel@tonic-gate #endif 326*7c478bd9Sstevel@tonic-gate 327*7c478bd9Sstevel@tonic-gate #endif /* _SYS_PROMIF_H */ 328