2007-12-23 03:47:28 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 by Will Robertson
|
|
|
|
*
|
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-12-23 03:47:28 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
}
|
|
|
|
|