ec04bd904df859d7ea231a7cfeff1af7334dfff9
1 #ifndef BTBLWRAP_H
2 #define BTBLWRAP_H
3 /********************************************************************************
4 * FILE PURPOSE: Define the IBL wrapper for the TI boot table processor
5 ********************************************************************************
6 * FILE NAM:E btblwrap.h
7 *
8 * DESCRIPTION: Definitions required for the IBL wrapper of the TI boot table
9 * processor
10 *
11 ********************************************************************************/
13 /* chipStartCore does nothing, since multiple core start is not supported */
14 #define chipStartCore(x,y,z)
16 /* A minimal boot stats structure */
17 typedef struct bootTblStats_s {
19 UINT32 num_sections;
20 UINT32 num_pdma_copies;
22 } bootTblStats_t;
25 typedef struct bootStats_s {
27 bootTblStats_t btbl;
29 } bootStats_t;
31 extern bootStats_t bootStats;
33 /****************************************************************************
34 * Definition: The c64x boot table tools will always pad boot table
35 * entries to 32 bit elements. The boot table works in 16 bit
36 * element sizes. If the size is not an even number of 16 bit
37 * elements, add one word of padding.
38 ****************************************************************************/
39 #define chipAddBtblUint16Pad(x) (((x)+1) & 0xfffffffe)
41 /* Return values */
42 #define CORE_NOERR 0
44 /* Module number */
45 #define BOOT_MODULE_ID_CHIP 0
46 #define BOOT_MODULE_ID_BTBL 1
48 /* Error code creation */
49 #define BOOT_ERROR_CODE(modnum,errnum) (((modnum) << 16) | (errnum))
51 /* Fatal error handling */
52 #define BOOT_EXCEPTION btblBootException
54 /* Macros */
55 #define CHIP_UINT16_TO_BYTES(x) ((x) << 1)
56 #define CHIP_BYTES_TO_UINT16(x) (((x) + 1) >> 1)
59 /* No interblock processing required */
60 #define chipBtblBlockDone()
62 /* No tracing dummy function */
63 #define chipDummy(x)
66 /* gem.c prototypes */
67 UINT16 coreCopyData (UINT32 dest_addr, UINT16 *p_data, UINT32 sizeBytes, UINT16 start_vector);
69 /* btblwrap.c prototypes */
70 void btblBootException (UINT32 ecode);
72 /* The block size allocated through malloc. Chosen to match the value defined
73 * for the coff loader. malloc is used so the same heap section can be used. */
74 #define TI_BTBL_BLOCK_SIZE 0x4000
76 /* Read/Write 32bit values */
77 #define chipStoreWord(x,y) *(x) = (y)
78 #define chipReadWord(x) *(x)
80 /* Boot table wrapper error codes */
81 #define BTBL_WRAP_ECODE_MALLOC_FAIL 100
82 #define BTBL_WRAP_ECODE_READ_FAIL 101
83 #define BTBL_WRAP_ECODE_BTBL_FAIL 102
85 #define btblMemset iblMemset
88 #endif /* BTBLWRAP_H */