nyan: tegra124: Set up dynamic cbmem.

BUG=None
TEST=Built and booted into ramstage on nyan. After this change, ramstage gets
past setting up cbmem and fails when trying to load a payload.
BRANCH=None

Change-Id: I65403ecb65c7e1a45d61b1ead9460a73d85f750a
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/173542
Reviewed-by: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
This commit is contained in:
Gabe Black 2013-10-17 01:21:08 -07:00 committed by chrome-internal-fetch
commit b6e1a70103
4 changed files with 31 additions and 0 deletions

View file

@ -19,12 +19,15 @@
#include <arch/stages.h>
#include <cbfs.h>
#include <cbmem.h>
#include <console/console.h>
void main(void)
{
void *entry;
cbmem_initialize_empty();
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/coreboot_ram");
stage_exit(entry);
}

View file

@ -6,6 +6,7 @@ config SOC_NVIDIA_TEGRA124
select HAVE_UART_SPECIAL
select BOOTBLOCK_CONSOLE
select EARLY_CONSOLE
select DYNAMIC_CBMEM
select ARM_BOOTBLOCK_CUSTOM
select ARM_BOOTBLOCK_ARMV4
select ARM_ROMSTAGE_ARMV7

View file

@ -21,6 +21,7 @@ bootblock-$(CONFIG_CONSOLE_SERIAL_UART) += uart.c
endif
romstage-y += cbfs.c
romstage-y += cbmem.c
romstage-y += dma.c
romstage-y += monotonic_timer.c
romstage-y += spi.c
@ -30,6 +31,7 @@ romstage-$(CONFIG_CONSOLE_SERIAL_UART) += uart.c
endif
ramstage-y += cbfs.c
ramstage-y += cbmem.c
ramstage-y += dma.c
ramstage-y += monotonic_timer.c
ramstage-y += spi.c

View file

@ -0,0 +1,25 @@
/*
* This file is part of the coreboot project.
*
* Copyright 2013 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <cbmem.h>
void *cbmem_top(void)
{
return (void *)(CONFIG_SYS_SDRAM_BASE + (CONFIG_DRAM_SIZE_MB << 20UL));
}