Print this page
11630 remove checks for 64-bit capable hardware
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/openpromio.h
+++ new/usr/src/uts/common/sys/openpromio.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 + * Copyright 2019 Peter Tribble.
24 25 */
25 26
26 27 #ifndef _SYS_OPENPROMIO_H
27 28 #define _SYS_OPENPROMIO_H
28 29
29 30 /* From SunOS 4.1.1 <sundev/openpromio.h> */
30 31
31 32 #ifdef __cplusplus
32 33 extern "C" {
33 34 #endif
34 35
35 36 /*
36 37 * XXX HACK ALERT
37 38 *
38 39 * You might think that this interface could support setting non-ASCII
39 40 * property values. Unfortunately the 4.0.3c openprom driver SETOPT
40 41 * code ignores oprom_size and uses strlen() to compute the length of
41 42 * the value. The 4.0.3c openprom eeprom command makes its contribution
42 43 * by not setting oprom_size to anything meaningful. So, if we want the
43 44 * driver to trust oprom_size we have to use SETOPT2. XXX.
44 45 */
45 46 struct openpromio {
46 47 uint_t oprom_size; /* real size of following array */
47 48 union {
48 49 char b[1]; /* For property names and values */
49 50 /* NB: Adjacent, Null terminated */
50 51 int i;
51 52 } opio_u;
52 53 };
53 54
54 55 #define oprom_array opio_u.b
55 56 #define oprom_node opio_u.i
56 57 #define oprom_len opio_u.i
57 58
58 59 /*
59 60 * OPROMMAXPARAM is used as a limit by the driver, and it has been
60 61 * increased to be 4 times the largest possible size of a property,
61 62 * which is 8K (nvramrc property).
62 63 */
63 64 #define OPROMMAXPARAM 32768 /* max size of array */
64 65
65 66 /*
66 67 * Note that all OPROM ioctl codes are type void. Since the amount
67 68 * of data copied in/out may (and does) vary, the openprom driver
68 69 * handles the copyin/copyout itself.
69 70 */
70 71 #define OIOC ('O'<<8)
71 72 #define OPROMGETOPT (OIOC | 1)
72 73 #define OPROMSETOPT (OIOC | 2)
73 74 #define OPROMNXTOPT (OIOC | 3)
74 75 #define OPROMSETOPT2 (OIOC | 4) /* working OPROMSETOPT */
75 76 #define OPROMNEXT (OIOC | 5) /* interface to raw config_ops */
76 77 #define OPROMCHILD (OIOC | 6) /* interface to raw config_ops */
77 78 #define OPROMGETPROP (OIOC | 7) /* interface to raw config_ops */
↓ open down ↓ |
44 lines elided |
↑ open up ↑ |
78 79 #define OPROMNXTPROP (OIOC | 8) /* interface to raw config_ops */
79 80 #define OPROMU2P (OIOC | 9) /* NOT SUPPORTED after 4.x */
80 81 #define OPROMGETCONS (OIOC | 10) /* enquire which console device */
81 82 #define OPROMGETFBNAME (OIOC | 11) /* Frame buffer OBP pathname */
82 83 #define OPROMGETBOOTARGS (OIOC | 12) /* Get boot arguments */
83 84 #define OPROMGETVERSION (OIOC | 13) /* Get OpenProm Version string */
84 85 #define OPROMPATH2DRV (OIOC | 14) /* Convert prom path to driver name */
85 86 #define OPROMDEV2PROMNAME (OIOC | 15) /* Convert devfs path to prom path */
86 87 #define OPROMPROM2DEVNAME (OIOC | 16) /* Convert devfs path to prom path */
87 88 #define OPROMGETPROPLEN (OIOC | 17) /* interface to raw config_ops */
88 -#define OPROMREADY64 (OIOC | 18) /* is prom 64-bit ready? */
89 +#define OPROMREADY64 (OIOC | 18) /* DEPRECATED is prom 64-bit ready? */
89 90 #define OPROMSETNODEID (OIOC | 19) /* set current node_id */
90 91 #define OPROMSNAPSHOT (OIOC | 20) /* create a snapshot */
91 92 #define OPROMCOPYOUT (OIOC | 21) /* copyout and free snapshot */
92 93 #define OPROMLISTKEYS (OIOC | 22) /* asr-list-keys */
93 94 #define OPROMLISTKEYSLEN (OIOC | 23) /* asr-list-keys-len */
94 95 #define OPROMEXPORT (OIOC | 24) /* asr-export */
95 96 #define OPROMEXPORTLEN (OIOC | 25) /* asr-export-len */
96 97 #define OPROMGETBOOTPATH (OIOC | 26) /* Get bootpath */
97 98
98 99 /*
99 100 * Return values from OPROMGETCONS:
100 101 */
101 102
102 103 #define OPROMCONS_NOT_WSCONS 0
103 104 #define OPROMCONS_STDIN_IS_KBD 0x1 /* stdin device is kbd */
104 105 #define OPROMCONS_STDOUT_IS_FB 0x2 /* stdout is a framebuffer */
105 106 #define OPROMCONS_OPENPROM 0x4 /* supports openboot */
106 107
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 108 #ifdef __cplusplus
132 109 }
133 110 #endif
134 111
135 112 #endif /* _SYS_OPENPROMIO_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX