• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión8fd3cf2940464765bc10ae341b525fe0eae8fa87 (tree)
Tiempo2022-07-21 14:46:10
AutorChris Packham <judge.packham@gmai...>
CommiterStefan Roese

Log Message

arm64: mvebu: handle non-zero base address for RAM

board_get_usable_ram_top() conflated the RAM size with the top address
of RAM. On systems where RAM starts at address 0 these numbers are the
same so it went unnoticed. Update board_get_usable_ram_top() to take
CONFIG_SYS_SDRAM_BASE into account when determining the top address.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>

Cambiar Resumen

Diferencia incremental

--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -28,14 +28,13 @@ DECLARE_GLOBAL_DATA_PTR;
2828 * Currently only 2GiB are mapped for system memory. This is what
2929 * we pass to the U-Boot subsystem here.
3030 */
31-#define USABLE_RAM_SIZE 0x80000000
31+#define USABLE_RAM_SIZE 0x80000000ULL
3232
3333 ulong board_get_usable_ram_top(ulong total_size)
3434 {
35- if (gd->ram_size > USABLE_RAM_SIZE)
36- return USABLE_RAM_SIZE;
35+ unsigned long top = CONFIG_SYS_SDRAM_BASE + min(gd->ram_size, USABLE_RAM_SIZE);
3736
38- return gd->ram_size;
37+ return (gd->ram_top > top) ? top : gd->ram_top;
3938 }
4039
4140 /*