2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2015-08-04 18:33:46 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2015 Google, Inc
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <efi.h>
|
2019-11-14 19:57:45 +00:00
|
|
|
#include <init.h>
|
2020-10-31 03:38:53 +00:00
|
|
|
#include <asm/global_data.h>
|
2015-08-04 18:33:46 +00:00
|
|
|
#include <asm/u-boot-x86.h>
|
|
|
|
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2023-08-12 18:16:58 +00:00
|
|
|
phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
|
2015-08-04 18:33:46 +00:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2017-03-31 14:40:32 +00:00
|
|
|
int dram_init_banksize(void)
|
2015-08-04 18:33:46 +00:00
|
|
|
{
|
|
|
|
gd->bd->bi_dram[0].start = efi_get_ram_base();
|
|
|
|
gd->bd->bi_dram[0].size = CONFIG_EFI_RAM_SIZE;
|
2017-03-31 14:40:32 +00:00
|
|
|
|
|
|
|
return 0;
|
2015-08-04 18:33:46 +00:00
|
|
|
}
|