1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, v.1, (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://opensource.org/licenses/CDDL-1.0. 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 2014-2017 Cavium, Inc. 24 * The contents of this file are subject to the terms of the Common Development 25 * and Distribution License, v.1, (the "License"). 26 27 * You may not use this file except in compliance with the License. 28 29 * You can obtain a copy of the License at available 30 * at http://opensource.org/licenses/CDDL-1.0 31 32 * See the License for the specific language governing permissions and 33 * limitations under the License. 34 */ 35 36 /**************************************************************************** 37 * 38 * Name: mfw_hsi.h 39 * 40 * Description: Global definitions 41 * 42 ****************************************************************************/ 43 44 #ifndef MFW_HSI_H 45 #define MFW_HSI_H 46 47 #define MFW_TRACE_SIGNATURE 0x25071946 48 49 /* The trace in the buffer */ 50 #define MFW_TRACE_EVENTID_MASK 0x00ffff 51 #define MFW_TRACE_PRM_SIZE_MASK 0x0f0000 52 #define MFW_TRACE_PRM_SIZE_SHIFT 16 53 #define MFW_TRACE_ENTRY_SIZE 3 54 55 struct mcp_trace { 56 u32 signature; /* Help to identify that the trace is valid */ 57 u32 size; /* the size of the trace buffer in bytes*/ 58 u32 curr_level; /* 2 - all will be written to the buffer 59 * 1 - debug trace will not be written 60 * 0 - just errors will be written to the buffer 61 */ 62 u32 modules_mask[2];/* a bit per module, 1 means write it, 0 means mask it */ 63 64 /* Warning: the following pointers are assumed to be 32bits as they are used only in the MFW */ 65 u32 trace_prod; /* The next trace will be written to this offset */ 66 u32 trace_oldest; /* The oldest valid trace starts at this offset (usually very close after the current producer) */ 67 }; 68 69 #endif /* MFW_HSI_H */ 70 71 72