diff --git a/src/arch/aarch64/Makefile.inc b/src/arch/aarch64/Makefile.inc index 6ba30dafc3..a945c692ad 100644 --- a/src/arch/aarch64/Makefile.inc +++ b/src/arch/aarch64/Makefile.inc @@ -153,6 +153,7 @@ romstage-y += cpu.S romstage-y += exception.c romstage-y += exception_asm.S romstage-$(CONFIG_EARLY_CONSOLE) += early_console.c +romstage-y += cbmem.c bootblock-y += stages.c romstage-y += stages.c @@ -170,6 +171,7 @@ ramstage-y += cpu.S ramstage-y += boot.c ramstage-y += tables.c +ramstage-y += cbmem.c #romstage-y += memset.S #ramstage-y += memset.S diff --git a/src/arch/aarch64/cbmem.c b/src/arch/aarch64/cbmem.c new file mode 100644 index 0000000000..b33e9b8cd8 --- /dev/null +++ b/src/arch/aarch64/cbmem.c @@ -0,0 +1,30 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +unsigned long get_top_of_ram(void); + +unsigned long get_top_of_ram(void) +{ + return CONFIG_RAMTOP; +} + +void *cbmem_top(void) +{ + return (void *)get_top_of_ram(); +} diff --git a/src/mainboard/emulation/foundation-armv8/Kconfig b/src/mainboard/emulation/foundation-armv8/Kconfig index 1046378e9f..45439a5e7b 100644 --- a/src/mainboard/emulation/foundation-armv8/Kconfig +++ b/src/mainboard/emulation/foundation-armv8/Kconfig @@ -25,6 +25,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select HAVE_UART_MEMORY_MAPPED select HAVE_UART_SPECIAL select BOARD_ROMSIZE_KB_4096 + select DYNAMIC_CBMEM config MAINBOARD_DIR string