]> git.ipfire.org Git - thirdparty/u-boot.git/blame - arch/x86/cpu/efi/sdram.c
SPDX: Convert all of our single license tags to Linux Kernel style
[thirdparty/u-boot.git] / arch / x86 / cpu / efi / sdram.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
3dcdd17b
BS
2/*
3 * Copyright (c) 2015 Google, Inc
3dcdd17b
BS
4 */
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
76b00aca 24int dram_init_banksize(void)
3dcdd17b
BS
25{
26 gd->bd->bi_dram[0].start = efi_get_ram_base();
27 gd->bd->bi_dram[0].size = CONFIG_EFI_RAM_SIZE;
76b00aca
SG
28
29 return 0;
3dcdd17b 30}