1
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
3
File: oct6100_remote_debug_priv.h
5
Copyright (c) 2001-2005 Octasic Inc.
9
File containing all private defines, macros, structures and prototypes
10
pertaining to the file oct6100_remote_debug.c. All elements defined in this
11
file are for private usage of the API. All public elements are defined
12
in the oct6100_remote_debug_pub.h file.
14
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
15
free software; you can redistribute it and/or modify it under the terms of
16
the GNU General Public License as published by the Free Software Foundation;
17
either version 2 of the License, or (at your option) any later version.
19
The OCT6100 GPL API is distributed in the hope that it will be useful, but
20
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24
You should have received a copy of the GNU General Public License
25
along with the OCT6100 GPL API; if not, write to the Free Software
26
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
28
$Octasic_Release: OCT612xAPI-01.00-PR38 $
30
$Octasic_Revision: 12 $
32
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
34
#ifndef __OCT6100_REMOTE_DEBUG_PRIV_H__
35
#define __OCT6100_REMOTE_DEBUG_PRIV_H__
37
/***************************** INCLUDE FILES *******************************/
40
/***************************** DEFINES *************************************/
42
#define mOCT6100_GET_REMOTE_DEBUG_LIST_ENTRY_PNT( pSharedInfo, ulIndex, pEntry ) \
43
pEntry = ( tPOCT6100_API_REMOTE_DEBUG_SESSION )(( PVOID )pSharedInfo + pSharedInfo->RemoteDebugInfo.ulSessionListOfst) + ulIndex;
45
#define mOCT6100_GET_REMOTE_DEBUG_TREE_PNT( pSharedInfo, pList ) \
46
pList = ( PVOID )(( PVOID )pSharedInfo + pSharedInfo->RemoteDebugInfo.ulSessionTreeOfst);
48
#define mOCT6100_GET_REMOTE_DEBUG_DATA_BUF_PNT( pSharedInfo, pulDataBuf ) \
49
pulDataBuf = ( PUINT16 )(( PVOID )pSharedInfo + pSharedInfo->RemoteDebugInfo.ulDataBufOfst);
51
#define mOCT6100_GET_REMOTE_DEBUG_SESSION_PKT_CACHE_PNT( pSharedInfo, pulPktCache, ulSessionIndex ) \
52
pulPktCache = ( PUINT32 )(( PVOID )pSharedInfo + pSharedInfo->RemoteDebugInfo.ulPktCacheOfst) + (ulSessionIndex * (cOCTRPC_MAX_PACKET_BYTE_LENGTH / 4));
54
/***************************** TYPES ***************************************/
57
/************************** FUNCTION PROTOTYPES *****************************/
59
static UINT32 Oct6100ApiGetRemoteDebugSwSizes(
60
IN tPOCT6100_CHIP_OPEN f_pOpenChip,
61
OUT tPOCT6100_API_INSTANCE_SIZES f_pInstSizes );
63
static UINT32 Oct6100ApiRemoteDebuggingSwInit(
64
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance );
66
UINT32 Oct6100ApiCheckEndianDetectField(
67
IN tPOCTRPC_OGRDTP_HEADER f_pOgrdtpHeader,
68
IN UINT32 f_ulPktLengthDword );
70
VOID Oct6100ApiCalculateChecksum(
71
IN PUINT32 f_pulPktPayload,
72
IN UINT32 f_ulPktLengthDword,
73
OUT PUINT32 f_pulChecksum );
75
VOID Oct6100ApiFormResponsePkt(
76
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
77
IN PUINT32 f_pulRcvPktPayload,
78
IN OUT PUINT32 f_pulRspPktPayload,
79
IN UINT32 f_ulPktLengthDword,
80
IN BOOL f_fRetryPktResponse,
81
IN BOOL f_fReplaceProtocolNum,
82
IN BOOL f_fReplaceInterfaceType,
83
IN BOOL f_fReplaceInterfaceVersion,
84
IN UINT32 f_ulSessionIndex,
85
IN UINT32 f_ulParsingErrorValue,
86
IN UINT32 f_ulPayloadDwordIndex,
87
IN UINT32 f_ulChecksum );
89
UINT32 Oct6100ApiCheckPktCommands(
90
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
91
IN PUINT32 f_pulRcvPktPayload,
92
IN OUT PUINT32 f_pulRspPktPayload,
93
IN UINT32 f_ulSessionIndex,
94
IN UINT32 f_ulPktLengthDword,
95
IN UINT32 f_ulChecksum );
97
VOID Oct6100ApiExecutePktCommands(
98
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
99
IN PUINT32 f_pulRcvPktPayload,
100
IN UINT32 f_ulPktLengthDword );
102
UINT32 Oct6100ApiCheckSessionNum(
103
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
104
IN tPOCTRPC_OGRDTP_HEADER f_pOgrdtpHeader,
105
OUT PUINT32 f_pulSessionIndex );
107
VOID Oct6100ApiRpcReadWord(
108
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
109
IN OUT tPOCTRPC_COMMAND_HEADER f_pCmndHeader );
111
VOID Oct6100ApiRpcReadBurst(
112
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
113
IN OUT tPOCTRPC_COMMAND_HEADER f_pCmndHeader );
115
VOID Oct6100ApiRpcReadArray(
116
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
117
IN OUT tPOCTRPC_COMMAND_HEADER f_pCmndHeader );
119
VOID Oct6100ApiRpcWriteWord(
120
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
121
IN OUT tPOCTRPC_COMMAND_HEADER f_pCmndHeader );
123
VOID Oct6100ApiRpcWriteSmear(
124
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
125
IN OUT tPOCTRPC_COMMAND_HEADER f_pCmndHeader );
127
VOID Oct6100ApiRpcWriteBurst(
128
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
129
IN OUT tPOCTRPC_COMMAND_HEADER f_pCmndHeader );
131
VOID Oct6100ApiRpcSetHotChannel(
132
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
133
IN OUT tPOCTRPC_COMMAND_HEADER f_pCmndHeader );
135
VOID Oct6100ApiRpcGetDebugChanIndex(
136
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
137
IN OUT tPOCTRPC_COMMAND_HEADER f_pCmndHeader );
139
VOID Oct6100ApiRpcDisconnect(
140
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
141
IN OUT tPOCTRPC_COMMAND_HEADER f_pCmndHeader,
142
IN OUT UINT32 f_ulSessionNumber );
144
#endif /* __OCT6100_REMOTE_DEBUG_PRIV_H__ */