Skip to content

Commit

Permalink
cxgbe(4): Initial import of the "collect" component of Chelsio unified
Browse files Browse the repository at this point in the history
debug (cudbg) code, hooked up to the main driver via an ioctl.

The ioctl can be used to collect the chip's internal state in a
compressed dump file.  These dumps can be decoded with the "view"
component of cudbg.

Obtained from:	Chelsio Communications
MFC after:	2 months
Sponsored by:	Chelsio Communications
  • Loading branch information
np-2020 committed Aug 3, 2017
1 parent da8d91e commit ccd45df
Show file tree
Hide file tree
Showing 17 changed files with 9,414 additions and 2 deletions.
12 changes: 12 additions & 0 deletions sys/conf/files
Expand Up @@ -1352,6 +1352,18 @@ dev/cxgbe/common/t4_hw.c optional cxgbe pci \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
dev/cxgbe/common/t4vf_hw.c optional cxgbev pci \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
dev/cxgbe/cudbg/cudbg_common.c optional cxgbe \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
dev/cxgbe/cudbg/cudbg_flash_utils.c optional cxgbe \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
dev/cxgbe/cudbg/cudbg_lib.c optional cxgbe \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
dev/cxgbe/cudbg/cudbg_wtp.c optional cxgbe \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
dev/cxgbe/cudbg/fastlz.c optional cxgbe \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
dev/cxgbe/cudbg/fastlz_api.c optional cxgbe \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
t4fw_cfg.c optional cxgbe \
compile-with "${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \
no-implicit-rule before-depend local \
Expand Down
11 changes: 10 additions & 1 deletion sys/dev/cxgbe/common/t4_hw.h
Expand Up @@ -276,8 +276,17 @@ enum {
FLASH_MIN_SIZE = FLASH_CFG_START + FLASH_CFG_MAX_SIZE,

/*
* Sectors 32-63 are reserved for FLASH failover.
* Sectors 32-63 for CUDBG.
*/
FLASH_CUDBG_START_SEC = 32,
FLASH_CUDBG_NSECS = 32,
FLASH_CUDBG_START = FLASH_START(FLASH_CUDBG_START_SEC),
FLASH_CUDBG_MAX_SIZE = FLASH_MAX_SIZE(FLASH_CUDBG_NSECS),

/*
* Size of defined FLASH regions.
*/
FLASH_END_SEC = 64,
};

#undef FLASH_START
Expand Down

0 comments on commit ccd45df

Please sign in to comment.