1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/*
* dbldefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Copyright (C) 2005-2006 Texas Instruments, Inc.
*
* This package is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef DBLDEFS_
#define DBLDEFS_
/*
* ======== dbl_flags ========
* Specifies whether to load code, data, or symbols
*/
typedef s32 dbl_flags;
/*
* ======== dbl_alloc_fxn ========
* Allocate memory function. Allocate or reserve (if reserved == TRUE)
* "size" bytes of memory from segment "space" and return the address in
* *dsp_address (or starting at *dsp_address if reserve == TRUE). Returns 0 on
* success, or an error code on failure.
*/
typedef s32(*dbl_alloc_fxn) (void *hdl, s32 space, u32 size, u32 align,
u32 *dsp_address, s32 seg_id, s32 req,
bool reserved);
/*
* ======== dbl_free_fxn ========
* Free memory function. Free, or unreserve (if reserved == TRUE) "size"
* bytes of memory from segment "space"
*/
typedef bool(*dbl_free_fxn) (void *hdl, u32 addr, s32 space, u32 size,
bool reserved);
/*
* ======== dbl_log_write_fxn ========
* Function to call when writing data from a section, to log the info.
* Can be NULL if no logging is required.
*/
typedef int(*dbl_log_write_fxn) (void *handle,
struct dbl_sect_info *sect, u32 addr,
u32 bytes);
/*
* ======== dbl_sym_lookup ========
* Symbol lookup function - Find the symbol name and return its value.
*
* Parameters:
* handle - Opaque handle
* parg - Opaque argument.
* name - Name of symbol to lookup.
* sym - Location to store address of symbol structure.
*
* Returns:
* TRUE: Success (symbol was found).
* FALSE: Failed to find symbol.
*/
typedef bool(*dbl_sym_lookup) (void *handle, void *parg, void *rmm_handle,
const char *name, struct dbl_symbol ** sym);
/*
* ======== dbl_write_fxn ========
* Write memory function. Write "n" HOST bytes of memory to segment "mtype"
* starting at address "dsp_address" from the buffer "buf". The buffer is
* formatted as an array of words appropriate for the DSP.
*/
typedef s32(*dbl_write_fxn) (void *hdl, u32 dsp_address, void *buf,
u32 n, s32 mtype);
#endif /* DBLDEFS_ */
|