diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2004-05-21 15:26:20 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2004-05-21 15:26:20 +0000 |
commit | f7219b211fd1f115f627e87c57cf1569adab6fb4 (patch) | |
tree | 24bfbb5df7c4a905200233df0735d156bc5849fe | |
parent | Fix formatting so script sees PR. (diff) | |
download | rtems-f7219b211fd1f115f627e87c57cf1569adab6fb4.tar.bz2 |
2004-05-21 Till Strauman <strauman@slac.stanford.edu>
* PR 624/bsps
startup/bspstart.c: When probing the memory, make sure not to
corrupt the application. Only probe addresses beyond rtemsFreeMemStart.
* Let IBMPC_outch() convert LF -> CRLF to avoid printk scrambling
the screen.
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/ChangeLog | 8 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/console/outch.c | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/startup/bspstart.c | 12 |
3 files changed, 21 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/ChangeLog b/c/src/lib/libbsp/i386/pc386/ChangeLog index 12e9d818fa..2e465959e1 100644 --- a/c/src/lib/libbsp/i386/pc386/ChangeLog +++ b/c/src/lib/libbsp/i386/pc386/ChangeLog @@ -1,3 +1,11 @@ +2004-05-21 Till Strauman <strauman@slac.stanford.edu> + + * PR 624/bsps + startup/bspstart.c: When probing the memory, make sure not to + corrupt the application. Only probe addresses beyond rtemsFreeMemStart. + * Let IBMPC_outch() convert LF -> CRLF to avoid printk scrambling + the screen. + 2003-10-02 Till Strauman <strauman@slac.stanford.edu> PR 502/bsps diff --git a/c/src/lib/libbsp/i386/pc386/console/outch.c b/c/src/lib/libbsp/i386/pc386/console/outch.c index c643834079..6649a23dc5 100644 --- a/c/src/lib/libbsp/i386/pc386/console/outch.c +++ b/c/src/lib/libbsp/i386/pc386/console/outch.c @@ -270,8 +270,11 @@ _IBMPC_outch(char c) { static int escaped = 0; - if ( ! (escaped = handleEscape(escaped, c)) ) + if ( ! (escaped = handleEscape(escaped, c)) ) { + if ( '\n' == c ) + videoPutChar('\r'); videoPutChar(c); + } } /* _IBMPC_outch */ diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c index 50d70e9295..06033fa132 100644 --- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c @@ -82,12 +82,18 @@ void bsp_postdriver_hook(void); void bsp_pretasking_hook(void) { rtems_unsigned32 topAddr, val; - int i; + int i, lowest; if (rtemsFreeMemStart & (CPU_ALIGNMENT - 1)) /* not aligned => align it */ rtemsFreeMemStart = (rtemsFreeMemStart+CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); + /* find the lowest 1M boundary to probe */ + lowest = ((rtemsFreeMemStart + (1<<20)) >> 20) + 1; + if ( lowest < 2 ) + lowest = 2; + + if(_heap_size == 0) { /* @@ -95,13 +101,13 @@ void bsp_pretasking_hook(void) * between 2M and 2048M. * let us first write */ - for(i=2048; i>=2; i--) + for(i=2048; i>=lowest; i--) { topAddr = i*1024*1024 - 4; *(volatile rtems_unsigned32 *)topAddr = topAddr; } - for(i=2; i<=2048; i++) + for(i=lowest; i<=2048; i++) { topAddr = i*1024*1024 - 4; val = *(rtems_unsigned32 *)topAddr; |