Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Tiejun Chen <tiejun.chen@windriver.com>
To: linux-mips@linux-mips.org, ralf@linux-mips.org
Cc: Tiejun Chen <tiejun.chen@windriver.com>
Subject: [PATCH] Reserve stack/heap area for RP program
Date: Thu, 30 Oct 2008 19:15:45 +0800	[thread overview]
Message-ID: <1225365345-15635-2-git-send-email-tiejun.chen@windriver.com> (raw)
In-Reply-To: <1225365345-15635-1-git-send-email-tiejun.chen@windriver.com>

When you want to run a program on RP it's necessary to reserve corresponding stack/heap
area of that program.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
---
 arch/mips/mti-malta/malta-memory.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c
index 61888ff..d8c0834 100644
--- a/arch/mips/mti-malta/malta-memory.c
+++ b/arch/mips/mti-malta/malta-memory.c
@@ -87,6 +87,19 @@ static struct prom_pmemblock * __init prom_getmdesc(void)
 	else
 		memsize = physical_memsize;
 
+#ifdef CONFIG_MIPS_VPE_LOADER
+	/*
+         * The default DFLT_STACK_SIZE and DFLT_HEAP_SIZE will be known 
+         * from sde-kit. Actually it should define according to the different RP
+         * application. In the future we might want to improve it.
+         */
+#define DFLT_STACK_SIZE (65536)
+#define DFLT_HEAP_SIZE  (1048576) 
+        /* Reserve area used by building stack and heap for running RP. 
+         */
+        memsize -= (DFLT_HEAP_SIZE + DFLT_STACK_SIZE + PAGE_SIZE);
+#endif
+
 	memset(mdesc, 0, sizeof(mdesc));
 
 	mdesc[0].type = yamon_dontuse;
-- 
1.5.5.1

  reply	other threads:[~2008-10-30 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 11:15 [PATCH] Support RTC on Malta Tiejun Chen
2008-10-30 11:15 ` Tiejun Chen [this message]
2008-10-30 12:17   ` [PATCH] Reserve stack/heap area for RP program Ralf Baechle
2008-10-31  1:42     ` tiejun.chen
2008-11-03 11:18       ` tiejun.chen
2008-10-30 12:05 ` [PATCH] Support RTC on Malta Ralf Baechle
2008-10-31  6:44   ` tiejun.chen
2008-11-26  1:19   ` tiejun.chen

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=1225365345-15635-2-git-send-email-tiejun.chen@windriver.com \
    --to=tiejun.chen@windriver.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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