From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- roms/u-boot/arch/x86/cpu/efi/sdram.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 roms/u-boot/arch/x86/cpu/efi/sdram.c (limited to 'roms/u-boot/arch/x86/cpu/efi/sdram.c') diff --git a/roms/u-boot/arch/x86/cpu/efi/sdram.c b/roms/u-boot/arch/x86/cpu/efi/sdram.c new file mode 100644 index 000000000..af65982fd --- /dev/null +++ b/roms/u-boot/arch/x86/cpu/efi/sdram.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2015 Google, Inc + */ + +#include +#include +#include +#include +#include + +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; +} + +int dram_init_banksize(void) +{ + gd->bd->bi_dram[0].start = efi_get_ram_base(); + gd->bd->bi_dram[0].size = CONFIG_EFI_RAM_SIZE; + + return 0; +} -- cgit