Print this page
10597 would like a way to set NMI behavior at boot
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/sys/apic_common.h
          +++ new/usr/src/uts/i86pc/sys/apic_common.h
↓ open down ↓ 15 lines elided ↑ open up ↑
  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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2017 by Delphix. All rights reserved.
  24   24   */
  25   25  /*
  26      - * Copyright 2018 Joyent, Inc.
       26 + * Copyright 2019, Joyent, Inc.
  27   27   */
  28   28  
  29   29  #ifndef _SYS_APIC_COMMON_H
  30   30  #define _SYS_APIC_COMMON_H
  31   31  
  32   32  #include <sys/psm_types.h>
  33   33  #include <sys/avintr.h>
  34   34  #include <sys/privregs.h>
  35   35  #include <sys/pci.h>
  36   36  #include <sys/cyclic.h>
↓ open down ↓ 111 lines elided ↑ open up ↑
 148  148  extern int      apic_num_cksum_errors;
 149  149  
 150  150  extern int      apic_error;
 151  151  
 152  152  /* use to make sure only one cpu handles the nmi */
 153  153  extern lock_t   apic_nmi_lock;
 154  154  /* use to make sure only one cpu handles the error interrupt */
 155  155  extern lock_t   apic_error_lock;
 156  156  
 157  157  /* Patchable global variables. */
 158      -extern int      apic_kmdb_on_nmi;       /* 0 - no, 1 - yes enter kmdb */
 159  158  extern uint32_t apic_divide_reg_init;   /* 0 - divide by 2 */
 160  159  
 161  160  extern apic_intrmap_ops_t *apic_vt_ops;
 162  161  
 163  162  #ifdef  DEBUG
 164  163  extern int      apic_break_on_cpu;
 165  164  extern int      apic_stretch_interrupts;
 166  165  extern int      apic_stretch_ISR;       /* IPL of 3 matches nothing now */
 167  166  #endif
 168  167  
↓ open down ↓ 26 lines elided ↑ open up ↑
 195  194  extern processorid_t apic_find_cpu(int flag);
 196  195  extern processorid_t apic_get_next_bind_cpu(void);
 197  196  
 198  197  extern int      apic_support_msi;
 199  198  extern int      apic_multi_msi_enable;
 200  199  extern int      apic_msix_enable;
 201  200  
 202  201  extern uint32_t apic_get_localapicid(uint32_t cpuid);
 203  202  extern uchar_t apic_get_ioapicid(uchar_t ioapicindex);
 204  203  
      204 +typedef enum nmi_action {
      205 +        NMI_ACTION_UNSET,
      206 +        NMI_ACTION_PANIC,
      207 +        NMI_ACTION_IGNORE,
      208 +        NMI_ACTION_KMDB
      209 +} nmi_action_t;
      210 +
      211 +extern nmi_action_t nmi_action;
      212 +
 205  213  #ifdef  __cplusplus
 206  214  }
 207  215  #endif
 208  216  
 209  217  #endif  /* _SYS_APIC_COMMON_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX