11ae08745Sheppo /* 21ae08745Sheppo * CDDL HEADER START 31ae08745Sheppo * 41ae08745Sheppo * The contents of this file are subject to the terms of the 51ae08745Sheppo * Common Development and Distribution License (the "License"). 61ae08745Sheppo * You may not use this file except in compliance with the License. 71ae08745Sheppo * 81ae08745Sheppo * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 91ae08745Sheppo * or http://www.opensolaris.org/os/licensing. 101ae08745Sheppo * See the License for the specific language governing permissions 111ae08745Sheppo * and limitations under the License. 121ae08745Sheppo * 131ae08745Sheppo * When distributing Covered Code, include this CDDL HEADER in each 141ae08745Sheppo * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 151ae08745Sheppo * If applicable, add the following below this CDDL HEADER, with the 161ae08745Sheppo * fields enclosed by brackets "[]" replaced with your own identifying 171ae08745Sheppo * information: Portions Copyright [yyyy] [name of copyright owner] 181ae08745Sheppo * 191ae08745Sheppo * CDDL HEADER END 201ae08745Sheppo */ 211ae08745Sheppo 221ae08745Sheppo /* 23*82629e30SMike Christensen * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 241ae08745Sheppo * Use is subject to license terms. 251ae08745Sheppo */ 261ae08745Sheppo 271ae08745Sheppo #ifndef _LDOMS_H 281ae08745Sheppo #define _LDOMS_H 291ae08745Sheppo 301ae08745Sheppo #ifdef __cplusplus 311ae08745Sheppo extern "C" { 321ae08745Sheppo #endif 331ae08745Sheppo 34*82629e30SMike Christensen #include <sys/param.h> 351ae08745Sheppo 361ae08745Sheppo /* 371ae08745Sheppo * Global LDoms definitions. 381ae08745Sheppo */ 391ae08745Sheppo 403ef557bfSMike Christensen /* 413ef557bfSMike Christensen * LDOMS_MAX_DOMAINS refers to the maximum theoretical number of 423ef557bfSMike Christensen * domains supported by Solaris based on per-domain resources that 433ef557bfSMike Christensen * are allocated. The actual number of domains supported by a 443ef557bfSMike Christensen * platform is defined by the firmware. 453ef557bfSMike Christensen * 463ef557bfSMike Christensen * When adjusting this value please ensure that resources such 473ef557bfSMike Christensen * as the following are approriately scaled: 483ef557bfSMike Christensen * - channel nexus interrupt cookies 493ef557bfSMike Christensen * - domain services ports 503ef557bfSMike Christensen * - NCPUS 513ef557bfSMike Christensen * - etc... 523ef557bfSMike Christensen */ 533ef557bfSMike Christensen #define LDOMS_MAX_DOMAINS 512 541ae08745Sheppo 551ae08745Sheppo /* maximum number of characters in the logical domain name */ 56*82629e30SMike Christensen #define LDOMS_MAX_NAME_LEN MAXNAMELEN 571ae08745Sheppo 581ae08745Sheppo /* 594bac2208Snarayan * Global flags that indicate what domaining features are 604bac2208Snarayan * available, if any. The value is set at boot time based on 614bac2208Snarayan * the value of the 'domaining-enabled' property in the MD 624bac2208Snarayan * and the global override flag 'force_domaining_disabled'. 634bac2208Snarayan * Updates to this variable after boot are not supported. 641ae08745Sheppo */ 654bac2208Snarayan extern uint_t domaining_capabilities; 664bac2208Snarayan 674bac2208Snarayan /* values for domaining_capabilities word (above) */ 684bac2208Snarayan #define DOMAINING_SUPPORTED 0x1 694bac2208Snarayan #define DOMAINING_ENABLED 0x2 701ae08745Sheppo 7122e19ac1Sjm22469 #define domaining_supported() \ 7222e19ac1Sjm22469 ((domaining_capabilities & DOMAINING_SUPPORTED) != 0) 7322e19ac1Sjm22469 #define domaining_enabled() \ 7422e19ac1Sjm22469 ((domaining_capabilities & DOMAINING_ENABLED) != 0) 7522e19ac1Sjm22469 761ae08745Sheppo 771ae08745Sheppo #ifdef __cplusplus 781ae08745Sheppo } 791ae08745Sheppo #endif 801ae08745Sheppo 811ae08745Sheppo #endif /* _LDOMS_H */ 82