1 #ifndef _QM_LOC_H
2 #define _QM_LOC_H
3 /***************************************************************************************
4 * FILE PURPOSE: Queue Manager local definitions
5 ***************************************************************************************
6 * FILE NAME: qm_loc.h
7 *
8 * DESCRIPTION: Local queue manager definitions
9 *
10 ***************************************************************************************/
12 /* Memory map */
13 /* Relative to the queue manager region */
14 #define QM_REG_REVISION 0x00
15 #define QM_REG_DIVERSION 0x08
16 #define QM_REG_LINKRAM_BASE(x) (0x0c + 8*(x))
17 #define QM_REG_LINKRAM_SIZE(x) (0x10 + 8*(x))
19 /* The queue peek registers (includes thresholds) */
20 #define QM_REG_STAT_CFG_REGD(x) (0xc + 16*(x))
22 /* Relative to the descriptor setup region */
23 #define QM_REG_MEMR_BASE_ADDR(x) (0x00 + 16*(x))
24 #define QM_REG_MEMR_START_IDX(x) (0x04 + 16*(x))
25 #define QM_REG_MEMR_DESC_SETUP(x) (0x08 + 16*(x))
27 /* Queues, register A */
28 #define QM_REG_QUEUE_REGA(x) (0x00 + 16*(x))
29 #define QM_QA_ENTRY_COUNT_MSB 18
30 #define QM_QA_ENTRY_COUNT_LSB 0
32 /* Queues, register D */
33 #define QM_REG_QUEUE_REGD(x) (0x0c + 16*(x))
35 /* Description region setup */
36 #define QM_REG_VAL_DESC_SETUP_SET_DESC_SIZE(x,v) (x) = BOOT_SET_BITFIELD((x),((v) >> 4)-1, 28, 16)
39 /* Maximum linking RAM size mask */
40 #define QM_REG_LINKRAM_SIZE_MAX_MASK 0x7ffff
44 #endif /* _QM_LOC_H */