From: Matthias Brugger Date: Wed, 26 Feb 2020 19:06:26 +0100 Subject: [PATCH] raspberrypi: reserve first two pages in efi memory map In-Reply-To: <20200226140357.27649-1-kevans@FreeBSD.org> References: <20200226140357.27649-1-kevans@FreeBSD.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 26/02/2020 15:03, kevans at FreeBSD.org wrote: > From: Kyle Evans > > The psci stub provided by Raspberry Pi is around 5k in size, thus residing > in the first two pages of memory. Without this reservation, the next stage > or OS assume they're free to use the second page and may get catastrophic > results from clobbering it. > > Signed-off-by: Kyle Evans > Cc: Matthias Brugger > --- > board/raspberrypi/rpi/rpi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c > index e367ba3092..d3f9bd16ac 100644 > --- a/board/raspberrypi/rpi/rpi.c > +++ b/board/raspberrypi/rpi/rpi.c > @@ -488,8 +488,8 @@ int ft_board_setup(void *blob, bd_t *bd) > lcd_dt_simplefb_add_node(blob); > > #ifdef CONFIG_EFI_LOADER > - /* Reserve the spin table */ > - efi_add_memory_map(0, 1, EFI_RESERVED_MEMORY_TYPE, 0); > + /* Reserve the first two pages for spin table/psci stub. */ > + efi_add_memory_map(0, 2, EFI_RESERVED_MEMORY_TYPE, 0); Is this that changed recently or was the memory reservation wrong from the beginning? Reagrds, Matthias > #endif > > return 0; >