xref: /rk3399_rockchip-uboot/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds (revision c97cd1ba480482e220c5dcef0cd751d21a1bf74e)
1*c97cd1baSScott Wood/*
2*c97cd1baSScott Wood * (C) Copyright 2006
3*c97cd1baSScott Wood * Wolfgang Denk, DENX Software Engineering, wd@denx.de
4*c97cd1baSScott Wood *
5*c97cd1baSScott Wood * Copyright 2009 Freescale Semiconductor, Inc.
6*c97cd1baSScott Wood *
7*c97cd1baSScott Wood * See file CREDITS for list of people who contributed to this
8*c97cd1baSScott Wood * project.
9*c97cd1baSScott Wood *
10*c97cd1baSScott Wood * This program is free software; you can redistribute it and/or
11*c97cd1baSScott Wood * modify it under the terms of the GNU General Public License as
12*c97cd1baSScott Wood * published by the Free Software Foundation; either version 2 of
13*c97cd1baSScott Wood * the License, or (at your option) any later version.
14*c97cd1baSScott Wood *
15*c97cd1baSScott Wood * This program is distributed in the hope that it will be useful,
16*c97cd1baSScott Wood * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*c97cd1baSScott Wood * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18*c97cd1baSScott Wood * GNU General Public License for more details.
19*c97cd1baSScott Wood *
20*c97cd1baSScott Wood * You should have received a copy of the GNU General Public License
21*c97cd1baSScott Wood * along with this program; if not, write to the Free Software
22*c97cd1baSScott Wood * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23*c97cd1baSScott Wood * MA 02111-1307 USA
24*c97cd1baSScott Wood */
25*c97cd1baSScott Wood
26*c97cd1baSScott Wood#include "config.h"	/* CONFIG_BOARDDIR */
27*c97cd1baSScott Wood
28*c97cd1baSScott WoodOUTPUT_ARCH(powerpc)
29*c97cd1baSScott WoodSECTIONS
30*c97cd1baSScott Wood{
31*c97cd1baSScott Wood	. = CONFIG_SPL_TEXT_BASE;
32*c97cd1baSScott Wood	.text : {
33*c97cd1baSScott Wood		*(.text*)
34*c97cd1baSScott Wood	}
35*c97cd1baSScott Wood	_etext = .;
36*c97cd1baSScott Wood
37*c97cd1baSScott Wood	.reloc : {
38*c97cd1baSScott Wood		_GOT2_TABLE_ = .;
39*c97cd1baSScott Wood		KEEP(*(.got2))
40*c97cd1baSScott Wood		KEEP(*(.got))
41*c97cd1baSScott Wood		PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
42*c97cd1baSScott Wood		_FIXUP_TABLE_ = .;
43*c97cd1baSScott Wood		KEEP(*(.fixup))
44*c97cd1baSScott Wood	}
45*c97cd1baSScott Wood	__got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
46*c97cd1baSScott Wood	__fixup_entries = (. - _FIXUP_TABLE_) >> 2;
47*c97cd1baSScott Wood
48*c97cd1baSScott Wood	. = ALIGN(8);
49*c97cd1baSScott Wood	.data : {
50*c97cd1baSScott Wood		*(.rodata*)
51*c97cd1baSScott Wood		*(.data*)
52*c97cd1baSScott Wood		*(.sdata*)
53*c97cd1baSScott Wood	}
54*c97cd1baSScott Wood	_edata  =  .;
55*c97cd1baSScott Wood
56*c97cd1baSScott Wood	. = ALIGN(8);
57*c97cd1baSScott Wood	__init_begin = .;
58*c97cd1baSScott Wood	__init_end = .;
59*c97cd1baSScott Wood/* FIXME for non-NAND SPL */
60*c97cd1baSScott Wood#if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */
61*c97cd1baSScott Wood	.bootpg ADDR(.text) + 0x1000 :
62*c97cd1baSScott Wood	{
63*c97cd1baSScott Wood		start.o	(.bootpg)
64*c97cd1baSScott Wood	}
65*c97cd1baSScott Wood#define RESET_VECTOR_OFFSET 0x1ffc /* IFC has 8K sram */
66*c97cd1baSScott Wood#elif defined(CONFIG_FSL_ELBC)
67*c97cd1baSScott Wood#define RESET_VECTOR_OFFSET 0xffc /* LBC has 4k sram */
68*c97cd1baSScott Wood#else
69*c97cd1baSScott Wood#error unknown NAND controller
70*c97cd1baSScott Wood#endif
71*c97cd1baSScott Wood	.resetvec ADDR(.text) + RESET_VECTOR_OFFSET : {
72*c97cd1baSScott Wood		KEEP(*(.resetvec))
73*c97cd1baSScott Wood	} = 0xffff
74*c97cd1baSScott Wood
75*c97cd1baSScott Wood	/*
76*c97cd1baSScott Wood	 * Make sure that the bss segment isn't linked at 0x0, otherwise its
77*c97cd1baSScott Wood	 * address won't be updated during relocation fixups.
78*c97cd1baSScott Wood	 */
79*c97cd1baSScott Wood	. |= 0x10;
80*c97cd1baSScott Wood
81*c97cd1baSScott Wood	__bss_start = .;
82*c97cd1baSScott Wood	.bss : {
83*c97cd1baSScott Wood		*(.sbss*)
84*c97cd1baSScott Wood		*(.bss*)
85*c97cd1baSScott Wood	}
86*c97cd1baSScott Wood	__bss_end__ = .;
87*c97cd1baSScott Wood}
88