blob: a45525f842e63c4c1a732d14cb382926c0f546b9 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Ben Stoltzab76a472015-08-04 12:33:46 -06002/*
3 * Copyright (c) 2015 Google, Inc
Ben Stoltzab76a472015-08-04 12:33:46 -06004 */
5
6#include <common.h>
7#include <efi.h>
8#include <asm/u-boot-x86.h>
9
10DECLARE_GLOBAL_DATA_PTR;
11
12ulong board_get_usable_ram_top(ulong total_size)
13{
14 return (ulong)efi_get_ram_base() + gd->ram_size;
15}
16
17int dram_init(void)
18{
19 /* gd->ram_size is set as part of EFI init */
20
21 return 0;
22}
23
Simon Glass2f949c32017-03-31 08:40:32 -060024int dram_init_banksize(void)
Ben Stoltzab76a472015-08-04 12:33:46 -060025{
26 gd->bd->bi_dram[0].start = efi_get_ram_base();
27 gd->bd->bi_dram[0].size = CONFIG_EFI_RAM_SIZE;
Simon Glass2f949c32017-03-31 08:40:32 -060028
29 return 0;
Ben Stoltzab76a472015-08-04 12:33:46 -060030}