1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*0Sstevel@tonic-gate * Use is subject to license terms. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #ifndef _SYS_PLATFORM_MODULE_H 28*0Sstevel@tonic-gate #define _SYS_PLATFORM_MODULE_H 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate #include <sys/async.h> 33*0Sstevel@tonic-gate #include <sys/sunddi.h> 34*0Sstevel@tonic-gate 35*0Sstevel@tonic-gate #ifdef __cplusplus 36*0Sstevel@tonic-gate extern "C" { 37*0Sstevel@tonic-gate #endif 38*0Sstevel@tonic-gate 39*0Sstevel@tonic-gate 40*0Sstevel@tonic-gate #ifdef _KERNEL 41*0Sstevel@tonic-gate 42*0Sstevel@tonic-gate /* 43*0Sstevel@tonic-gate * The functions that are expected of the platform modules. 44*0Sstevel@tonic-gate */ 45*0Sstevel@tonic-gate 46*0Sstevel@tonic-gate #pragma weak startup_platform 47*0Sstevel@tonic-gate #pragma weak set_platform_tsb_spares 48*0Sstevel@tonic-gate #pragma weak set_platform_defaults 49*0Sstevel@tonic-gate #pragma weak load_platform_drivers 50*0Sstevel@tonic-gate #pragma weak plat_cpu_poweron 51*0Sstevel@tonic-gate #pragma weak plat_cpu_poweroff 52*0Sstevel@tonic-gate #pragma weak plat_freelist_process 53*0Sstevel@tonic-gate #pragma weak plat_lpkmem_is_supported 54*0Sstevel@tonic-gate 55*0Sstevel@tonic-gate extern void startup_platform(void); 56*0Sstevel@tonic-gate extern int set_platform_tsb_spares(void); 57*0Sstevel@tonic-gate extern void set_platform_defaults(void); 58*0Sstevel@tonic-gate extern void load_platform_drivers(void); 59*0Sstevel@tonic-gate extern void load_platform_modules(void); 60*0Sstevel@tonic-gate extern int plat_cpu_poweron(struct cpu *cp); /* power on CPU */ 61*0Sstevel@tonic-gate extern int plat_cpu_poweroff(struct cpu *cp); /* power off CPU */ 62*0Sstevel@tonic-gate extern void plat_freelist_process(int mnode); 63*0Sstevel@tonic-gate extern void plat_build_mem_nodes(u_longlong_t *, size_t); 64*0Sstevel@tonic-gate extern void plat_slice_add(pfn_t, pfn_t); 65*0Sstevel@tonic-gate extern void plat_slice_del(pfn_t, pfn_t); 66*0Sstevel@tonic-gate extern int plat_lpkmem_is_supported(void); 67*0Sstevel@tonic-gate 68*0Sstevel@tonic-gate /* 69*0Sstevel@tonic-gate * Data structures expected of the platform modules. 70*0Sstevel@tonic-gate */ 71*0Sstevel@tonic-gate extern char *platform_module_list[]; 72*0Sstevel@tonic-gate 73*0Sstevel@tonic-gate #pragma weak plat_get_cpu_unum 74*0Sstevel@tonic-gate #pragma weak plat_get_mem_unum 75*0Sstevel@tonic-gate 76*0Sstevel@tonic-gate extern int plat_get_cpu_unum(int cpuid, char *buf, int buflen, int *len); 77*0Sstevel@tonic-gate extern int plat_get_mem_unum(int synd_code, uint64_t flt_addr, int flt_bus_id, 78*0Sstevel@tonic-gate int flt_in_memory, ushort_t flt_status, char *buf, int buflen, int *len); 79*0Sstevel@tonic-gate 80*0Sstevel@tonic-gate #pragma weak plat_log_fruid_error 81*0Sstevel@tonic-gate 82*0Sstevel@tonic-gate extern void plat_log_fruid_error(int synd_code, struct async_flt *ecc, 83*0Sstevel@tonic-gate char *unum, uint64_t afsr_bit); 84*0Sstevel@tonic-gate 85*0Sstevel@tonic-gate #pragma weak plat_log_fruid_error2 86*0Sstevel@tonic-gate 87*0Sstevel@tonic-gate struct plat_ecc_ch_async_flt; 88*0Sstevel@tonic-gate 89*0Sstevel@tonic-gate extern void plat_log_fruid_error2(int msg_type, char *unum, 90*0Sstevel@tonic-gate struct async_flt *aflt, struct plat_ecc_ch_async_flt *plat_ecc_ch_flt); 91*0Sstevel@tonic-gate 92*0Sstevel@tonic-gate #pragma weak plat_ecc_capability_sc_get 93*0Sstevel@tonic-gate 94*0Sstevel@tonic-gate extern int plat_ecc_capability_sc_get(int type); 95*0Sstevel@tonic-gate 96*0Sstevel@tonic-gate #pragma weak plat_blacklist 97*0Sstevel@tonic-gate 98*0Sstevel@tonic-gate extern int plat_blacklist(int cmd, const char *scheme, nvlist_t *fmri, 99*0Sstevel@tonic-gate const char *class); 100*0Sstevel@tonic-gate 101*0Sstevel@tonic-gate extern caddr_t starcat_startup_memlist(caddr_t alloc_base); 102*0Sstevel@tonic-gate extern int starcat_dr_name(char *name); 103*0Sstevel@tonic-gate 104*0Sstevel@tonic-gate #pragma weak plat_setprop_enter 105*0Sstevel@tonic-gate #pragma weak plat_setprop_exit 106*0Sstevel@tonic-gate #pragma weak plat_shared_i2c_enter 107*0Sstevel@tonic-gate #pragma weak plat_shared_i2c_exit 108*0Sstevel@tonic-gate #pragma weak plat_fan_blast 109*0Sstevel@tonic-gate 110*0Sstevel@tonic-gate extern void plat_setprop_enter(void); 111*0Sstevel@tonic-gate extern void plat_setprop_exit(void); 112*0Sstevel@tonic-gate extern void plat_shared_i2c_enter(dev_info_t *); 113*0Sstevel@tonic-gate extern void plat_shared_i2c_exit(dev_info_t *); 114*0Sstevel@tonic-gate extern void plat_fan_blast(void); 115*0Sstevel@tonic-gate 116*0Sstevel@tonic-gate /* 117*0Sstevel@tonic-gate * Used to communicate DR updates to platform lgroup framework 118*0Sstevel@tonic-gate */ 119*0Sstevel@tonic-gate typedef struct { 120*0Sstevel@tonic-gate int u_board; 121*0Sstevel@tonic-gate uint64_t u_base; 122*0Sstevel@tonic-gate uint64_t u_len; 123*0Sstevel@tonic-gate } update_membounds_t; 124*0Sstevel@tonic-gate 125*0Sstevel@tonic-gate #endif /* _KERNEL */ 126*0Sstevel@tonic-gate 127*0Sstevel@tonic-gate #ifdef __cplusplus 128*0Sstevel@tonic-gate } 129*0Sstevel@tonic-gate #endif 130*0Sstevel@tonic-gate 131*0Sstevel@tonic-gate #endif /* _SYS_PLATFORM_MODULE_H */ 132