summaryrefslogtreecommitdiff
path: root/nuttx/arch/x86
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/x86
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/x86')
-rw-r--r--nuttx/arch/x86/src/common/up_allocateheap.c4
-rw-r--r--nuttx/arch/x86/src/common/up_assert.c2
-rw-r--r--nuttx/arch/x86/src/common/up_internal.h2
-rwxr-xr-xnuttx/arch/x86/src/qemu/qemu_head.S10
4 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/arch/x86/src/common/up_allocateheap.c b/nuttx/arch/x86/src/common/up_allocateheap.c
index b56f9b59a..55f60f056 100644
--- a/nuttx/arch/x86/src/common/up_allocateheap.c
+++ b/nuttx/arch/x86/src/common/up_allocateheap.c
@@ -82,6 +82,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/x86/src/common/up_assert.c b/nuttx/arch/x86/src/common/up_assert.c
index 173ca6623..ed83eb6ce 100644
--- a/nuttx/arch/x86/src/common/up_assert.c
+++ b/nuttx/arch/x86/src/common/up_assert.c
@@ -128,7 +128,7 @@ static 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/x86/src/common/up_internal.h b/nuttx/arch/x86/src/common/up_internal.h
index c27717c38..3351e24c4 100644
--- a/nuttx/arch/x86/src/common/up_internal.h
+++ b/nuttx/arch/x86/src/common/up_internal.h
@@ -140,7 +140,7 @@ extern volatile uint32_t *current_regs;
* heap is CONFIG_DRAM_END
*/
-extern uint32_t g_heapbase;
+extern uint32_t g_idle_topstack;
/* Address of the saved user stack pointer */
diff --git a/nuttx/arch/x86/src/qemu/qemu_head.S b/nuttx/arch/x86/src/qemu/qemu_head.S
index 2b86c1835..22c490469 100755
--- a/nuttx/arch/x86/src/qemu/qemu_head.S
+++ b/nuttx/arch/x86/src/qemu/qemu_head.S
@@ -50,7 +50,7 @@
* the end of BSS and is of size CONFIG_IDLETHREAD_STACKSIZE. The IDLE thread
* is the thread that the system boots on and, eventually, becomes the idle,
* do nothing task that runs only when there is nothing else to run. The
- * heap continues from there until the end of memory. See g_heapbase below.
+ * heap continues from there until the end of memory. See g_idle_topstack below.
*/
#define STACKBASE ((_ebss + 0x1f) & 0xffffffe0)
@@ -78,7 +78,7 @@
.global __start /* Making entry point visible to linker */
.global os_start /* os_start is defined elsewhere */
.global up_lowsetup /* up_lowsetup is defined elsewhere */
- .global g_heapbase /* The start of the heap */
+ .global g_idle_topstack /* The start of the heap */
/****************************************************************************
* .text
@@ -154,8 +154,8 @@ hang:
* until the end of memory.
*/
- .type g_heapbase, @object
-g_heapbase:
+ .type g_idle_topstack, @object
+g_idle_topstack:
.long _ebss
- .size g_heapbase, . - g_heapbase
+ .size g_idle_topstack, . - g_idle_topstack
.end