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


   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 /*
  23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.

  25  */
  26 
  27 #ifndef _SYS_PROMIF_H
  28 #define _SYS_PROMIF_H
  29 
  30 #pragma ident   "%Z%%M% %I%     %E% SMI"
  31 
  32 #include <sys/types.h>
  33 #include <sys/obpdefs.h>
  34 
  35 #if defined(_KERNEL) || defined(_KMDB)
  36 #include <sys/va_list.h>
  37 #endif
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 /*
  44  *  These are for V0 ops only.  We sometimes have to specify
  45  *  to promif which type of operation we need to perform
  46  *  and since we can't get such a property from a V0 prom, we
  47  *  sometimes just assume it.  V2 and later proms do the right thing.
  48  */
  49 #define BLOCK   0
  50 #define NETWORK 1
  51 #define BYTE    2


 168  * Special device nodes: IEEE 1275-1994 only.
 169  */
 170 extern  ihandle_t       prom_memory_ihandle(void);
 171 extern  ihandle_t       prom_mmu_ihandle(void);
 172 
 173 /*
 174  * Administrative group: OBP and IEEE 1275-1994.
 175  */
 176 extern  void            prom_enter_mon(void);
 177 extern  void            prom_exit_to_mon(void)
 178         __NORETURN;
 179 extern  void            prom_reboot(char *bootstr);
 180 
 181 extern  void            prom_panic(char *string)
 182         __NORETURN;
 183 
 184 extern  int             prom_getversion(void);
 185 extern  int             prom_is_openprom(void);
 186 extern  int             prom_is_p1275(void);
 187 extern  int             prom_version_name(char *buf, int buflen);
 188 extern  int             prom_version_check(char *buf, size_t len, pnode_t *n);
 189 
 190 extern  void            *prom_mon_id(void);     /* SMCC/OBP platform centric */
 191 
 192 extern  uint_t          prom_gettime(void);
 193 
 194 extern  char            *prom_bootpath(void);
 195 extern  char            *prom_bootargs(void);
 196 
 197 extern  void            prom_interpret(char *str, uintptr_t arg1,
 198                             uintptr_t arg2, uintptr_t arg3, uintptr_t arg4,
 199                             uintptr_t arg5);
 200 
 201 /*
 202  * Return code values from prom_version_check:
 203  *
 204  * This routine uses past-prediction mode to determine if the firmware
 205  * on the current system is 64-bit ready.
 206  *
 207  * return code 2 could happen on a board-based server with a slave CPU board
 208  * running down-rev firmware and the current master running adequate fw.
 209  */
 210 #define PROM_VER64_OK           0       /* Prom is 64-bit ready (or n/a) */
 211 #define PROM_VER64_UPGRADE      1       /* Down-rev firmware is running */
 212 #define PROM_VER64_SUGGEST      2       /* Down-rev firmware detected .. */
 213                                         /* .. but not currently active */
 214 
 215 /*
 216  * Administrative group: OBP only.
 217  */
 218 extern  int             prom_sethandler(void (*v0_func)(), void (*v2_func)());
 219 
 220 extern  struct bootparam *prom_bootparam(void);
 221 
 222 /*
 223  * Administrative group: IEEE 1275-1994 only.
 224  */
 225 extern void             *prom_set_callback(void *handler);
 226 extern void             prom_set_symbol_lookup(void *sym2val, void *val2sym);
 227 
 228 /*
 229  * Administrative group: IEEE 1275 only.
 230  */
 231 extern  int             prom_test(char *service);
 232 extern  int             prom_test_method(char *method, pnode_t node);
 233 
 234 /*
 235  * Promif support group: Generic.




   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 /*
  23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  * Copyright 2019 Peter Tribble.
  26  */
  27 
  28 #ifndef _SYS_PROMIF_H
  29 #define _SYS_PROMIF_H
  30 


  31 #include <sys/types.h>
  32 #include <sys/obpdefs.h>
  33 
  34 #if defined(_KERNEL) || defined(_KMDB)
  35 #include <sys/va_list.h>
  36 #endif
  37 
  38 #ifdef  __cplusplus
  39 extern "C" {
  40 #endif
  41 
  42 /*
  43  *  These are for V0 ops only.  We sometimes have to specify
  44  *  to promif which type of operation we need to perform
  45  *  and since we can't get such a property from a V0 prom, we
  46  *  sometimes just assume it.  V2 and later proms do the right thing.
  47  */
  48 #define BLOCK   0
  49 #define NETWORK 1
  50 #define BYTE    2


 167  * Special device nodes: IEEE 1275-1994 only.
 168  */
 169 extern  ihandle_t       prom_memory_ihandle(void);
 170 extern  ihandle_t       prom_mmu_ihandle(void);
 171 
 172 /*
 173  * Administrative group: OBP and IEEE 1275-1994.
 174  */
 175 extern  void            prom_enter_mon(void);
 176 extern  void            prom_exit_to_mon(void)
 177         __NORETURN;
 178 extern  void            prom_reboot(char *bootstr);
 179 
 180 extern  void            prom_panic(char *string)
 181         __NORETURN;
 182 
 183 extern  int             prom_getversion(void);
 184 extern  int             prom_is_openprom(void);
 185 extern  int             prom_is_p1275(void);
 186 extern  int             prom_version_name(char *buf, int buflen);

 187 
 188 extern  void            *prom_mon_id(void);     /* SMCC/OBP platform centric */
 189 
 190 extern  uint_t          prom_gettime(void);
 191 
 192 extern  char            *prom_bootpath(void);
 193 extern  char            *prom_bootargs(void);
 194 
 195 extern  void            prom_interpret(char *str, uintptr_t arg1,
 196                             uintptr_t arg2, uintptr_t arg3, uintptr_t arg4,
 197                             uintptr_t arg5);
 198 
 199 /*














 200  * Administrative group: OBP only.
 201  */
 202 extern  int             prom_sethandler(void (*v0_func)(), void (*v2_func)());
 203 
 204 extern  struct bootparam *prom_bootparam(void);
 205 
 206 /*
 207  * Administrative group: IEEE 1275-1994 only.
 208  */
 209 extern void             *prom_set_callback(void *handler);
 210 extern void             prom_set_symbol_lookup(void *sym2val, void *val2sym);
 211 
 212 /*
 213  * Administrative group: IEEE 1275 only.
 214  */
 215 extern  int             prom_test(char *service);
 216 extern  int             prom_test_method(char *method, pnode_t node);
 217 
 218 /*
 219  * Promif support group: Generic.