82629e3015252bf18319ba3815c773df23e21436Mike Christensen * CDDL HEADER START
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * The contents of this file are subject to the terms of the
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Common Development and Distribution License (the "License").
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * You may not use this file except in compliance with the License.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * or http://www.opensolaris.org/os/licensing.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * See the License for the specific language governing permissions
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * and limitations under the License.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * When distributing Covered Code, include this CDDL HEADER in each
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * If applicable, add the following below this CDDL HEADER, with the
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * fields enclosed by brackets "[]" replaced with your own identifying
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * information: Portions Copyright [yyyy] [name of copyright owner]
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * CDDL HEADER END
1a024a4828552f36f41749085bad547c64a0f0a6Mike Christensen * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * sun4 support for libv12n.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Non-sun4v support is minimal. The v12n_capabilities() function will
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * only return 0 (not supported, not enabled, no implementation).
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * For sun4v the support for v12n_capabilities(), v12n_domain_roles(),
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * v12n_domain_name() and v12n_domain_uuid() are supported by scanning the
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * MD from /dev/mdesc for specific properties. For v12n_ctrl_domain() and
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * v12n_chassis_serialno(), the ldoms agent daemon (ldmad) on the control
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * domain supplies the required information via the "agent-system" domain
82629e3015252bf18319ba3815c773df23e21436Mike Christensen/* libds statics */
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic int (*v12n_ds_send_msg)(ds_hdl_t, void *, size_t) = NULL;
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic int (*v12n_ds_clnt_reg)(ds_capability_t *, ds_ops_t *);
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic int (*v12n_ds_unreg_svc)(char *, boolean_t);
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Defines to support the 'agent-system' domain service.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen (sizeof (v12n_ldma_system_vers) / sizeof (ds_ver_t))
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic ds_ver_t v12n_ldma_system_vers[] = { { 1, 0} };
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic void v12n_ldma_register_handler(ds_hdl_t hdl, ds_cb_arg_t arg,
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic void v12n_ldma_data_handler(ds_hdl_t hdl, ds_cb_arg_t arg, void *buf,
82629e3015252bf18319ba3815c773df23e21436Mike Christensen v12n_ldma_register_handler, /* ds_reg_cb */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen/* v12n_ldma_cv_state values */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen#define V12N_LDMA_CVINVALID -1 /* invalid value for cv_state */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen#define V12N_LDMA_REGWAITING 0 /* waiting for ctrl domain reg */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen#define V12N_LDMA_REGRECEIVED 1 /* received ctrl domain reg */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen#define V12N_LDMA_MSGWAITING 2 /* waiting for message response */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen#define V12N_LDMA_MSGRECEIVED 3 /* received message response */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen#define V12N_LDMA_MSGERROR 4 /* received a bad message */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen/* 'agent-system' data used in async registration/data message handlers */
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic ds_hdl_t v12n_ldma_ctrl_hdl = DS_INVALID_HDL;
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic mutex_t v12n_ldma_lock = DEFAULTMUTEX;
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic int v12n_ldma_cv_state = V12N_LDMA_CVINVALID;
82629e3015252bf18319ba3815c773df23e21436Mike Christensenstatic mutex_t v12n_ldma_cv_lock = DEFAULTMUTEX;
82629e3015252bf18319ba3815c773df23e21436Mike Christensen/* 'agent-system' timeout values in seconds */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen#define V12N_LDOMS_SUPPORTED (V12N_CAP_SUPPORTED | V12N_CAP_ENABLED | \
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * libv12n routines to support /dev/mdesc.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Wrapper for MD free: need unused size argument.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen/* ARGSUSED */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Wrapper for MD init: read MD and invoke md_init_intern.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Open the Machine Description (MD)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (read(fd, &mdh, sizeof (md_header_t)) != sizeof (md_header_t))
82629e3015252bf18319ba3815c773df23e21436Mike Christensen md_size = sizeof (md_header_t) + mdh.node_blk_sz + mdh.name_blk_sz +
82629e3015252bf18319ba3815c773df23e21436Mike Christensen (void) memcpy(buf, &mdh, sizeof (md_header_t));
82629e3015252bf18319ba3815c773df23e21436Mike Christensen md_size - sizeof (md_header_t)) != md_size - sizeof (md_header_t)) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen mdp = md_init_intern((uint64_t *)((void *)buf), malloc, v12n_md_free);
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Wrapper for md_fini. Allow NULL md ptr and free MD buffer.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * See if LDoms domaining is enabled, returns 1 if enabled.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Get the value of the 'domaining-enabled' property under the
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * 'platform' node. Value of 1 => domaining is enabled.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen nodes = malloc(nnodes * sizeof (mde_cookie_t));
82629e3015252bf18319ba3815c773df23e21436Mike Christensen nnodes = md_scan_dag(mdp, rootnode, md_find_name(mdp, "platform"),
82629e3015252bf18319ba3815c773df23e21436Mike Christensen (void) md_get_prop_val(mdp, nodes[0], "domaining-enabled",
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Check if this is an LDoms system. When using LDoms each
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * domain should have a /dev/mdesc device providing access to
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * the Machine Description (MD) of the domain. If this device
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * does not exist then this is not an LDoms system.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (uname(&uinfo) == -1 || strcmp(uinfo.machine, "sun4v")) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Not sun4v -> LDoms not supported
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * sun4v + /dev/mdesc exists -> Check if LDoms enabled
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * via the 'domaining-enabled' property.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen cap = (V12N_CAP_SUPPORTED | V12N_CAP_IMPL_LDOMS |
82629e3015252bf18319ba3815c773df23e21436Mike Christensen (v12n_domaining_enabled() ? V12N_CAP_ENABLED : 0));
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * sun4v + /dev/mdesc does not exist -> LDoms supported
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * but not enabled.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen cap = (V12N_CAP_SUPPORTED | V12N_CAP_IMPL_LDOMS);
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Routines to support v12n_domain_roles.
82629e3015252bf18319ba3815c773df23e21436Mike Christensenv12n_scan_md_nodes(md_t *mdp, char *node_name, char *node_str_prop,
82629e3015252bf18319ba3815c773df23e21436Mike Christensen nodes = malloc(nnodes * sizeof (mde_cookie_t));
82629e3015252bf18319ba3815c773df23e21436Mike Christensen nnodes = md_scan_dag(mdp, rootnode, md_find_name(mdp, node_name),
82629e3015252bf18319ba3815c773df23e21436Mike Christensen for (i = 0; i < nnodes; i++) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (md_get_prop_str(mdp, nodes[i], node_str_prop, &prop_str))
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Check if MD has a hypervisor access point, returns 1 if true.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Check the MD for a 'virtual-device-port' node whose 'vldc-svc-name' is
82629e3015252bf18319ba3815c773df23e21436Mike Christensen return (v12n_scan_md_nodes(mdp, "virtual-device-port", "vldc-svc-name",
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Check if MD has a virtual device service (vcc, vsw, vds), returns 1 if true.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Need to check all the MD 'virtual-device' nodes for a 'device-type' property
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * of 'vcc', 'vsw' or 'vds'.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen return (v12n_scan_md_nodes(mdp, "virtual-device", "device-type",
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Check if MD has an physical I/O device node, returns 1 if true.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen return (v12n_scan_md_nodes(mdp, "iodevice", NULL, NULL));
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Check if a MD node is root PCI device, returns 1 if true.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Need to check all the MD 'iodevice' nodes for a 'device-type' property
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * of 'pciex'.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen return (v12n_scan_md_nodes(mdp, "iodevice", "device-type", pciex));
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Get the domain roles for the domain.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_capabilities() != V12N_LDOMS_SUPPORTED) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Get domain name from MD's virtual domain service node, returns 1 on success.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * The domain name is a string property 'vlds-domain-name' under the
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * 'virtual-device' device node whose name is 'virtual-domain-service'.
82629e3015252bf18319ba3815c773df23e21436Mike Christensenv12n_get_md_domain_name(md_t *mdp, char **vds_dnamep)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen list_size = num_nodes * sizeof (mde_cookie_t);
82629e3015252bf18319ba3815c773df23e21436Mike Christensen nvdevs = md_scan_dag(mdp, rootnode, md_find_name(mdp, "virtual-device"),
82629e3015252bf18319ba3815c773df23e21436Mike Christensen for (i = 0; i < nvdevs; i++) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (md_get_prop_str(mdp, vdev_nodes[i], "name", &vldc_name))
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (strcmp(vldc_name, "virtual-domain-service") == 0) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * String copyout utility.
82629e3015252bf18319ba3815c773df23e21436Mike Christensenv12n_string_copyout(char *sout, char *sfrom, size_t count)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Get the domain name of this domain.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_capabilities() != V12N_LDOMS_SUPPORTED) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen } else if ((mdp = v12n_md_init()) == NULL) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen } else if (!v12n_get_md_domain_name(mdp, &ldmname)) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen rv = v12n_string_copyout(buf, ldmname, count);
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Get UUID string from MD, returns 1 on success.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * The UUID is a string property 'uuid' under the 'platform' node of the MD.
82629e3015252bf18319ba3815c773df23e21436Mike Christensenv12n_get_md_uuid_str(md_t *mdp, char **uuid_strp)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen list_size = num_nodes * sizeof (mde_cookie_t);
82629e3015252bf18319ba3815c773df23e21436Mike Christensen npnodes = md_scan_dag(mdp, rootnode, md_find_name(mdp, "platform"),
82629e3015252bf18319ba3815c773df23e21436Mike Christensen rv = !md_get_prop_str(mdp, plat_nodes[0], "uuid", uuid_strp);
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Get the domain UUID.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_capabilities() != V12N_LDOMS_SUPPORTED) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen } else if ((mdp = v12n_md_init()) == NULL) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen } else if (!v12n_get_md_uuid_str(mdp, &uuid_str)) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Send 'agent-sytem' request message.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_ds_send_msg == NULL || v12n_ldma_ctrl_hdl == DS_INVALID_HDL)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen return (v12n_ds_send_msg(v12n_ldma_ctrl_hdl, (char *)&ldmamsg,
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * 'agent-system' registration handler.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * If we get a registration from the control domain (domain 0), then send
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * the requested message. Otherwise, ignore the registration.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen/* ARGSUSED */
82629e3015252bf18319ba3815c773df23e21436Mike Christensenv12n_ldma_register_handler(ds_hdl_t hdl, ds_cb_arg_t arg, ds_ver_t *ver,
82629e3015252bf18319ba3815c773df23e21436Mike Christensen /* got registration from control domain */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_ldma_cv_state == V12N_LDMA_REGWAITING) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen v12n_ldma_cv_state = V12N_LDMA_REGRECEIVED;
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * 'agent-system' data handler.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen/* ARGSUSED */
82629e3015252bf18319ba3815c773df23e21436Mike Christensenv12n_ldma_data_handler(ds_hdl_t hdl, ds_cb_arg_t arg, void *buf,
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Ignore any message not from the control domain.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Ignore any unexpected message.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Ignore message with unexpected msgnum.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen ldmp->msg_info > LDMA_MESSAGE_DLEN(buflen)) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen /* ensure that data ends with a '\0' */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Control domain nodename is second string in the
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * message. Make sure there is enough data in the msg
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * to have a second string.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if ((v12n_ldma_msgstr = strdup(data)) == NULL)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if ((v12n_ldma_msgstr = strdup(data)) == NULL)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen /* v12n_ldma_msgtype must be valid */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen /* unexpected message, ignored */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * libds doesn't exist on non-sun4v, dynamically load it and get the
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * function pointers to the needed lib functions.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_ds_clnt_reg == NULL || v12n_ds_send_msg == NULL ||
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if ((v12n_ds_clnt_reg = (int (*)(ds_capability_t *, ds_ops_t *))
82629e3015252bf18319ba3815c773df23e21436Mike Christensen dlsym(v12n_ds_dlhdl, "ds_clnt_reg")) == NULL)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if ((v12n_ds_send_msg = (int (*)(ds_hdl_t, void *, size_t))
82629e3015252bf18319ba3815c773df23e21436Mike Christensen dlsym(v12n_ds_dlhdl, "ds_send_msg")) == NULL)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if ((v12n_ds_unreg_svc = (int (*)(char *, boolean_t))
82629e3015252bf18319ba3815c773df23e21436Mike Christensen dlsym(v12n_ds_dlhdl, "ds_unreg_svc")) == NULL)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Initiate and wait for an ldmad 'agent-system' domain service.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Dynamically load libds, register the client 'agent-system' service
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * and wait for a specified amount of time for the 'agent-system'
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * service on the control domain to respond to the request.
82629e3015252bf18319ba3815c773df23e21436Mike Christensenv12n_get_ldma_system_msg(int msgtype, char **strp)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Ensure that there's only one thread trying to do a
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * 'agent-system' client registration/message at a time.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen /* initialize v12n_ldma_cv_state variable before registering service */
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Other instances may be trying to load the "agent-system" service.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * If a collision happens (EBUSY error), wait and try again.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen for (tout = 0; tout < v12n_ldma_timeout; tout += v12n_ldma_sleeptime) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if ((err = v12n_ds_clnt_reg(&v12n_ldma_cap,
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Wait for control domain registration.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen while (v12n_ldma_cv_state == V12N_LDMA_REGWAITING) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if ((err = cond_reltimedwait(&v12n_ldma_cv,
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Check for timeout or an error.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_ldma_cv_state != V12N_LDMA_REGRECEIVED) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Received a registration request, send the request message.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if ((err = v12n_ldma_send_request()) != 0) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen while (v12n_ldma_cv_state == V12N_LDMA_MSGWAITING) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if ((err = cond_reltimedwait(&v12n_ldma_cv,
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_ldma_cv_state != V12N_LDMA_MSGRECEIVED) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * If v12n_ldma_msgstr is set, a valid data response was seen.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen (*strp = strdup(v12n_ldma_msgstr)) == NULL)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen v12n_ds_unreg_svc(LDMA_NAME_SYSTEM, B_TRUE);
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Get the nodename of the control domain. Returns the equivalent
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * of 'uname -n' on the control domain.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * This is obtained via the 'agent-system' domain service provided
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_capabilities() != V12N_LDOMS_SUPPORTED) {
82629e3015252bf18319ba3815c773df23e21436Mike Christensen } else if ((err = v12n_get_ldma_system_msg(LDMA_MSGSYS_GET_SYSINFO,
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * Get the Chassis serial number from the Control Domain.
82629e3015252bf18319ba3815c773df23e21436Mike Christensen * This is obtained via the 'agent-system' domain service provided
82629e3015252bf18319ba3815c773df23e21436Mike Christensenv12n_chassis_serialno(char *buf, size_t count)
82629e3015252bf18319ba3815c773df23e21436Mike Christensen if (v12n_capabilities() != V12N_LDOMS_SUPPORTED) {