1
1
/*
2
- * Unless you and Broadcom execute a separate written software license
3
- * agreement governing use of this software, this software is licensed to
4
- * you under the terms of the GNU General Public License version 2 (the
5
- * "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
6
- * with the following added to such license:
2
+ * Copyright 2017 Broadcom
7
3
*
8
- * As a special exception, the copyright holders of this software give
9
- * you permission to link this software with independent modules, and to
10
- * copy and distribute the resulting executable under terms of your
11
- * choice, provided that you also meet, for each linked independent
12
- * module, the terms and conditions of the license of that module. An
13
- * independent module is a module which is not derived from this
14
- * software. The special exception does not apply to any modifications
15
- * of the software.
4
+ * This program is free software; you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License, version 2, as
6
+ * published by the Free Software Foundation (the "GPL").
7
+ *
8
+ * This program is distributed in the hope that it will be useful, but
9
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ * General Public License version 2 (GPLv2) for more details.
12
+ *
13
+ * You should have received a copy of the GNU General Public License
14
+ * version 2 (GPLv2) along with this source code.
16
15
*/
17
16
/*
18
17
* $Id: kcom.h,v 1.9 Broadcom SDK $
19
18
* $Copyright: (c) 2005 Broadcom Corp.
20
19
* All Rights Reserved.$
21
20
*
22
- * File: kcom.h
23
- * Purpose: User/Kernel message definitions
21
+ * File: kcom.h
22
+ * Purpose: User/Kernel message definitions
24
23
*/
25
24
26
25
#ifndef _KCOM_H
37
36
#define KCOM_MSG_TYPE_RSP 2 /* Command response */
38
37
#define KCOM_MSG_TYPE_EVT 3 /* Unsolicited event */
39
38
40
-
41
39
/*
42
40
* Message opcodes
43
41
*/
57
55
#define KCOM_M_FILTER_LIST 23 /* Get list of Rx filter IDs */
58
56
#define KCOM_M_FILTER_GET 24 /* Get Rx filter info */
59
57
#define KCOM_M_DMA_INFO 31 /* Tx/Rx DMA info */
60
- #define KCOM_M_DBGPKT_SET 41 /* Enbale debug packet function */
61
- #define KCOM_M_DBGPKT_GET 42 /* Get debug packet function info */
58
+ #define KCOM_M_DBGPKT_SET 41 /* Enbale debug packet function */
59
+ #define KCOM_M_DBGPKT_GET 42 /* Get debug packet function info */
60
+ #define KCOM_M_WB_CLEANUP 51 /* Clean up for warmbooting */
62
61
63
- #define KCOM_VERSION 8 /* Protocol version */
62
+ #define KCOM_VERSION 9 /* Protocol version */
64
63
65
64
/*
66
65
* Message status codes
@@ -80,7 +79,6 @@ typedef struct kcom_msg_hdr_s {
80
79
uint16 id ;
81
80
} kcom_msg_hdr_t ;
82
81
83
-
84
82
/*
85
83
* Object types
86
84
*/
@@ -267,44 +265,40 @@ typedef struct kcom_dma_info_s {
267
265
uint16 chan ;
268
266
uint16 flags ;
269
267
union {
270
- void * p ;
271
- uint8 b [8 ];
272
- } cookie ;
273
- union {
274
- uint32 dcb_start ;
268
+ uint64 dcb_start ;
275
269
struct {
276
270
uint32 tx ;
277
271
uint32 rx ;
278
272
} seqno ;
279
273
} data ;
274
+ union {
275
+ void * p ;
276
+ uint8 b [8 ];
277
+ } cookie ;
280
278
} kcom_dma_info_t ;
281
279
282
280
/* Default channel configuration */
283
- #define KCOM_DMA_TX_CHAN 0
284
- #define KCOM_DMA_RX_CHAN 1
281
+ #define KCOM_DMA_TX_CHAN 0
282
+ #define KCOM_DMA_RX_CHAN 1
285
283
286
284
287
285
#define KCOM_ETH_HW_T_RESET 1
288
286
#define KCOM_ETH_HW_T_INIT 2
289
287
#define KCOM_ETH_HW_T_OTHER 3
290
288
291
- #define KCOM_ETH_HW_C_ALL 0xff
292
-
293
- #define KCOM_ETH_HW_RESET_F_TX (1U << 0)
294
- #define KCOM_ETH_HW_RESET_F_RX (1U << 1)
295
- #define KCOM_ETH_HW_RESET_F_TX_RECLAIM (1U << 2)
296
- #define KCOM_ETH_HW_RESET_F_RX_RECLAIM (1U << 3)
297
-
298
- #define KCOM_ETH_HW_INIT_F_TX (1U << 0)
299
- #define KCOM_ETH_HW_INIT_F_RX (1U << 1)
300
- #define KCOM_ETH_HW_INIT_F_RX_FILL (1U << 2)
301
-
302
-
303
- #define KCOM_ETH_HW_OTHER_F_FIFO_LOOPBACK (1U << 0)
304
- #define KCOM_ETH_HW_OTHER_F_INTERRUPT (1U << 1)
289
+ #define KCOM_ETH_HW_C_ALL 0xff
305
290
291
+ #define KCOM_ETH_HW_RESET_F_TX (1U << 0)
292
+ #define KCOM_ETH_HW_RESET_F_RX (1U << 1)
293
+ #define KCOM_ETH_HW_RESET_F_TX_RECLAIM (1U << 2)
294
+ #define KCOM_ETH_HW_RESET_F_RX_RECLAIM (1U << 3)
306
295
296
+ #define KCOM_ETH_HW_INIT_F_TX (1U << 0)
297
+ #define KCOM_ETH_HW_INIT_F_RX (1U << 1)
298
+ #define KCOM_ETH_HW_INIT_F_RX_FILL (1U << 2)
307
299
300
+ #define KCOM_ETH_HW_OTHER_F_FIFO_LOOPBACK (1U << 0)
301
+ #define KCOM_ETH_HW_OTHER_F_INTERRUPT (1U << 1)
308
302
309
303
typedef struct kcom_eth_hw_config_s {
310
304
uint8 type ;
@@ -339,7 +333,6 @@ typedef struct kcom_msg_string_s {
339
333
char val [KCOM_MSG_STRING_MAX ];
340
334
} kcom_msg_string_t ;
341
335
342
-
343
336
/*
344
337
* Indicate that eth hardware is about to be reset. Active
345
338
* DMA operations should be aborted and DMA and interrupts
@@ -354,7 +347,6 @@ typedef struct kcom_msg_eth_hw_config_s {
354
347
kcom_eth_hw_config_t config ;
355
348
} kcom_msg_eth_hw_config_t ;
356
349
357
-
358
350
/*
359
351
* Indicate that switch hardware is about to be reset. Active
360
352
* DMA operations should be aborted and DMA and interrupts
@@ -371,8 +363,11 @@ typedef struct kcom_msg_hw_reset_s {
371
363
*/
372
364
typedef struct kcom_msg_hw_init_s {
373
365
kcom_msg_hdr_t hdr ;
374
- uint16 dcb_size ;
375
- uint16 dcb_type ;
366
+ uint8 cmic_type ;
367
+ uint8 dcb_type ;
368
+ uint8 dcb_size ;
369
+ uint8 pkt_hdr_size ;
370
+ uint32 dma_hi ;
376
371
uint32 cdma_channels ;
377
372
} kcom_msg_hw_init_t ;
378
373
@@ -400,6 +395,14 @@ typedef struct kcom_msg_dbg_pkt_get_s {
400
395
int value ;
401
396
} kcom_msg_dbg_pkt_get_t ;
402
397
398
+ /*
399
+ * Clean up warmboot-related resources.
400
+ */
401
+ typedef struct kcom_msg_wb_cleanup_s {
402
+ kcom_msg_hdr_t hdr ;
403
+ uint32 flags ;
404
+ } kcom_msg_wb_cleanup_t ;
405
+
403
406
/*
404
407
* Create new system network interface. The network interface will
405
408
* be associated with the specified switch unit number.
@@ -458,8 +461,8 @@ typedef struct kcom_msg_filter_destroy_s {
458
461
* Get list of currently defined packet filters.
459
462
*/
460
463
#ifndef KCOM_FILTER_MAX
461
- /* OPENNSL_FIXUP - Increased the filters to 1024 from 128 */
462
- #define KCOM_FILTER_MAX 1024
464
+ /* SAI_FIXUP - Increased the filters to 1024 from 128 */
465
+ #define KCOM_FILTER_MAX 1024
463
466
#endif
464
467
465
468
typedef struct kcom_msg_filter_list_s {
@@ -484,11 +487,9 @@ typedef struct kcom_msg_dma_info_s {
484
487
kcom_dma_info_t dma_info ;
485
488
} kcom_msg_dma_info_t ;
486
489
487
-
488
490
/*
489
491
* All messages (e.g. for generic receive)
490
492
*/
491
-
492
493
typedef union kcom_msg_s {
493
494
kcom_msg_hdr_t hdr ;
494
495
kcom_msg_version_t version ;
@@ -508,9 +509,9 @@ typedef union kcom_msg_s {
508
509
kcom_msg_dma_info_t dma_info ;
509
510
kcom_msg_dbg_pkt_set_t dbg_pkt_set ;
510
511
kcom_msg_dbg_pkt_get_t dbg_pkt_get ;
512
+ kcom_msg_wb_cleanup_t wb_cleanup ;
511
513
} kcom_msg_t ;
512
514
513
-
514
515
/*
515
516
* KCOM communication channel vectors
516
517
*
@@ -538,4 +539,4 @@ typedef struct kcom_chan_s {
538
539
int (* recv )(void * handle , void * msg , unsigned int bufsz );
539
540
} kcom_chan_t ;
540
541
541
- #endif /* _KCOM_H */
542
+ #endif /* _KCOM_H */
0 commit comments