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