1 /*
2 * @file OMAP5430Dmm.h
3 *
4 * @brief Dynamic Memory Management
5 *
6 *
7 * ============================================================================
8 *
9 * Copyright (c) 2010-2011, Texas Instruments Incorporated
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 *
18 * * Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * * Neither the name of Texas Instruments Incorporated nor the names of
23 * its contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
28 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
30 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
33 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
35 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
36 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 * Contact information for paper mail:
38 * Texas Instruments
39 * Post Office Box 655303
40 * Dallas, Texas 75265
41 * Contact information:
42 * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
43 * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
44 * ============================================================================
45 *
46 */
48 /*
49 * ======== dmm.h ========
50 * Purpose:
51 *The Dynamic Memory Mapping(DMM) module manages the DSP Virtual address
52 *space that can be directly mapped to any MPU buffer or memory region
53 *
54 * Public Functions:
55 *
56 */
58 #ifndef DMM_5430_
59 #define DMM_5430_
61 typedef unsigned long u32;
62 #define false FALSE
63 #define true TRUE
65 #define PAGE_SIZE 4096
67 int dmm_reserve_memory(u32 size, u32 *p_rsv_addr);
69 int dmm_unreserve_memory(u32 rsv_addr, u32 *psize);
71 void dmm_destroy(void);
73 void dmm_delete_tables(void);
75 int dmm_create(void);
77 void dmm_init(void);
79 int dmm_create_tables(u32 addr, u32 size);
81 #ifdef DSP_DMM_DEBUG
82 int dmm_mem_map_dump(void);
83 #endif
84 #endif/* DMM_5430_ */