1*4437Sdhain#! /usr/bin/sh 2*4437Sdhain# 3*4437Sdhain# CDDL HEADER START 4*4437Sdhain# 5*4437Sdhain# The contents of this file are subject to the terms of the 6*4437Sdhain# Common Development and Distribution License (the "License"). 7*4437Sdhain# You may not use this file except in compliance with the License. 8*4437Sdhain# 9*4437Sdhain# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*4437Sdhain# or http://www.opensolaris.org/os/licensing. 11*4437Sdhain# See the License for the specific language governing permissions 12*4437Sdhain# and limitations under the License. 13*4437Sdhain# 14*4437Sdhain# When distributing Covered Code, include this CDDL HEADER in each 15*4437Sdhain# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*4437Sdhain# If applicable, add the following below this CDDL HEADER, with the 17*4437Sdhain# fields enclosed by brackets "[]" replaced with your own identifying 18*4437Sdhain# information: Portions Copyright [yyyy] [name of copyright owner] 19*4437Sdhain# 20*4437Sdhain# CDDL HEADER END 21*4437Sdhain# 22*4437Sdhain# 23*4437Sdhain# ident "%Z%%M% %I% %E% SMI" 24*4437Sdhain# 25*4437Sdhain# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 26*4437Sdhain# Use is subject to license terms. 27*4437Sdhain# 28*4437Sdhain# Efcode cleanup 29*4437Sdhain# Disable efdaemon on target systems not supporting Embedded Fcode Interpreter 30*4437Sdhain# Enable efdaemon on target systems supporting Embedded Fcode Interpreter 31*4437Sdhain# 32*4437Sdhain# We may need to enable/disable the efdaemon services in SMF. This could 33*4437Sdhain# happen if the system the flash was created on and the target system support 34*4437Sdhain# different hotplug implementations. 35*4437Sdhain# 36*4437SdhainARCH=`/usr/bin/uname -m` 37*4437Sdhain 38*4437Sdhain# 39*4437Sdhain# arch == sun4u 40*4437Sdhain# 41*4437Sdhain# Not all sun4u platforms support efcode. 42*4437Sdhain# Daemon support is based upon finding the 43*4437Sdhain# "pcicfg.e (PCIe/PCI Config (EFCode Enabled)" 44*4437Sdhain# module in the modinfo output 45*4437Sdhain# 46*4437Sdhainif [ `/usr/sbin/modinfo | /usr/bin/grep -c pcicfg` != "0" ]; then 47*4437Sdhain echo "/usr/sbin/svcadm enable /platform/${ARCH}/efdaemon:default" >> \ 48*4437Sdhain ${FLASH_ROOT}/var/svc/profile/upgrade 49*4437Sdhainelse 50*4437Sdhain echo "/usr/sbin/svcadm disable /platform/${ARCH}/efdaemon:default" >> \ 51*4437Sdhain ${FLASH_ROOT}/var/svc/profile/upgrade 52*4437Sdhainfi 53