Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2008 |
| 3 | * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de |
| 4 | * |
| 5 | * based on board/amcc/yosemite/init.S |
| 6 | * original Copyright not specified there |
| 7 | * |
| 8 | * See file CREDITS for list of people who contributed to this |
| 9 | * project. |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or |
| 12 | * modify it under the terms of the GNU General Public License as |
| 13 | * published by the Free Software Foundation; either version 2 of |
| 14 | * the License, or (at your option) any later version. |
| 15 | * |
| 16 | * This program is distributed in the hope that it will be useful, |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | * GNU General Public License for more details. |
| 20 | * |
| 21 | * You should have received a copy of the GNU General Public License |
| 22 | * along with this program; if not, write to the Free Software |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 24 | * MA 02111-1307 USA |
| 25 | */ |
| 26 | |
Wolfgang Denk | 25ddd1f | 2010-10-26 14:34:52 +0200 | [diff] [blame^] | 27 | #include <asm-offsets.h> |
Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 28 | #include <ppc_asm.tmpl> |
| 29 | #include <config.h> |
| 30 | |
| 31 | #include <asm/mmu.h> |
| 32 | |
| 33 | /************************************************************************** |
| 34 | * TLB TABLE |
| 35 | * |
| 36 | * This table is used by the cpu boot code to setup the initial tlb |
| 37 | * entries. Rather than make broad assumptions in the cpu source tree, |
| 38 | * this table lets each board set things up however they like. |
| 39 | * |
| 40 | * Pointer to the table is returned in r1 |
| 41 | * |
| 42 | *************************************************************************/ |
| 43 | |
| 44 | .section .bootpg,"ax" |
| 45 | .globl tlbtab |
| 46 | |
| 47 | tlbtab: |
| 48 | tlbtab_start |
| 49 | |
| 50 | /* |
| 51 | * BOOT_CS (FLASH) must be first. Before relocation SA_I can be off to use |
| 52 | * the speed up boot process. It is patched after relocation to enable SA_I |
| 53 | */ |
| 54 | tlbentry( CONFIG_SYS_BOOT_BASE_ADDR, SZ_256M, CONFIG_SYS_BOOT_BASE_ADDR, |
Stefan Roese | cf6eb6d | 2010-04-14 13:57:18 +0200 | [diff] [blame] | 55 | 0, AC_RWX | SA_G/*|SA_I*/) |
Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 56 | |
| 57 | /* TLB-entry for init-ram in dcache (SA_I must be turned off!) */ |
| 58 | tlbentry( CONFIG_SYS_INIT_RAM_ADDR, SZ_64K, CONFIG_SYS_INIT_RAM_ADDR, |
Stefan Roese | cf6eb6d | 2010-04-14 13:57:18 +0200 | [diff] [blame] | 59 | 0, AC_RWX | SA_G ) |
Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 60 | |
| 61 | tlbentry( CONFIG_SYS_SDRAM_BASE, SZ_256M, CONFIG_SYS_SDRAM_BASE, |
Stefan Roese | cf6eb6d | 2010-04-14 13:57:18 +0200 | [diff] [blame] | 62 | 0, AC_RWX | SA_IG ) |
Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 63 | tlbentry( CONFIG_SYS_PCI_BASE, SZ_256M, CONFIG_SYS_PCI_BASE, |
Stefan Roese | cf6eb6d | 2010-04-14 13:57:18 +0200 | [diff] [blame] | 64 | 0, AC_RW | SA_IG ) |
Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 65 | |
| 66 | /* PCI */ |
| 67 | tlbentry( CONFIG_SYS_PCI_MEMBASE, SZ_256M, CONFIG_SYS_PCI_MEMBASE, |
Stefan Roese | cf6eb6d | 2010-04-14 13:57:18 +0200 | [diff] [blame] | 68 | 0, AC_RW | SA_IG ) |
Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 69 | tlbentry( CONFIG_SYS_PCI_MEMBASE1, SZ_256M, CONFIG_SYS_PCI_MEMBASE1, |
Stefan Roese | cf6eb6d | 2010-04-14 13:57:18 +0200 | [diff] [blame] | 70 | 0, AC_RW | SA_IG ) |
Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 71 | tlbentry( CONFIG_SYS_PCI_MEMBASE2, SZ_256M, CONFIG_SYS_PCI_MEMBASE2, |
Stefan Roese | cf6eb6d | 2010-04-14 13:57:18 +0200 | [diff] [blame] | 72 | 0, AC_RW | SA_IG ) |
Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 73 | tlbentry( CONFIG_SYS_PCI_MEMBASE3, SZ_256M, CONFIG_SYS_PCI_MEMBASE3, |
Stefan Roese | cf6eb6d | 2010-04-14 13:57:18 +0200 | [diff] [blame] | 74 | 0, AC_RW | SA_IG ) |
Dirk Eibach | 89b8619 | 2008-12-09 13:12:40 +0100 | [diff] [blame] | 75 | |
| 76 | tlbtab_end |