public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] arm925t - allow any stack size (was: Re: [PATCH] Add board voiceblue)
Date: Wed, 6 Apr 2005 22:20:39 +0200	[thread overview]
Message-ID: <20050406202039.GA8729@orphique> (raw)
In-Reply-To: <20050406133742.4CBEDC108D@atlas.denx.de>

On Wed, Apr 06, 2005 at 03:37:37PM +0200, Wolfgang Denk wrote:
> Dear Ladislav,
> 
> in message <20050405175018.GA16363@orphique> you wrote:
> > 
> > this patch adds support for OMAP5910 based board Voiceblue. Small flash
> > configuration will not work in tree because it needs small patch to
> > cpu/arm925t/start.S which I sent on 12 Jan 2005 under subject "Lowering
> 
> The code does not compile at all:

Dear Wolfgang,

here is patch which would make it compile. It allows to configure any
size of malloc pool and any stack size. Patch is probably not ready for
inclusion since I'm not certain if it is safe to use r1 register in
abort handlers. If anyone knows, please comment patch.

Thanks in advance,
	ladis

Index: cpu/arm925t/start.S
===================================================================
RCS file: /cvsroot/u-boot/u-boot/cpu/arm925t/start.S,v
retrieving revision 1.9
diff -u -r1.9 start.S
--- cpu/arm925t/start.S	4 Apr 2005 12:44:15 -0000	1.9
+++ cpu/arm925t/start.S	6 Apr 2005 19:56:47 -0000
@@ -83,6 +83,10 @@
 
 _TEXT_BASE:
 	.word	TEXT_BASE
+_STACK_OFS:
+	.word	CFG_MALLOC_LEN + CFG_GBL_DATA_SIZE
+_BAD_STACK_OFS:
+	.word	CFG_MALLOC_LEN + CFG_GBL_DATA_SIZE + CONFIG_STACKSIZE + 8
 
 .globl _armboot_start
 _armboot_start:
@@ -190,8 +194,8 @@
 	/* Set up the stack						    */
 stack_setup:
 	ldr	r0, _TEXT_BASE		/* upper 128 KiB: relocated uboot   */
-	sub	r0, r0, #CFG_MALLOC_LEN	/* malloc area                      */
-	sub	r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo                        */
+	ldr	r1, _STACK_OFS
+	sub	r0, r0, r1		/* malloc area and bdinfo           */
 #ifdef CONFIG_USE_IRQ
 	sub	r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
 #endif
@@ -295,8 +299,8 @@
 	stmia	sp, {r0 - r12}			@ Save user registers (now in svc mode) r0-r12
 
 	ldr	r2, _armboot_start
-	sub	r2, r2, #(CONFIG_STACKSIZE+CFG_MALLOC_LEN)
-	sub	r2, r2, #(CFG_GBL_DATA_SIZE+8)  @ set base 2 words into abort stack
+	ldr	r1, _BAD_STACK_OFS
+	sub     r2, r2, r1
 	ldmia	r2, {r2 - r3}                   @ get values for "aborted" pc and cpsr (into parm regs)
 	add	r0, sp, #S_FRAME_SIZE		@ grab pointer to old stack
 
@@ -328,8 +332,8 @@
 
 	.macro get_bad_stack
 	ldr	r13, _armboot_start		@ setup our mode stack
-	sub	r13, r13, #(CONFIG_STACKSIZE+CFG_MALLOC_LEN)
-	sub	r13, r13, #(CFG_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
+	ldr     r1, _BAD_STACK_OFS
+	sub     r13, r13, r1
 
 	str	lr, [r13]			@ save caller lr in position 0 of saved stack
 	mrs	lr, spsr                        @ get the spsr

  parent reply	other threads:[~2005-04-06 20:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-05 17:50 [U-Boot-Users] [PATCH] Add board voiceblue Ladislav Michl
2005-04-05 23:01 ` Wolfgang Denk
2005-04-06 13:37 ` Wolfgang Denk
2005-04-06 17:04   ` [U-Boot-Users] " Ladislav Michl
2005-04-07 22:30     ` Wolfgang Denk
2005-04-06 20:20   ` Ladislav Michl [this message]
2005-04-06 20:31     ` [U-Boot-Users] arm925t - allow any stack size (was: Re: [PATCH] Add board voiceblue) Wolfgang Denk
2005-04-06 20:53       ` [U-Boot-Users] Re: arm925t - allow any stack size Ladislav Michl
2005-04-06 21:19         ` Wolfgang Denk
2005-04-06 21:39           ` Ladislav Michl
2005-04-07 22:43     ` [U-Boot-Users] arm925t - allow any stack size (was: Re: [PATCH] Add board voiceblue) Wolfgang Denk

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=20050406202039.GA8729@orphique \
    --to=ladis@linux-mips.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