blob: 2db84b59a1e39a42396c22956ea6eb21d713a0f7 [file] [log] [blame]
Dirk Eibach43fed3c2008-12-09 13:12:40 +01001/*
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
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Dirk Eibach43fed3c2008-12-09 13:12:40 +01008*/
9
Wolfgang Denk0191e472010-10-26 14:34:52 +020010#include <asm-offsets.h>
Dirk Eibach43fed3c2008-12-09 13:12:40 +010011#include <ppc_asm.tmpl>
12#include <config.h>
13
14#include <asm/mmu.h>
15
16/**************************************************************************
17 * TLB TABLE
18 *
19 * This table is used by the cpu boot code to setup the initial tlb
20 * entries. Rather than make broad assumptions in the cpu source tree,
21 * this table lets each board set things up however they like.
22 *
23 * Pointer to the table is returned in r1
24 *
25 *************************************************************************/
26
27 .section .bootpg,"ax"
28 .globl tlbtab
29
30tlbtab:
31 tlbtab_start
32
33 /*
34 * BOOT_CS (FLASH) must be first. Before relocation SA_I can be off to use
35 * the speed up boot process. It is patched after relocation to enable SA_I
36 */
37 tlbentry( CONFIG_SYS_BOOT_BASE_ADDR, SZ_256M, CONFIG_SYS_BOOT_BASE_ADDR,
Stefan Roese94b62702010-04-14 13:57:18 +020038 0, AC_RWX | SA_G/*|SA_I*/)
Dirk Eibach43fed3c2008-12-09 13:12:40 +010039
40 /* TLB-entry for init-ram in dcache (SA_I must be turned off!) */
41 tlbentry( CONFIG_SYS_INIT_RAM_ADDR, SZ_64K, CONFIG_SYS_INIT_RAM_ADDR,
Stefan Roese94b62702010-04-14 13:57:18 +020042 0, AC_RWX | SA_G )
Dirk Eibach43fed3c2008-12-09 13:12:40 +010043
44 tlbentry( CONFIG_SYS_SDRAM_BASE, SZ_256M, CONFIG_SYS_SDRAM_BASE,
Stefan Roese94b62702010-04-14 13:57:18 +020045 0, AC_RWX | SA_IG )
Dirk Eibach43fed3c2008-12-09 13:12:40 +010046 tlbentry( CONFIG_SYS_PCI_BASE, SZ_256M, CONFIG_SYS_PCI_BASE,
Stefan Roese94b62702010-04-14 13:57:18 +020047 0, AC_RW | SA_IG )
Dirk Eibach43fed3c2008-12-09 13:12:40 +010048
49 /* PCI */
50 tlbentry( CONFIG_SYS_PCI_MEMBASE, SZ_256M, CONFIG_SYS_PCI_MEMBASE,
Stefan Roese94b62702010-04-14 13:57:18 +020051 0, AC_RW | SA_IG )
Dirk Eibach43fed3c2008-12-09 13:12:40 +010052 tlbentry( CONFIG_SYS_PCI_MEMBASE1, SZ_256M, CONFIG_SYS_PCI_MEMBASE1,
Stefan Roese94b62702010-04-14 13:57:18 +020053 0, AC_RW | SA_IG )
Dirk Eibach43fed3c2008-12-09 13:12:40 +010054 tlbentry( CONFIG_SYS_PCI_MEMBASE2, SZ_256M, CONFIG_SYS_PCI_MEMBASE2,
Stefan Roese94b62702010-04-14 13:57:18 +020055 0, AC_RW | SA_IG )
Dirk Eibach43fed3c2008-12-09 13:12:40 +010056 tlbentry( CONFIG_SYS_PCI_MEMBASE3, SZ_256M, CONFIG_SYS_PCI_MEMBASE3,
Stefan Roese94b62702010-04-14 13:57:18 +020057 0, AC_RW | SA_IG )
Dirk Eibach43fed3c2008-12-09 13:12:40 +010058
59 tlbtab_end