Print this page
11630 remove checks for 64-bit capable hardware


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.

  24  */
  25 
  26 #ifndef _SYS_OPENPROMIO_H
  27 #define _SYS_OPENPROMIO_H
  28 
  29 /* From SunOS 4.1.1 <sundev/openpromio.h> */
  30 
  31 #ifdef  __cplusplus
  32 extern "C" {
  33 #endif
  34 
  35 /*
  36  * XXX HACK ALERT
  37  *
  38  * You might think that this interface could support setting non-ASCII
  39  * property values.  Unfortunately the 4.0.3c openprom driver SETOPT
  40  * code ignores oprom_size and uses strlen() to compute the length of
  41  * the value.  The 4.0.3c openprom eeprom command makes its contribution
  42  * by not setting oprom_size to anything meaningful.  So, if we want the
  43  * driver to trust oprom_size we have to use SETOPT2.  XXX.


  68  * handles the copyin/copyout itself.
  69  */
  70 #define OIOC    ('O'<<8)
  71 #define OPROMGETOPT     (OIOC | 1)
  72 #define OPROMSETOPT     (OIOC | 2)
  73 #define OPROMNXTOPT     (OIOC | 3)
  74 #define OPROMSETOPT2    (OIOC | 4)      /* working OPROMSETOPT */
  75 #define OPROMNEXT       (OIOC | 5)      /* interface to raw config_ops */
  76 #define OPROMCHILD      (OIOC | 6)      /* interface to raw config_ops */
  77 #define OPROMGETPROP    (OIOC | 7)      /* interface to raw config_ops */
  78 #define OPROMNXTPROP    (OIOC | 8)      /* interface to raw config_ops */
  79 #define OPROMU2P        (OIOC | 9)      /* NOT SUPPORTED after 4.x */
  80 #define OPROMGETCONS    (OIOC | 10)     /* enquire which console device */
  81 #define OPROMGETFBNAME  (OIOC | 11)     /* Frame buffer OBP pathname */
  82 #define OPROMGETBOOTARGS (OIOC | 12)    /* Get boot arguments */
  83 #define OPROMGETVERSION (OIOC | 13)     /* Get OpenProm Version string */
  84 #define OPROMPATH2DRV   (OIOC | 14)     /* Convert prom path to driver name */
  85 #define OPROMDEV2PROMNAME (OIOC | 15)   /* Convert devfs path to prom path */
  86 #define OPROMPROM2DEVNAME (OIOC | 16)   /* Convert devfs path to prom path */
  87 #define OPROMGETPROPLEN (OIOC | 17)     /* interface to raw config_ops */
  88 #define OPROMREADY64    (OIOC | 18)     /* is prom 64-bit ready? */
  89 #define OPROMSETNODEID  (OIOC | 19)     /* set current node_id */
  90 #define OPROMSNAPSHOT   (OIOC | 20)     /* create a snapshot */
  91 #define OPROMCOPYOUT    (OIOC | 21)     /* copyout and free snapshot */
  92 #define OPROMLISTKEYS   (OIOC | 22)     /* asr-list-keys */
  93 #define OPROMLISTKEYSLEN (OIOC | 23)    /* asr-list-keys-len */
  94 #define OPROMEXPORT     (OIOC | 24)     /* asr-export */
  95 #define OPROMEXPORTLEN  (OIOC | 25)     /* asr-export-len */
  96 #define OPROMGETBOOTPATH        (OIOC | 26)     /* Get bootpath */
  97 
  98 /*
  99  * Return values from OPROMGETCONS:
 100  */
 101 
 102 #define OPROMCONS_NOT_WSCONS    0
 103 #define OPROMCONS_STDIN_IS_KBD  0x1     /* stdin device is kbd */
 104 #define OPROMCONS_STDOUT_IS_FB  0x2     /* stdout is a framebuffer */
 105 #define OPROMCONS_OPENPROM      0x4     /* supports openboot */
 106 
 107 #if defined(__sparc)
 108 
 109 /*
 110  * Data structure returned in oprom_array, from OPROMREADY64:
 111  *
 112  * With return codes 1 and 2, also returns nodeid, a nodeid
 113  * of a flashprom node, and a message string with the minimum version
 114  * requirement for this platform.
 115  */
 116 struct openprom_opr64 {
 117         int return_code;                /* See below */
 118         int nodeid;                     /* Valid with positive return codes */
 119         char message[1];                /* NULL terminated message string */
 120 };
 121 
 122 /*
 123  * return_code values from OPROMREADY64:
 124  */
 125 #define OP64R_READY                     0       /* ready or not applicable */
 126 #define OP64R_UPGRADE_REQUIRED          1       /* Upgrade required */
 127 #define OP64R_UPGRADE_RECOMMENDED       2       /* Upgrade recommended */
 128 
 129 #endif
 130 
 131 #ifdef __cplusplus
 132 }
 133 #endif
 134 
 135 #endif  /* _SYS_OPENPROMIO_H */


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  * Copyright 2019 Peter Tribble.
  25  */
  26 
  27 #ifndef _SYS_OPENPROMIO_H
  28 #define _SYS_OPENPROMIO_H
  29 
  30 /* From SunOS 4.1.1 <sundev/openpromio.h> */
  31 
  32 #ifdef  __cplusplus
  33 extern "C" {
  34 #endif
  35 
  36 /*
  37  * XXX HACK ALERT
  38  *
  39  * You might think that this interface could support setting non-ASCII
  40  * property values.  Unfortunately the 4.0.3c openprom driver SETOPT
  41  * code ignores oprom_size and uses strlen() to compute the length of
  42  * the value.  The 4.0.3c openprom eeprom command makes its contribution
  43  * by not setting oprom_size to anything meaningful.  So, if we want the
  44  * driver to trust oprom_size we have to use SETOPT2.  XXX.


  69  * handles the copyin/copyout itself.
  70  */
  71 #define OIOC    ('O'<<8)
  72 #define OPROMGETOPT     (OIOC | 1)
  73 #define OPROMSETOPT     (OIOC | 2)
  74 #define OPROMNXTOPT     (OIOC | 3)
  75 #define OPROMSETOPT2    (OIOC | 4)      /* working OPROMSETOPT */
  76 #define OPROMNEXT       (OIOC | 5)      /* interface to raw config_ops */
  77 #define OPROMCHILD      (OIOC | 6)      /* interface to raw config_ops */
  78 #define OPROMGETPROP    (OIOC | 7)      /* interface to raw config_ops */
  79 #define OPROMNXTPROP    (OIOC | 8)      /* interface to raw config_ops */
  80 #define OPROMU2P        (OIOC | 9)      /* NOT SUPPORTED after 4.x */
  81 #define OPROMGETCONS    (OIOC | 10)     /* enquire which console device */
  82 #define OPROMGETFBNAME  (OIOC | 11)     /* Frame buffer OBP pathname */
  83 #define OPROMGETBOOTARGS (OIOC | 12)    /* Get boot arguments */
  84 #define OPROMGETVERSION (OIOC | 13)     /* Get OpenProm Version string */
  85 #define OPROMPATH2DRV   (OIOC | 14)     /* Convert prom path to driver name */
  86 #define OPROMDEV2PROMNAME (OIOC | 15)   /* Convert devfs path to prom path */
  87 #define OPROMPROM2DEVNAME (OIOC | 16)   /* Convert devfs path to prom path */
  88 #define OPROMGETPROPLEN (OIOC | 17)     /* interface to raw config_ops */
  89 #define OPROMREADY64    (OIOC | 18)     /* DEPRECATED is prom 64-bit ready? */
  90 #define OPROMSETNODEID  (OIOC | 19)     /* set current node_id */
  91 #define OPROMSNAPSHOT   (OIOC | 20)     /* create a snapshot */
  92 #define OPROMCOPYOUT    (OIOC | 21)     /* copyout and free snapshot */
  93 #define OPROMLISTKEYS   (OIOC | 22)     /* asr-list-keys */
  94 #define OPROMLISTKEYSLEN (OIOC | 23)    /* asr-list-keys-len */
  95 #define OPROMEXPORT     (OIOC | 24)     /* asr-export */
  96 #define OPROMEXPORTLEN  (OIOC | 25)     /* asr-export-len */
  97 #define OPROMGETBOOTPATH        (OIOC | 26)     /* Get bootpath */
  98 
  99 /*
 100  * Return values from OPROMGETCONS:
 101  */
 102 
 103 #define OPROMCONS_NOT_WSCONS    0
 104 #define OPROMCONS_STDIN_IS_KBD  0x1     /* stdin device is kbd */
 105 #define OPROMCONS_STDOUT_IS_FB  0x2     /* stdout is a framebuffer */
 106 #define OPROMCONS_OPENPROM      0x4     /* supports openboot */
 107 
























 108 #ifdef __cplusplus
 109 }
 110 #endif
 111 
 112 #endif  /* _SYS_OPENPROMIO_H */