blob: 413e55b596fbeb8930cbf15d38cd8c50830b40f2 [file] [log] [blame]
Ben Stoltz3dcdd172015-08-04 12:33:46 -06001/*
2 * Copyright (c) 2015 Google, Inc
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <efi.h>
9#include <asm/u-boot-x86.h>
10
11DECLARE_GLOBAL_DATA_PTR;
12
13ulong board_get_usable_ram_top(ulong total_size)
14{
15 return (ulong)efi_get_ram_base() + gd->ram_size;
16}
17
18int dram_init(void)
19{
20 /* gd->ram_size is set as part of EFI init */
21
22 return 0;
23}
24
Simon Glass76b00ac2017-03-31 08:40:32 -060025int dram_init_banksize(void)
Ben Stoltz3dcdd172015-08-04 12:33:46 -060026{
27 gd->bd->bi_dram[0].start = efi_get_ram_base();
28 gd->bd->bi_dram[0].size = CONFIG_EFI_RAM_SIZE;
Simon Glass76b00ac2017-03-31 08:40:32 -060029
30 return 0;
Ben Stoltz3dcdd172015-08-04 12:33:46 -060031}