All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 11/18] arm: make save_boot_params_ret prototype visible for AArch64
Date: Tue, 10 Oct 2017 16:21:11 +0200	[thread overview]
Message-ID: <1507645279-25188-12-git-send-email-philipp.tomsich@theobroma-systems.com> (raw)
In-Reply-To: <1507645279-25188-1-git-send-email-philipp.tomsich@theobroma-systems.com>

The save_boot_params_ret() prototype (for those of us, that have a
valid SP on entry and can implement save_boot_params() in C), was
previously only defined for !defined(CONFIG_ARM64).

This moves the declaration to a common block to ensure the prototype
is available to everyone that might need it.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Andy Yan <andy.yan@rock-chips.com>
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/include/asm/system.h | 62 +++++++++++++++++++++----------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 79bd19a..e2af296 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -332,37 +332,6 @@ void psci_arch_init(void);
 
 #ifndef __ASSEMBLY__
 
-/**
- * save_boot_params() - Save boot parameters before starting reset sequence
- *
- * If you provide this function it will be called immediately U-Boot starts,
- * both for SPL and U-Boot proper.
- *
- * All registers are unchanged from U-Boot entry. No registers need be
- * preserved.
- *
- * This is not a normal C function. There is no stack. Return by branching to
- * save_boot_params_ret.
- *
- * void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3);
- */
-
-/**
- * save_boot_params_ret() - Return from save_boot_params()
- *
- * If you provide save_boot_params(), then you should jump back to this
- * function when done. Try to preserve all registers.
- *
- * If your implementation of save_boot_params() is in C then it is acceptable
- * to simply call save_boot_params_ret() at the end of your function. Since
- * there is no link register set up, you cannot just exit the function. U-Boot
- * will return to the (initialised) value of lr, and likely crash/hang.
- *
- * If your implementation of save_boot_params() is in assembler then you
- * should use 'b' or 'bx' to return to save_boot_params_ret.
- */
-void save_boot_params_ret(void);
-
 #ifdef CONFIG_ARMV7_LPAE
 void switch_to_hypervisor_ret(void);
 #endif
@@ -556,6 +525,37 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop);
 
 #ifndef __ASSEMBLY__
 /**
+ * save_boot_params() - Save boot parameters before starting reset sequence
+ *
+ * If you provide this function it will be called immediately U-Boot starts,
+ * both for SPL and U-Boot proper.
+ *
+ * All registers are unchanged from U-Boot entry. No registers need be
+ * preserved.
+ *
+ * This is not a normal C function. There is no stack. Return by branching to
+ * save_boot_params_ret.
+ *
+ * void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3);
+ */
+
+/**
+ * save_boot_params_ret() - Return from save_boot_params()
+ *
+ * If you provide save_boot_params(), then you should jump back to this
+ * function when done. Try to preserve all registers.
+ *
+ * If your implementation of save_boot_params() is in C then it is acceptable
+ * to simply call save_boot_params_ret() at the end of your function. Since
+ * there is no link register set up, you cannot just exit the function. U-Boot
+ * will return to the (initialised) value of lr, and likely crash/hang.
+ *
+ * If your implementation of save_boot_params() is in assembler then you
+ * should use 'b' or 'bx' to return to save_boot_params_ret.
+ */
+void save_boot_params_ret(void);
+
+/**
  * Change the cache settings for a region.
  *
  * \param start		start address of memory region to change
-- 
2.1.4

  parent reply	other threads:[~2017-10-10 14:21 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 14:21 [U-Boot] [PATCH v5 00/18] rockchip: back-to-bootrom: replace assembly-implementation with C-code Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 01/18] arm: boot0 hook: move boot0 hook before '_start' Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 02/18] rockchip: boot0: align to 0x20 for armv7 '_start' Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-11-09 12:59   ` [U-Boot] [PATCH v5 " Andy Yan
2017-11-09 13:03     ` Dr. Philipp Tomsich
2017-11-10  3:43       ` Kever Yang
2017-10-10 14:21 ` [U-Boot] [PATCH v5 03/18] rockchip: enable boot0-hook for all Rockchip SoCs Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 04/18] rockchip: mkimage: use spl_boot0 " Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 05/18] rockchip: rk3288: use aligned address for SPL_TEXT_BASE Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 06/18] rockchip: rk3036: " Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 07/18] socfpga: boot0 hook: adjust to unified boot0 semantics Philipp Tomsich
2017-11-06 17:26   ` Dr. Philipp Tomsich
2017-11-06 17:54     ` Marek Vasut
2017-11-06 17:55       ` Dr. Philipp Tomsich
2017-11-06 17:57         ` Marek Vasut
2017-11-07  4:46           ` Chee, Tien Fong
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 08/18] bcm235xx: " Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 09/18] bcm281xx: " Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 10/18] rockchip: boot0 hook: support early return for RK3188/RK3066-style BROM Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` Philipp Tomsich [this message]
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, 11/18] arm: make save_boot_params_ret prototype visible for AArch64 Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 12/18] arm: mark save_boot_params_ret as a function Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 13/18] arm: provide a PCS-compliant setjmp implementation Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 14/18] rockchip: back-to-bootrom: replace assembly-implementation with C-code Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 15/18] rockchip: rk3188: use boot0 hook to load up SPL in 2 steps Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 16/18] rockchip: back-to-bootrom: allow passing a cmd to the bootrom Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 17/18] rockchip: rk3188: move CONFIG_SPL_* entries from rk3188_common.h to Kconfig Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-10 14:21 ` [U-Boot] [PATCH v5 18/18] rockchip: mkimage: remove unused code-paths (spl_boot0 is now implied) Philipp Tomsich
2017-11-07 14:18   ` [U-Boot] [U-Boot, v5, " Philipp Tomsich
2017-10-11 13:07 ` [U-Boot] [PATCH v5 00/18] rockchip: back-to-bootrom: replace assembly-implementation with C-code Heiko Stuebner

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=1507645279-25188-12-git-send-email-philipp.tomsich@theobroma-systems.com \
    --to=philipp.tomsich@theobroma-systems.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.