public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Stefan Roese <sr@denx.de>,
	Andre Przywara <andre.przywara@arm.com>,
	Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Cc: "Marek Behún" <marek.behun@nic.cz>, u-boot@lists.denx.de
Subject: [PATCH u-boot-marvell v2 1/3] arm: Introduce new CONFIG_SPL_SYS_NO_VECTOR_TABLE option
Date: Wed,  6 Apr 2022 16:20:18 +0200	[thread overview]
Message-ID: <20220406142020.24984-1-pali@kernel.org> (raw)
In-Reply-To: <20220215190233.16248-1-pali@kernel.org>

Move OMAP4 specific option for disabling overwriting vector table into
config option CONFIG_SPL_SYS_NO_VECTOR_TABLE.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 arch/arm/Kconfig            | 4 ++++
 arch/arm/cpu/armv7/start.S  | 4 +---
 arch/arm/mach-omap2/Kconfig | 1 +
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4567c183fb84..1be8d4470ec1 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -57,6 +57,10 @@ config SYS_INIT_SP_BSS_OFFSET
 	  that the early malloc region, global data (gd), and early stack usage
 	  do not overlap any appended DTB.
 
+config SPL_SYS_NO_VECTOR_TABLE
+	depends on SPL
+	bool
+
 config LINUX_KERNEL_IMAGE_HEADER
 	depends on ARM64
 	bool
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index af87a5432ae5..37036128a785 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -97,12 +97,10 @@ switch_to_hypervisor_ret:
 	orr	r0, r0, #0xc0		@ disable FIQ and IRQ
 	msr	cpsr,r0
 
+#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE)
 /*
  * Setup vector:
- * (OMAP4 spl TEXT_BASE is not 32 byte aligned.
- * Continue to use ROM code vector only in OMAP4 spl)
  */
-#if !(defined(CONFIG_OMAP44XX) && defined(CONFIG_SPL_BUILD))
 	/* Set V=0 in CP15 SCTLR register - for VBAR to point to vector */
 	mrc	p15, 0, r0, c1, c0, 0	@ Read CP15 SCTLR Register
 	bic	r0, #CR_V		@ V = 0
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 263142683b04..e1b9180a3bb3 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -32,6 +32,7 @@ config OMAP34XX
 config OMAP44XX
 	bool "OMAP44XX SoC"
 	select SPL_USE_TINY_PRINTF
+	select SPL_SYS_NO_VECTOR_TABLE if SPL
 	imply NAND_OMAP_ELM
 	imply NAND_OMAP_GPMC
 	imply SPL_DISPLAY_PRINT
-- 
2.20.1


  parent reply	other threads:[~2022-04-06 14:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 19:02 [PATCH u-boot-marvell] arm: mvebu: Do not define or overwrite vectors in SPL build Pali Rohár
2022-02-16 10:08 ` Stefan Roese
2022-02-16 10:17   ` Pali Rohár
2022-04-06 14:20 ` Pali Rohár [this message]
2022-04-06 14:20   ` [PATCH u-boot-marvell v2 2/3] arm: Do not compile vector table when SYS_NO_VECTOR_TABLE is enabled Pali Rohár
2022-04-21 14:09     ` Stefan Roese
2022-04-06 14:20   ` [PATCH u-boot-marvell v2 3/3] arm: mvebu: Enable CONFIG_SPL_SYS_NO_VECTOR_TABLE for 32-bit mvebu Pali Rohár
2022-04-21 14:09     ` Stefan Roese
2022-04-21 14:09   ` [PATCH u-boot-marvell v2 1/3] arm: Introduce new CONFIG_SPL_SYS_NO_VECTOR_TABLE option Stefan Roese
2022-08-03  0:02   ` Heinrich Schuchardt
2022-08-05 12:39     ` Pali Rohár

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=20220406142020.24984-1-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=andre.przywara@arm.com \
    --cc=chiawei_wang@aspeedtech.com \
    --cc=marek.behun@nic.cz \
    --cc=sr@denx.de \
    --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