Add capability to manager memory in discontiguous regions.

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@35 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2007-03-04 15:23:22 +00:00
parent 7b93c5cd57
commit 6061949bc5
9 changed files with 45 additions and 4 deletions
+4
View File
@@ -78,6 +78,10 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_DEBUG_VERBOSE - enables verbose debug output
CONFIG_HAVE_LOWPUTC - architecture supports low-level, boot
time console output
CONFIG_MM_REGIONS - If the architecture includes multiple
regions of memory to allocate from, this specifies the
number of memory regions that the memory manager must
handle and enables the API mm_addregion(start, end);
CONFIG_RR_INTERVAL - The round robin timeslice will be set
this number of milliseconds; Round robin scheduling can
be disabled by setting this value to zero.
+5
View File
@@ -81,6 +81,10 @@ CONFIG_UART_MODEM_2STOP=0
# that will be used in the build
# CONFIG_DEBUG - enables built-in debug options
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
# handle and enables the API mm_addregion(start, end);
# CONFIG_HAVE_LOWPUTC - architecture supports low-level, boot
# time console output
# CONFIG_RR_INTERVAL - The round robin timeslice will be set
@@ -100,6 +104,7 @@ CONFIG_UART_MODEM_2STOP=0
CONFIG_EXAMPLE=ostest
CONFIG_DEBUG=y
CONFIG_DEBUG_VERBOSE=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_INSTRUMENTATION=n
+6 -1
View File
@@ -48,6 +48,10 @@ CONFIG_ARCH_8051=y
# that will be used in the build
# CONFIG_DEBUG - enables built-in debug options
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
# handle and enables the API mm_addregion(start, end);
# CONFIG_HAVE_LOWPUTC - architecture supports low-level, boot
# time console output
# CONFIG_RR_INTERVAL - The round robin timeslice will be set
@@ -67,8 +71,9 @@ CONFIG_ARCH_8051=y
CONFIG_EXAMPLE=ostest
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_MM_REGIONS=2
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200
CONFIG_RR_INTERVAL=0
CONFIG_SCHED_INSTRUMENTATION=n
CONFIG_TASK_NAME_SIZE=0
CONFIG_START_YEAR=2007
+7
View File
@@ -78,3 +78,10 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
*heap_start = (FAR void*)UP_HEAP1_BASE;
*heap_size = UP_HEAP1_END - UP_HEAP1_BASE;
}
#if CONFIG_MM_REGIONS > 1
void up_addregion(void)
{
mm_addregion((FAR void*)UP_HEAP2_BASE, UP_HEAP2_END - UP_HEAP2_BASE);
}
#endif
+1 -1
View File
@@ -75,6 +75,6 @@ void up_assert(void)
void up_assert_code(int errorcode)
{
dbg("Assertion failed with error code: %d\n", errcode);
dbg("Assertion failed with error code: %d\n", errorcode);
exit(errorcode);
}
+6
View File
@@ -93,6 +93,12 @@ void up_initialize(void)
g_irqtos = 0;
/* Add extra memory fragments to the memory manager */
#if CONFIG_MM_REGIONS > 1
up_addregion();
#endif
/* Initialize the interrupt subsystem */
up_irqinitialize();
+6 -1
View File
@@ -102,7 +102,9 @@
* when the following simple addtions do the job).
*/
#ifndef __ASSEMBLY__
sfr at 0xc9 T2MOD ;
#endif
/* Timing information.
*
@@ -175,9 +177,12 @@ extern ubyte g_irqtos;
#ifndef __ASSEMBLY__
#if CONFIG_MM_REGIONS > 1
extern void up_addregion(void);
#endif
extern void up_irqinitialize(void);
extern void up_restorecontext(FAR struct xcptcontext *context);
extern void up_restorestack(FAR struct xcptcontext *context);
extern void up_restorestack(FAR struct xcptcontext *context);
extern ubyte up_savecontext(FAR struct xcptcontext *context);
extern void up_savestack(FAR struct xcptcontext *context);
extern void up_timerinit(void);
+5 -1
View File
@@ -48,7 +48,7 @@
static void _up_putc(int ch) __naked
{
#if 0
#if 1
ch; /* To avoid unreferenced argument warning */
_asm
mov a, dpl
@@ -73,6 +73,10 @@ cout: jnb ti, cout
int up_putc(int ch)
{
_up_putc(ch);
if (ch == '\n')
{
_up_putc('\r');
}
return ch;
}
+5
View File
@@ -48,6 +48,10 @@ CONFIG_ARCH_SIM=y
# that will be used in the build
# CONFIG_DEBUG - enables built-in debug options
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
# handle and enables the API mm_addregion(start, end);
# CONFIG_HAVE_LOWPUTC - architecture supports low-level, boot
# time console output
# CONFIG_RR_INTERVAL - The round robin timeslice will be set
@@ -67,6 +71,7 @@ CONFIG_ARCH_SIM=y
CONFIG_EXAMPLE=ostest
CONFIG_DEBUG=y
CONFIG_DEBUG_VERBOSE=y
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_INSTRUMENTATION=n