2007-01-04 02:50:45 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
2007-01-04 11:10:46 +00:00
|
|
|
* Copyright (C) 2006,2007 by Greg White
|
2007-01-04 02:50:45 +00:00
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2007-01-04 02:50:45 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
2009-07-05 01:17:25 +00:00
|
|
|
|
|
|
|
/* This file MUST be included in your system-target.h file if you want arm
|
|
|
|
* cache coherence functions to be called (I.E. during codec load, etc).
|
|
|
|
*/
|
|
|
|
|
2009-02-11 23:56:00 +00:00
|
|
|
#ifndef MMU_ARM_H
|
2009-02-12 00:09:12 +00:00
|
|
|
#define MMU_ARM_H
|
2007-01-04 02:50:45 +00:00
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
#define CACHE_ALL 0x0C
|
|
|
|
#define CACHE_NONE 0
|
|
|
|
#define BUFFERED 0x04
|
2007-10-23 03:29:15 +00:00
|
|
|
|
2009-02-11 23:56:00 +00:00
|
|
|
void memory_init(void);
|
2007-10-23 03:29:15 +00:00
|
|
|
void ttb_init(void);
|
|
|
|
void enable_mmu(void);
|
2008-04-22 04:34:25 +00:00
|
|
|
void map_section(unsigned int pa, unsigned int va, int mb, int flags);
|
|
|
|
|
|
|
|
/* Cleans entire DCache */
|
|
|
|
void clean_dcache(void);
|
2007-10-23 03:29:15 +00:00
|
|
|
|
2009-02-11 23:56:00 +00:00
|
|
|
/* Invalidate entire DCache */
|
|
|
|
/* will do writeback */
|
|
|
|
void invalidate_dcache(void);
|
|
|
|
|
2007-01-04 02:50:45 +00:00
|
|
|
/* Invalidate DCache for this range */
|
2009-02-11 23:56:00 +00:00
|
|
|
/* will do writeback */
|
2007-01-04 02:50:45 +00:00
|
|
|
void invalidate_dcache_range(const void *base, unsigned int size);
|
|
|
|
|
|
|
|
/* clean DCache for this range */
|
|
|
|
/* forces DCache writeback for the specified range */
|
|
|
|
void clean_dcache_range(const void *base, unsigned int size);
|
|
|
|
|
|
|
|
/* Dump DCache for this range */
|
2009-02-11 23:56:00 +00:00
|
|
|
/* Will *NOT* do write back except for buffer ends not on a line boundary */
|
2007-01-04 02:50:45 +00:00
|
|
|
void dump_dcache_range(const void *base, unsigned int size);
|
|
|
|
|
2009-02-11 23:56:00 +00:00
|
|
|
/* Invalidate entire ICache and DCache */
|
|
|
|
/* will do writeback */
|
|
|
|
void invalidate_idcache(void);
|
|
|
|
|
|
|
|
#define HAVE_CPUCACHE_INVALIDATE
|
|
|
|
#define HAVE_CPUCACHE_FLUSH
|
|
|
|
|
|
|
|
#endif /* MMU_ARM_H */
|