x86: link ramstage like the other architectures
All the other architectures are using the memlayout for linking ramstage. The last piece to align x86 is to use arch/header.ld and the macros within memlayout.h to automaticaly generate the necessary linker script. BUG=chrome-os-partner:44827 BRANCH=None TEST=Built a myriad of boards. Analyzed readelf output. Change-Id: I012c9b88c178b43bf6a6dde0bab821e066728139 Signed-off-by: Aaron Durbin <adubin@chromium.org> Reviewed-on: http://review.coreboot.org/11508 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
4de29d48ed
commit
cce557b793
2 changed files with 28 additions and 21 deletions
25
src/arch/x86/include/arch/header.ld
Normal file
25
src/arch/x86/include/arch/header.ld
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2015 Google Inc.
|
||||||
|
*
|
||||||
|
* 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; version 2 of the License.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc.
|
||||||
|
*/
|
||||||
|
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
to_load PT_LOAD;
|
||||||
|
}
|
||||||
|
|
||||||
|
ENTRY(_start)
|
|
@ -1,25 +1,7 @@
|
||||||
/*
|
#include <memlayout.h>
|
||||||
* Memory map:
|
#include <arch/header.ld>
|
||||||
*
|
|
||||||
* CONFIG_RAMBASE : text segment
|
|
||||||
* : rodata segment
|
|
||||||
* : data segment
|
|
||||||
* : bss segment
|
|
||||||
* : stack
|
|
||||||
* : heap
|
|
||||||
*/
|
|
||||||
ENTRY(_start)
|
|
||||||
|
|
||||||
PHDRS
|
|
||||||
{
|
|
||||||
to_load PT_LOAD;
|
|
||||||
}
|
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = CONFIG_RAMBASE;
|
RAMSTAGE(CONFIG_RAMBASE, CONFIG_RAMTOP - CONFIG_RAMBASE)
|
||||||
|
|
||||||
INCLUDE "lib/program.ramstage.ld"
|
|
||||||
|
|
||||||
_ = ASSERT( ( _eprogram < (CONFIG_RAMTOP)) , "Please increase CONFIG_RAMTOP");
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue