summaryrefslogtreecommitdiff
path: root/arch/x86/lib/fsp2/fsp_dram.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/lib/fsp2/fsp_dram.c')
-rw-r--r--arch/x86/lib/fsp2/fsp_dram.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index c8f2c09b6a..3869c53c5f 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -12,11 +12,18 @@
#include <asm/fsp/fsp_support.h>
#include <asm/fsp2/fsp_api.h>
#include <asm/fsp2/fsp_internal.h>
+#include <linux/sizes.h>
int dram_init(void)
{
int ret;
+ if (!ll_boot_init()) {
+ /* Use a small and safe amount of 1GB */
+ gd->ram_size = SZ_1G;
+
+ return 0;
+ }
if (spl_phase() == PHASE_SPL) {
#ifdef CONFIG_HAVE_ACPI_RESUME
bool s3wake = gd->arch.prev_sleep_state == ACPI_S3;
@@ -68,6 +75,9 @@ int dram_init(void)
ulong board_get_usable_ram_top(ulong total_size)
{
+ if (!ll_boot_init())
+ return gd->ram_size;
+
#if CONFIG_IS_ENABLED(HANDOFF)
struct spl_handoff *ho = gd->spl_handoff;