From c40a44b52ec6817d09d6c59beba319c17c1a17e6 Mon Sep 17 00:00:00 2001 From: dtrg Date: Tue, 20 Feb 2007 00:31:54 +0000 Subject: [PATCH] Added some missing CVS headers and did a bit of cleaning up. --- plat/pc86/README | 1 + plat/pc86/boot.s | 1 + plat/pc86/descr | 3 ++ plat/pc86/libsys/_brk.s | 1 + plat/pc86/libsys/_mon.s | 1 + plat/pc86/libsys/_sbrk.c | 87 -------------------------------- plat/pc86/libsys/_sys_ioctl.c | 4 ++ plat/pc86/libsys/_sys_rawread.s | 1 + plat/pc86/libsys/_sys_rawwrite.s | 1 + plat/pc86/libsys/_sys_read.c | 5 ++ plat/pc86/libsys/_sys_write.c | 5 ++ plat/pc86/libsys/errno.s | 1 + plat/pc86/libsys/libsys.h | 5 ++ plat/pc86/libsys/pmfile | 1 + plat/pc86/pmfile | 1 + 15 files changed, 31 insertions(+), 87 deletions(-) delete mode 100644 plat/pc86/libsys/_sbrk.c diff --git a/plat/pc86/README b/plat/pc86/README index b4a02db48..02b1b3466 100644 --- a/plat/pc86/README +++ b/plat/pc86/README @@ -1,5 +1,6 @@ # $Source$ # $State$ +# $Revision$ The pc86 platform ================= diff --git a/plat/pc86/boot.s b/plat/pc86/boot.s index 61713f2ee..139a2f106 100644 --- a/plat/pc86/boot.s +++ b/plat/pc86/boot.s @@ -1,6 +1,7 @@ # ! $Source$ ! $State$ +! $Revision$ ! Declare segments (the order is important). diff --git a/plat/pc86/descr b/plat/pc86/descr index 1b6e72843..9427ee382 100644 --- a/plat/pc86/descr +++ b/plat/pc86/descr @@ -1,4 +1,7 @@ +# $Source$ +# $State$ # $Revision$ + var w=2 var p=2 var s=2 diff --git a/plat/pc86/libsys/_brk.s b/plat/pc86/libsys/_brk.s index dffc06edd..c2d9dc381 100644 --- a/plat/pc86/libsys/_brk.s +++ b/plat/pc86/libsys/_brk.s @@ -1,6 +1,7 @@ # ! $Source$ ! $State$ +! $Revision$ ! Declare segments (the order is important). diff --git a/plat/pc86/libsys/_mon.s b/plat/pc86/libsys/_mon.s index e998f92fd..50babdc87 100644 --- a/plat/pc86/libsys/_mon.s +++ b/plat/pc86/libsys/_mon.s @@ -1,6 +1,7 @@ # ! $Source$ ! $State$ +! $Revision$ ! Declare segments (the order is important). diff --git a/plat/pc86/libsys/_sbrk.c b/plat/pc86/libsys/_sbrk.c deleted file mode 100644 index f1896266f..000000000 --- a/plat/pc86/libsys/_sbrk.c +++ /dev/null @@ -1,87 +0,0 @@ -/* There should be a header for brk and sbrk, but there isn't. */ - -#include -#include -/* #include */ - -extern char _end[]; -static char* brkpointer = _end; - -static void prints(char* s) -{ - for (;;) - { - char c = *s++; - if (!c) - break; - write(0, &c, 1); - } -} - -static void printc(unsigned int n) -{ - char c; - - n &= 0xF; - if (n < 10) - c = n + '0'; - else - c = n + 'A' - 10; - - write(0, &c, 1); -} - -static void printh(unsigned int n) -{ - printc(n>>12); - printc(n>>8); - printc(n>>4); - printc(n); -} - -static void waitforkey(void) -{ - char c; - read(1, &c, 1); -} - -int _brk(char* newend) -{ - char dummy; - - /* Ensure that newend is reasonable. */ - - if ((newend < _end) || (newend > (&dummy - 256))) - { - prints("[brk to "); - printh((unsigned int) newend); - prints(" failed]\n\r"); - waitforkey(); - errno = ENOMEM; - return -1; - } - - prints("[brk to "); - printh((unsigned int) newend); - prints("]\n\r"); - waitforkey(); - brkpointer = newend; - return 0; -} - -char* _sbrk(int delta) -{ - char* oldpointer = brkpointer; - prints("[sbrk delta "); - printh((unsigned int) delta); - prints(" from "); - printh((unsigned int) oldpointer); - prints("]\n\r"); - printh((unsigned int) brkpointer); - prints(" "); - printh((unsigned int) _end); - if (_brk(oldpointer + delta) == -1) - return (char*)-1; - - return oldpointer; -} diff --git a/plat/pc86/libsys/_sys_ioctl.c b/plat/pc86/libsys/_sys_ioctl.c index c35e3c237..237ace7dc 100644 --- a/plat/pc86/libsys/_sys_ioctl.c +++ b/plat/pc86/libsys/_sys_ioctl.c @@ -1,3 +1,7 @@ +/* $Source$ + * $State$ + */ + #include #include #include diff --git a/plat/pc86/libsys/_sys_rawread.s b/plat/pc86/libsys/_sys_rawread.s index bf933b4fd..480727b55 100644 --- a/plat/pc86/libsys/_sys_rawread.s +++ b/plat/pc86/libsys/_sys_rawread.s @@ -1,6 +1,7 @@ # ! $Source$ ! $State$ +! $Revision$ ! Declare segments (the order is important). diff --git a/plat/pc86/libsys/_sys_rawwrite.s b/plat/pc86/libsys/_sys_rawwrite.s index 1193ed8bf..75f75aae1 100644 --- a/plat/pc86/libsys/_sys_rawwrite.s +++ b/plat/pc86/libsys/_sys_rawwrite.s @@ -1,6 +1,7 @@ # ! $Source$ ! $State$ +! $Revision$ ! Declare segments (the order is important). diff --git a/plat/pc86/libsys/_sys_read.c b/plat/pc86/libsys/_sys_read.c index cc1a1e5a0..e56e79338 100644 --- a/plat/pc86/libsys/_sys_read.c +++ b/plat/pc86/libsys/_sys_read.c @@ -1,3 +1,8 @@ +/* $Source$ + * $State$ + * $Revision$ + */ + #include #include #include diff --git a/plat/pc86/libsys/_sys_write.c b/plat/pc86/libsys/_sys_write.c index da64d4687..5efb1b403 100644 --- a/plat/pc86/libsys/_sys_write.c +++ b/plat/pc86/libsys/_sys_write.c @@ -1,3 +1,8 @@ +/* $Source$ + * $State$ + * $Revision$ + */ + #include #include #include diff --git a/plat/pc86/libsys/errno.s b/plat/pc86/libsys/errno.s index 8392154c9..21f7fab6d 100644 --- a/plat/pc86/libsys/errno.s +++ b/plat/pc86/libsys/errno.s @@ -1,6 +1,7 @@ # ! $Source$ ! $State$ +! $Revision$ ! Declare segments (the order is important). diff --git a/plat/pc86/libsys/libsys.h b/plat/pc86/libsys/libsys.h index 75ccf5c87..736f19e91 100644 --- a/plat/pc86/libsys/libsys.h +++ b/plat/pc86/libsys/libsys.h @@ -1,3 +1,8 @@ +/* $Source$ + * $State$ + * $Revision$ + */ + #ifndef LIBSYS_H #define LIBSYS_H diff --git a/plat/pc86/libsys/pmfile b/plat/pc86/libsys/pmfile index 456d4b132..82dcd742e 100644 --- a/plat/pc86/libsys/pmfile +++ b/plat/pc86/libsys/pmfile @@ -1,5 +1,6 @@ -- $Source$ -- $State$ +-- $Revision$ local d = ROOTDIR.."plat/pc86/libsys/" diff --git a/plat/pc86/pmfile b/plat/pc86/pmfile index 4ff0e88a1..54c895dae 100644 --- a/plat/pc86/pmfile +++ b/plat/pc86/pmfile @@ -1,5 +1,6 @@ -- $Source$ -- $State$ +-- $Revision$ local d = ROOTDIR.."plat/pc86/" -- 2.34.1