summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-05-27 19:34:37 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-05-27 19:34:37 +0000
commit4050a7fb50ab19ac410e3535d6afe4a65d737fc5 (patch)
treeb8d06633ea163bd7f4df06c6aa6df36ec04f6b5e /c/src/lib/libbsp/i386/pc386/startup/bspstart.c
parentAdded names for C++ compilers. (diff)
downloadrtems-4050a7fb50ab19ac410e3535d6afe4a65d737fc5.tar.bz2
Numerous changes including the following:
+ DEBUG_EARLY_START re-added (Eric Valette) + segment register initialization (Aleksey/Quality Quorum) + heap size use correction + more debug printk's + increased heap size. Now works with grub boot on all systems I have access to including desktops and a laptop. This is with the i386-rtems tools. Neither i386-rtemself nor netboot produces a working executable.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/startup/bspstart.c')
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspstart.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index 370b7487d7..d952457485 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -81,8 +81,8 @@ void bsp_pretasking_hook(void)
if (rtemsFreeMemStart & (CPU_ALIGNMENT - 1)) /* not aligned => align it */
rtemsFreeMemStart = (rtemsFreeMemStart+CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
- bsp_libc_init((void *)rtemsFreeMemStart, HEAP_SIZE << 10, 0);
- rtemsFreeMemStart += HEAP_SIZE << 10; /* HEAP_SIZE is in KBytes */
+ bsp_libc_init((void *)rtemsFreeMemStart, _heap_size, 0);
+ rtemsFreeMemStart += _heap_size; /* HEAP_SIZE in KBytes */
#ifdef RTEMS_DEBUG
@@ -125,4 +125,28 @@ void bsp_start( void )
BSP_Configuration.work_space_start = (void *)rtemsFreeMemStart;
rtemsFreeMemStart += BSP_Configuration.work_space_size;
+
+ /*
+ * The following information is very useful when debugging.
+ */
+
+#if 0
+ printk( "work_space_size = 0x%x\n", BSP_Configuration.work_space_size );
+ printk( "maximum_extensions = 0x%x\n", BSP_Configuration.maximum_extensions );
+ printk( "microseconds_per_tick = 0x%x\n",
+ BSP_Configuration.microseconds_per_tick );
+ printk( "ticks_per_timeslice = 0x%x\n",
+ BSP_Configuration.ticks_per_timeslice );
+ printk( "maximum_devices = 0x%x\n", BSP_Configuration.maximum_devices );
+ printk( "number_of_device_drivers = 0x%x\n",
+ BSP_Configuration.number_of_device_drivers );
+ printk( "Device_driver_table = 0x%x\n",
+ BSP_Configuration.Device_driver_table );
+
+ printk( "_heap_size = 0x%x\n", _heap_size );
+ printk( "_stack_size = 0x%x\n", _stack_size );
+ printk( "rtemsFreeMemStart = 0x%x\n", rtemsFreeMemStart );
+ printk( "work_space_start = 0x%x\n", BSP_Configuration.work_space_start );
+ printk( "work_space_size = 0x%x\n", BSP_Configuration.work_space_size );
+#endif
} /* bsp_start */