2007-12-23 03:47:28 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 by Will Robertson
|
|
|
|
*
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
2007-09-21 15:51:53 +00:00
|
|
|
#include "cpu.h"
|
2007-12-23 03:47:28 +00:00
|
|
|
#include "mmu-imx31.h"
|
|
|
|
#include "mmu-arm.h"
|
2007-09-21 15:51:53 +00:00
|
|
|
|
|
|
|
void memory_init(void) {
|
2008-02-05 04:43:19 +00:00
|
|
|
#if 0
|
2007-12-23 03:47:28 +00:00
|
|
|
ttb_init();
|
2007-09-21 15:51:53 +00:00
|
|
|
set_page_tables();
|
|
|
|
enable_mmu();
|
2008-02-05 04:43:19 +00:00
|
|
|
#endif
|
2007-09-21 15:51:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void set_page_tables() {
|
2008-02-05 04:43:19 +00:00
|
|
|
#if 0
|
2007-09-21 15:51:53 +00:00
|
|
|
map_section(0, 0, 0x1000, CACHE_NONE); /* map every memory region to itself */
|
2007-12-23 03:47:28 +00:00
|
|
|
/*This pa *might* change*/
|
2007-09-21 15:51:53 +00:00
|
|
|
map_section(0x80000000, 0, 64, CACHE_ALL); /* map RAM to 0 and enable caching for it */
|
|
|
|
map_section((int)FRAME1, (int)FRAME1, 1, BUFFERED); /* enable buffered writing for the framebuffer */
|
2007-12-23 03:47:28 +00:00
|
|
|
map_section((int)FRAME2, (int)FRAME2, 1, BUFFERED);
|
2008-02-05 04:43:19 +00:00
|
|
|
#endif
|
2007-09-21 15:51:53 +00:00
|
|
|
}
|
|
|
|
|