summaryrefslogtreecommitdiff
path: root/nuttx/arch/sh/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-14 14:42:52 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-14 14:42:52 +0000
commit0d36830a37fcdb64c2b2d00990e084e7f8d63456 (patch)
tree78cc505c6874907ce2a37ab2b94d15c848c0ce50 /nuttx/arch/sh/src
parent5be9588ed42d1a4ed297bdc76d9e05e582e78969 (diff)
downloadnuttx-0d36830a37fcdb64c2b2d00990e084e7f8d63456.tar.gz
nuttx-0d36830a37fcdb64c2b2d00990e084e7f8d63456.tar.bz2
nuttx-0d36830a37fcdb64c2b2d00990e084e7f8d63456.zip
Rename g_heapbase to g_idle_topstack; Fix kernel build heap allocation which cannot use g_heapbase
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5739 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sh/src')
-rw-r--r--nuttx/arch/sh/src/common/up_allocateheap.c4
-rw-r--r--nuttx/arch/sh/src/common/up_internal.h2
-rw-r--r--nuttx/arch/sh/src/m16c/chip.h24
-rw-r--r--nuttx/arch/sh/src/m16c/m16c_dumpstate.c2
-rw-r--r--nuttx/arch/sh/src/m16c/m16c_head.S8
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_dumpstate.c2
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_head.S10
7 files changed, 26 insertions, 26 deletions
diff --git a/nuttx/arch/sh/src/common/up_allocateheap.c b/nuttx/arch/sh/src/common/up_allocateheap.c
index ad1935d9a..734a50483 100644
--- a/nuttx/arch/sh/src/common/up_allocateheap.c
+++ b/nuttx/arch/sh/src/common/up_allocateheap.c
@@ -81,6 +81,6 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
up_ledon(LED_HEAPALLOCATE);
- *heap_start = (FAR void*)g_heapbase;
- *heap_size = CONFIG_DRAM_END - g_heapbase;
+ *heap_start = (FAR void*)g_idle_topstack;
+ *heap_size = CONFIG_DRAM_END - g_idle_topstack;
}
diff --git a/nuttx/arch/sh/src/common/up_internal.h b/nuttx/arch/sh/src/common/up_internal.h
index f56e97c97..99c273ca6 100644
--- a/nuttx/arch/sh/src/common/up_internal.h
+++ b/nuttx/arch/sh/src/common/up_internal.h
@@ -140,7 +140,7 @@ extern volatile uint32_t *current_regs;
* CONFIG_DRAM_END
*/
-extern uint32_t g_heapbase;
+extern uint32_t g_idle_topstack;
#endif
/****************************************************************************
diff --git a/nuttx/arch/sh/src/m16c/chip.h b/nuttx/arch/sh/src/m16c/chip.h
index 0a91d6041..02140df79 100644
--- a/nuttx/arch/sh/src/m16c/chip.h
+++ b/nuttx/arch/sh/src/m16c/chip.h
@@ -253,20 +253,20 @@
#ifndef __ASSEMBLY__
-extern uint16_t g_snbss; /* Start of near .bss */
-extern uint16_t g_enbss; /* End+1 of near .bss */
-extern uint16_t g_sndata; /* Start of near .data */
-extern uint16_t g_endata; /* End+1 of near .data */
-extern uint32_t g_enronly; /* Start of relocated read-only data in FLASH */
+extern uint16_t g_snbss; /* Start of near .bss */
+extern uint16_t g_enbss; /* End+1 of near .bss */
+extern uint16_t g_sndata; /* Start of near .data */
+extern uint16_t g_endata; /* End+1 of near .data */
+extern uint32_t g_enronly; /* Start of relocated read-only data in FLASH */
#ifdef CONFIG_M16C_HAVEFARRAM
- extern uint32_t g_sfbss; /* Start of far .bss */
- extern uint32_t g_efbss; /* End+1 of far .bss */
- extern uint32_t g_sfdata; /* Start of far .data */
- extern uint32_t g_efdata; /* End_1 of far .data */
- extern uint32_t g_efronly; /* Start of relocated read-only data in FLASH */
+ extern uint32_t g_sfbss; /* Start of far .bss */
+ extern uint32_t g_efbss; /* End+1 of far .bss */
+ extern uint32_t g_sfdata; /* Start of far .data */
+ extern uint32_t g_efdata; /* End_1 of far .data */
+ extern uint32_t g_efronly; /* Start of relocated read-only data in FLASH */
#endif
-extern uint32_t g_svarvect; /* Start of variable vectors */
-extern uint32_t g_heapbase; /* Start of the heap */
+extern uint32_t g_svarvect; /* Start of variable vectors */
+extern uint32_t g_idle_topstack; /* Start of the heap */
/* Address of the saved user stack pointer */
diff --git a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c
index 3570a9ebe..8083f62bd 100644
--- a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c
+++ b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c
@@ -171,7 +171,7 @@ void up_dumpstate(void)
if (rtcb->pid == 0)
{
- ustackbase = g_heapbase - 1;
+ ustackbase = g_idle_topstack - 1;
ustacksize = CONFIG_IDLETHREAD_STACKSIZE;
}
else
diff --git a/nuttx/arch/sh/src/m16c/m16c_head.S b/nuttx/arch/sh/src/m16c/m16c_head.S
index 4e6b0e2c8..470946313 100644
--- a/nuttx/arch/sh/src/m16c/m16c_head.S
+++ b/nuttx/arch/sh/src/m16c/m16c_head.S
@@ -147,11 +147,11 @@ _g_svarvect:
.long _svarvect
.size _g_svarvect, .-_g_svarvect
- .globl _g_heapbase
- .type _g_heapbase, object
-_g_heapbase:
+ .globl _g_idle_topstack
+ .type _g_idle_topstack, object
+_g_idle_topstack:
.long _enbss+CONFIG_ARCH_INTERRUPTSTACK+CONFIG_IDLETHREAD_STACKSIZE
- .size _g_heapbase, .-_g_heapbase
+ .size _g_idle_topstack, .-_g_idle_topstack
/************************************************************************************
* Code
diff --git a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
index 3d101c92d..8990f6615 100644
--- a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
+++ b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
@@ -160,7 +160,7 @@ void up_dumpstate(void)
if (rtcb->pid == 0)
{
- ustackbase = g_heapbase - 4;
+ ustackbase = g_idle_topstack - 4;
ustacksize = CONFIG_IDLETHREAD_STACKSIZE;
}
else
diff --git a/nuttx/arch/sh/src/sh1/sh1_head.S b/nuttx/arch/sh/src/sh1/sh1_head.S
index 9a52b9bb3..774d22784 100644
--- a/nuttx/arch/sh/src/sh1/sh1_head.S
+++ b/nuttx/arch/sh/src/sh1/sh1_head.S
@@ -507,18 +507,18 @@ __start0:
.section .data
- /* This global variable is unsigned long g_heapbase and is
+ /* This global variable is unsigned long g_idle_topstack and is
* exported from here only because of its coupling to the stack
* above.
*/
.data
.align 4
- .globl _g_heapbase
- .type _g_heapbase, object
-_g_heapbase:
+ .globl _g_idle_topstack
+ .type _g_idle_topstack, object
+_g_idle_topstack:
.long _ebss+CONFIG_IDLETHREAD_STACKSIZE
- .size _g_heapbase, .-_g_heapbase
+ .size _g_idle_topstack, .-_g_idle_topstack
.end