/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
int
{
char *scheme;
int err;
char *unum;
char **serids;
/* Verify FMRI scheme name and version number */
return (EINVAL);
}
/*
* There are two ways a physical address can be obtained from a mem
* scheme FMRI. One way is to use the "offset" and "serial"
* members, if they are present, together with the "unum" member to
* calculate a physical address. This is the preferred way since
* it is independent of possible changes to the programming of
* underlying hardware registers that may change the physical address.
* If the "offset" member is not present, then the address is
* retrieved from the "physaddr" member.
*/
0) {
return (EINVAL);
}
&nserids) != 0) {
return (EINVAL);
} else {
if (err != 0) {
/* Fall back to physaddr */
if (nvlist_lookup_uint64(nvl,
FM_FMRI_MEM_PHYSADDR, &pa) != 0)
return (EINVAL);
} else
return (err);
}
}
return (0);
}