From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Jagan Teki <jagan@amarulasolutions.com>,
Andre Przywara <andre.przywara@arm.com>
Cc: Samuel Holland <samuel@sholland.org>,
Piotr Oniszczuk <piotr.oniszczuk@gmail.com>,
Mikhail Kalashnikov <iuncuim@gmail.com>,
u-boot@lists.denx.de, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 1/2] sunxi: boot0.h: allow RVBAR MMIO address customisation
Date: Sat, 08 Apr 2023 08:14:11 +0200 [thread overview]
Message-ID: <4818131.31r3eYUQgx@jernej-laptop> (raw)
In-Reply-To: <20230405142731.1246503-1-andre.przywara@arm.com>
Dne sreda, 05. april 2023 ob 16:27:30 CEST je Andre Przywara napisal(a):
> To switch the ARMv8 Allwinner SoCs into the 64-bit AArch64 ISA, we need
> to program the 64-bit start code address into an MMIO mapped register
> that shadows the architectural RVBAR register.
> This address is SoC specific, with just two versions out there so far.
> Now a third address emerged, on a *variant* of an existing SoC (H616).
>
> Change the boot0.h start code to make this address a Kconfig
> selectable option, to allow easier maintenance.
> We make this address user-visible (even though it shouldn't be), to
> allow putting this in defconfig. This is needed because there are
> apparently revisions of the H616 SoC out there using different
> addresses, so this becomes a per-board decision.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
> ---
> arch/arm/include/asm/arch-sunxi/boot0.h | 7 ++-----
> arch/arm/mach-sunxi/Kconfig | 12 ++++++++++++
> 2 files changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-sunxi/boot0.h
> b/arch/arm/include/asm/arch-sunxi/boot0.h index 46b7e073b59..59ea75a96b5
> 100644
> --- a/arch/arm/include/asm/arch-sunxi/boot0.h
> +++ b/arch/arm/include/asm/arch-sunxi/boot0.h
> @@ -39,11 +39,8 @@
> .word 0xf57ff06f // isb sy
> .word 0xe320f003 // wfi
> .word 0xeafffffd // b @wfi
> -#ifndef CONFIG_SUN50I_GEN_H6
> - .word 0x017000a0 // writeable RVBAR mapping address
> -#else
> - .word 0x09010040 // writeable RVBAR mapping address
> -#endif
> +
> + .word CONFIG_SUNXI_RVBAR_ADDRESS // writable RVBAR mapping
addr
> #ifdef CONFIG_SPL_BUILD
> .word CONFIG_SPL_TEXT_BASE
> #else
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index 6417aee944b..b46667ce01e 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -110,6 +110,18 @@ config SUNXI_SRAM_ADDRESS
> Some newer SoCs map the boot ROM at address 0 instead and move the
> SRAM to a different address.
>
> +config SUNXI_RVBAR_ADDRESS
> + hex "RVBAR address"
> + depends on ARM64
> + default 0x09010040 if SUN50I_GEN_H6
> + default 0x017000a0
> + ---help---
> + The read-only RVBAR system register holds the address of the first
> + instruction to execute after a reset. Allwinner cores provide a
> + writable MMIO backing store for this register, to allow to set the
> + entry point when switching to AArch64. This store is on different
> + addresses, depending on the SoC.
> +
> config SUNXI_A64_TIMER_ERRATUM
> bool
prev parent reply other threads:[~2023-04-08 6:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 14:27 [PATCH 1/2] sunxi: boot0.h: allow RVBAR MMIO address customisation Andre Przywara
2023-04-05 14:27 ` [PATCH 2/2] sunxi: remove support for boot0 header reservation Andre Przywara
2023-04-08 6:19 ` Jernej Škrabec
2023-04-11 22:16 ` Andre Przywara
2023-04-08 6:14 ` Jernej Škrabec [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4818131.31r3eYUQgx@jernej-laptop \
--to=jernej.skrabec@gmail.com \
--cc=andre.przywara@arm.com \
--cc=iuncuim@gmail.com \
--cc=jagan@amarulasolutions.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=piotr.oniszczuk@gmail.com \
--cc=samuel@sholland.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox