Skip to content

Commit

Permalink
Incorporate Oleksandr Tymoshenko's patch to support SMP via PSCI (req…
Browse files Browse the repository at this point in the history
…uired on FreeBSD).
  • Loading branch information
RobCrowston committed Jul 14, 2019
1 parent bfa7110 commit 7d1d1ce
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
10 changes: 10 additions & 0 deletions board/raspberrypi/rpi/lowlevel_init.S
Expand Up @@ -15,6 +15,14 @@ fw_dtb_pointer:
.word 0x0
#endif

#ifdef CONFIG_ARM64
.align 8
.global reserve_memory
reserve_memory:
.dword 0x0
#endif


/*
* Routine: save_boot_params (called after reset from start.S)
* Description: save ATAG/FDT address provided by the firmware at boot time
Expand All @@ -27,6 +35,8 @@ save_boot_params:
#ifdef CONFIG_ARM64
adr x8, fw_dtb_pointer
str x0, [x8]
adr x8, reserve_memory
str x1, [x8]
#else
str r2, fw_dtb_pointer
#endif
Expand Down
17 changes: 16 additions & 1 deletion board/raspberrypi/rpi/rpi.c
Expand Up @@ -13,6 +13,7 @@
#include <lcd.h>
#include <memalign.h>
#include <mmc.h>
#include <asm/system.h>
#include <asm/gpio.h>
#include <asm/arch/mbox.h>
#include <asm/arch/msg.h>
Expand Down Expand Up @@ -291,6 +292,17 @@ static struct mm_region bcm283x_mem_map[] = {
};
#endif
struct mm_region *mem_map = bcm283x_mem_map;

/* From lowlevel_init.S. */
extern u64 reserve_memory;

int dram_init_banksize(void)
{
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE + reserve_memory;
gd->bd->bi_dram[0].size = get_effective_memsize() - reserve_memory;
return 0;
}

#endif

int dram_init(void)
Expand Down Expand Up @@ -426,7 +438,10 @@ int misc_init_r(void)
set_board_info();
#endif
set_serial_number();

#ifdef CONFIG_ARM64
if (fw_dtb_pointer)
env_set_hex("fdt_addr", (ulong)fw_dtb_pointer);
#endif
return 0;
}

Expand Down

0 comments on commit 7d1d1ce

Please sign in to comment.