diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-04-15 14:01:56 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-04-15 14:01:56 +0200 |
commit | b463adfd95354b4603544215eada98284f2be090 (patch) | |
tree | a44bff3dadaeb9218ba581d4a9f135877c14a7eb /arch/x86/lib/memory.c | |
parent | e61c75c259af8601a671e14237b464e0d49fd0df (diff) | |
parent | 94f2da7d81cfd83685af24967e89347e7aea2ccb (diff) | |
download | barebox-b463adfd95354b4603544215eada98284f2be090.tar.gz barebox-b463adfd95354b4603544215eada98284f2be090.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'arch/x86/lib/memory.c')
-rw-r--r-- | arch/x86/lib/memory.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/arch/x86/lib/memory.c b/arch/x86/lib/memory.c deleted file mode 100644 index 64fbbb9300..0000000000 --- a/arch/x86/lib/memory.c +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -// SPDX-FileCopyrightText: 2009 Juergen Beisert, Pengutronix - -/* This code was inspired by the GRUB2 project. */ - -/** - * @file - * @brief Memory management - */ - -#include <common.h> -#include <init.h> -#include <stdio.h> -#include <memory.h> -#include <asm/syslib.h> -#include <asm-generic/memory_layout.h> - -/** - * Handling of free memory - * - * Topics: - * - areas used by BIOS code - * - The 0xa0000... 0xfffff hole - * - memory above 0x100000 - */ - -int x86_start_barebox(void) -{ -#ifdef CONFIG_MEMORY_LAYOUT_DEFAULT - unsigned long memory_size; - - memory_size = bios_get_memsize(); - memory_size <<= 10; /* BIOS reports in kiB */ - - /* - * We do not want to conflict with the kernel. So, we keep the - * area from 0x100000 ... 0xFFFFFF free from usage - */ - if (memory_size >= (15 * 1024 * 1024 + MALLOC_SIZE)) - mem_malloc_init((void*)(16 * 1024 * 1024), - (void*)(16 * 1024 * 1024 + MALLOC_SIZE - 1)); - else - return -1; -#else - mem_malloc_init((void *)MALLOC_BASE, - (void *)(MALLOC_BASE + MALLOC_SIZE - 1)); -#endif - start_barebox(); -} |