diff options
author | Tom Rini <trini@konsulko.com> | 2015-08-05 14:12:37 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-05 14:12:37 -0400 |
commit | 1a2728ae4faf12874173de156b8a7e66cfbbeae5 (patch) | |
tree | 9aba8e6c915b341df8ec6077d8ecb28f1eb32b0b /arch/x86/cpu/efi/sdram.c | |
parent | dcc7dbc73169bb4e39f27c1d95bbf031ccfc1744 (diff) | |
parent | 12c7510f17ff29190e52336910e43a50c0d620a6 (diff) |
Merge git://git.denx.de/u-boot-x86
Diffstat (limited to 'arch/x86/cpu/efi/sdram.c')
-rw-r--r-- | arch/x86/cpu/efi/sdram.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/x86/cpu/efi/sdram.c b/arch/x86/cpu/efi/sdram.c new file mode 100644 index 0000000000..51599445ab --- /dev/null +++ b/arch/x86/cpu/efi/sdram.c @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2015 Google, Inc + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <efi.h> +#include <asm/u-boot-x86.h> + +DECLARE_GLOBAL_DATA_PTR; + +ulong board_get_usable_ram_top(ulong total_size) +{ + return (ulong)efi_get_ram_base() + gd->ram_size; +} + +int dram_init(void) +{ + /* gd->ram_size is set as part of EFI init */ + + return 0; +} + +void dram_init_banksize(void) +{ + gd->bd->bi_dram[0].start = efi_get_ram_base(); + gd->bd->bi_dram[0].size = CONFIG_EFI_RAM_SIZE; +} |