11991Sheppo /* 21991Sheppo * CDDL HEADER START 31991Sheppo * 41991Sheppo * The contents of this file are subject to the terms of the 51991Sheppo * Common Development and Distribution License (the "License"). 61991Sheppo * You may not use this file except in compliance with the License. 71991Sheppo * 81991Sheppo * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 91991Sheppo * or http://www.opensolaris.org/os/licensing. 101991Sheppo * See the License for the specific language governing permissions 111991Sheppo * and limitations under the License. 121991Sheppo * 131991Sheppo * When distributing Covered Code, include this CDDL HEADER in each 141991Sheppo * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 151991Sheppo * If applicable, add the following below this CDDL HEADER, with the 161991Sheppo * fields enclosed by brackets "[]" replaced with your own identifying 171991Sheppo * information: Portions Copyright [yyyy] [name of copyright owner] 181991Sheppo * 191991Sheppo * CDDL HEADER END 201991Sheppo */ 211991Sheppo 221991Sheppo /* 23*11833SMichael.Christensen@Sun.COM * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 241991Sheppo * Use is subject to license terms. 251991Sheppo */ 261991Sheppo 271991Sheppo #ifndef _LDOMS_H 281991Sheppo #define _LDOMS_H 291991Sheppo 301991Sheppo #ifdef __cplusplus 311991Sheppo extern "C" { 321991Sheppo #endif 331991Sheppo 34*11833SMichael.Christensen@Sun.COM #include <sys/param.h> 351991Sheppo 361991Sheppo /* 371991Sheppo * Global LDoms definitions. 381991Sheppo */ 391991Sheppo 409535SMichael.Christensen@Sun.COM /* 419535SMichael.Christensen@Sun.COM * LDOMS_MAX_DOMAINS refers to the maximum theoretical number of 429535SMichael.Christensen@Sun.COM * domains supported by Solaris based on per-domain resources that 439535SMichael.Christensen@Sun.COM * are allocated. The actual number of domains supported by a 449535SMichael.Christensen@Sun.COM * platform is defined by the firmware. 459535SMichael.Christensen@Sun.COM * 469535SMichael.Christensen@Sun.COM * When adjusting this value please ensure that resources such 479535SMichael.Christensen@Sun.COM * as the following are approriately scaled: 489535SMichael.Christensen@Sun.COM * - channel nexus interrupt cookies 499535SMichael.Christensen@Sun.COM * - domain services ports 509535SMichael.Christensen@Sun.COM * - NCPUS 519535SMichael.Christensen@Sun.COM * - etc... 529535SMichael.Christensen@Sun.COM */ 539535SMichael.Christensen@Sun.COM #define LDOMS_MAX_DOMAINS 512 541991Sheppo 551991Sheppo /* maximum number of characters in the logical domain name */ 56*11833SMichael.Christensen@Sun.COM #define LDOMS_MAX_NAME_LEN MAXNAMELEN 571991Sheppo 581991Sheppo /* 592531Snarayan * Global flags that indicate what domaining features are 602531Snarayan * available, if any. The value is set at boot time based on 612531Snarayan * the value of the 'domaining-enabled' property in the MD 622531Snarayan * and the global override flag 'force_domaining_disabled'. 632531Snarayan * Updates to this variable after boot are not supported. 641991Sheppo */ 652531Snarayan extern uint_t domaining_capabilities; 662531Snarayan 672531Snarayan /* values for domaining_capabilities word (above) */ 682531Snarayan #define DOMAINING_SUPPORTED 0x1 692531Snarayan #define DOMAINING_ENABLED 0x2 701991Sheppo 714776Sjm22469 #define domaining_supported() \ 724776Sjm22469 ((domaining_capabilities & DOMAINING_SUPPORTED) != 0) 734776Sjm22469 #define domaining_enabled() \ 744776Sjm22469 ((domaining_capabilities & DOMAINING_ENABLED) != 0) 754776Sjm22469 761991Sheppo 771991Sheppo #ifdef __cplusplus 781991Sheppo } 791991Sheppo #endif 801991Sheppo 811991Sheppo #endif /* _LDOMS_H */ 82