Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Ben Stoltz | ab76a47 | 2015-08-04 12:33:46 -0600 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2015 Google, Inc |
Ben Stoltz | ab76a47 | 2015-08-04 12:33:46 -0600 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <efi.h> |
Simon Glass | 6980b6b | 2019-11-14 12:57:45 -0700 | [diff] [blame] | 8 | #include <init.h> |
Ben Stoltz | ab76a47 | 2015-08-04 12:33:46 -0600 | [diff] [blame] | 9 | #include <asm/u-boot-x86.h> |
| 10 | |
| 11 | DECLARE_GLOBAL_DATA_PTR; |
| 12 | |
| 13 | ulong board_get_usable_ram_top(ulong total_size) |
| 14 | { |
| 15 | return (ulong)efi_get_ram_base() + gd->ram_size; |
| 16 | } |
| 17 | |
| 18 | int dram_init(void) |
| 19 | { |
| 20 | /* gd->ram_size is set as part of EFI init */ |
| 21 | |
| 22 | return 0; |
| 23 | } |
| 24 | |
Simon Glass | 2f949c3 | 2017-03-31 08:40:32 -0600 | [diff] [blame] | 25 | int dram_init_banksize(void) |
Ben Stoltz | ab76a47 | 2015-08-04 12:33:46 -0600 | [diff] [blame] | 26 | { |
| 27 | gd->bd->bi_dram[0].start = efi_get_ram_base(); |
| 28 | gd->bd->bi_dram[0].size = CONFIG_EFI_RAM_SIZE; |
Simon Glass | 2f949c3 | 2017-03-31 08:40:32 -0600 | [diff] [blame] | 29 | |
| 30 | return 0; |
Ben Stoltz | ab76a47 | 2015-08-04 12:33:46 -0600 | [diff] [blame] | 31 | } |