From 73c68c4620a062ff5e7e07752494e0bf8623b954 Mon Sep 17 00:00:00 2001 From: stsp Date: Wed, 7 Jul 2021 08:13:37 +0000 Subject: [PATCH] Recognize and ignore new debug sections found in latest iwm(4) 9k fw images. --- sys/dev/pci/if_iwm.c | 12 +++++++++++- sys/dev/pci/if_iwmreg.h | 13 ++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 59bdeb8dfe1..ed8f3c7ae91 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -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 @@ -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: diff --git a/sys/dev/pci/if_iwmreg.h b/sys/dev/pci/if_iwmreg.h index f93355f9a61..e2348d4a489 100644 --- a/sys/dev/pci/if_iwmreg.h +++ b/sys/dev/pci/if_iwmreg.h @@ -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 */ -- 2.20.1