/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/promif_impl.h>
#include <sys/varconfig.h>
#ifndef _KMDB
static int (*ds_send)();
static int (*ds_init)();
/*
* Domains Services interaction
*/
"var-config", /* svc_id */
vc_version, /* vers */
VC_NVERS /* nvers */
};
"var-config-backup", /* svc_id */
vc_version, /* vers */
VC_NVERS /* nvers */
};
static void vc_unreg_handler(ds_cb_arg_t);
vc_reg_handler, /* ds_primary_reg_cb */
vc_unreg_handler, /* ds_primary_unreg_cb */
vc_data_handler, /* ds_data_cb */
&ds_primary_handle /* cb_arg */
};
vc_reg_handler, /* ds_backup_reg_cb */
vc_unreg_handler, /* ds_backup_unreg_cb */
vc_data_handler, /* ds_data_cb */
&ds_backup_handle /* cb_arg */
};
static void
{
}
static void
{
}
static void
{
}
/*
* Initialize the linkage with DS (Domain Services). We assume that
* the DS module has already been loaded by the platmod.
*
* The call to the DS init functions will eventually result in the
* invocation of our registration callback handlers, at which time DS
* is able to accept requests.
*/
static void
promif_ds_init(void)
{
int rv;
if ((ds_init =
(int (*)())modgetsymvalue("ds_cap_init", 0)) == 0) {
return;
}
if ((ds_send =
(int (*)())modgetsymvalue("ds_cap_send", 0)) == 0) {
return;
}
}
}
}
/*
* Prepare for ldom variable requests.
*/
void
promif_prop_init(void)
{
}
/*
* Replace the current value of a property string given its name and
* new value.
*/
int
{
int rv;
if (ds_primary_handle != DS_INVALID_HDL)
else if (ds_backup_handle != DS_INVALID_HDL)
else
return (-1);
/*
* Since we are emulating OBP, we must comply with the promif
* infrastructure and execute only on the originating cpu.
*/
sizeof (var_config_hdr_t) + paylen)) != 0) {
return (-1);
}
rv = -1;
goto out;
}
if (cmd != VAR_CONFIG_SET_RESP) {
rv = -1;
goto out;
}
out:
return (rv);
}
int
promif_setprop(void *p)
{
int len;
if (len >= 0)
}
#endif
int
promif_getprop(void *p)
{
int len;
}
int
promif_getproplen(void *p)
{
int len;
return (0);
}
int
promif_nextprop(void *p)
{
return (0);
}