Recognize and ignore new debug sections found in latest iwm(4) 9k fw images.
authorstsp <stsp@openbsd.org>
Wed, 7 Jul 2021 08:13:37 +0000 (08:13 +0000)
committerstsp <stsp@openbsd.org>
Wed, 7 Jul 2021 08:13:37 +0000 (08:13 +0000)
sys/dev/pci/if_iwm.c
sys/dev/pci/if_iwmreg.h

index 59bdeb8..ed8f3c7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_iwm.c,v 1.334 2021/07/07 08:05:11 stsp Exp $       */
+/*     $OpenBSD: if_iwm.c,v 1.335 2021/07/07 08:13:37 stsp Exp $       */
 
 /*
  * Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -920,6 +920,16 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode_type ucode_type)
 
                case IWM_UCODE_TLV_FW_DBG_DEST:
                case IWM_UCODE_TLV_FW_DBG_CONF:
+               case IWM_UCODE_TLV_UMAC_DEBUG_ADDRS:
+               case IWM_UCODE_TLV_LMAC_DEBUG_ADDRS:
+               case IWM_UCODE_TLV_TYPE_DEBUG_INFO:
+               case IWM_UCODE_TLV_TYPE_BUFFER_ALLOCATION:
+               case IWM_UCODE_TLV_TYPE_HCMD:
+               case IWM_UCODE_TLV_TYPE_REGIONS:
+               case IWM_UCODE_TLV_TYPE_TRIGGERS:
+                       break;
+
+               case IWM_UCODE_TLV_HW_TYPE:
                        break;
 
                case IWM_UCODE_TLV_FW_MEM_SEG:
index f93355f..e2348d4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_iwmreg.h,v 1.54 2021/07/07 08:05:11 stsp Exp $     */
+/*     $OpenBSD: if_iwmreg.h,v 1.55 2021/07/07 08:13:37 stsp Exp $     */
 
 /******************************************************************************
  *
@@ -1094,6 +1094,17 @@ struct iwm_ucode_header {
 #define IWM_UCODE_TLV_FW_DBG_TRIGGER   40
 #define IWM_UCODE_TLV_FW_GSCAN_CAPA    50
 #define IWM_UCODE_TLV_FW_MEM_SEG       51
+#define IWM_UCODE_TLV_UMAC_DEBUG_ADDRS 54
+#define IWM_UCODE_TLV_LMAC_DEBUG_ADDRS 55
+#define IWM_UCODE_TLV_HW_TYPE          58
+
+#define IWM_UCODE_TLV_DEBUG_BASE               0x1000005
+#define IWM_UCODE_TLV_TYPE_DEBUG_INFO          (IWM_UCODE_TLV_DEBUG_BASE + 0)
+#define IWM_UCODE_TLV_TYPE_BUFFER_ALLOCATION   (IWM_UCODE_TLV_DEBUG_BASE + 1)
+#define IWM_UCODE_TLV_TYPE_HCMD                        (IWM_UCODE_TLV_DEBUG_BASE + 2)
+#define IWM_UCODE_TLV_TYPE_REGIONS             (IWM_UCODE_TLV_DEBUG_BASE + 3)
+#define IWM_UCODE_TLV_TYPE_TRIGGERS            (IWM_UCODE_TLV_DEBUG_BASE + 4)
+#define IWM_UCODE_TLV_DEBUG_MAX                        IWM_UCODE_TLV_TYPE_TRIGGERS
 
 struct iwm_ucode_tlv {
        uint32_t type;          /* see above */