From ae696e04100ff1e3f7115a5c65dc4b06dd587dc7 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Thu, 25 Mar 2010 01:28:02 +0200 Subject: [PATCH] Removed deleted files --- conts/libc/src/memcpy.c | 115 --------------------------------- conts/libc/src/memset.c | 138 ---------------------------------------- tools/run-qemu-insight | 4 +- 3 files changed, 2 insertions(+), 255 deletions(-) delete mode 100644 conts/libc/src/memcpy.c delete mode 100644 conts/libc/src/memset.c diff --git a/conts/libc/src/memcpy.c b/conts/libc/src/memcpy.c deleted file mode 100644 index b9c7075..0000000 --- a/conts/libc/src/memcpy.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Australian Public Licence B (OZPLB) - * - * Version 1-0 - * - * Copyright (c) 2004 University of New South Wales - * - * All rights reserved. - * - * Developed by: Operating Systems and Distributed Systems Group (DiSy) - * University of New South Wales - * http://www.disy.cse.unsw.edu.au - * - * Permission is granted by University of New South Wales, free of charge, to - * any person obtaining a copy of this software and any associated - * documentation files (the "Software") to deal with the Software without - * restriction, including (without limitation) the rights to use, copy, - * modify, adapt, merge, publish, distribute, communicate to the public, - * sublicense, and/or sell, lend or rent out copies of the Software, and - * to permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimers. - * - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimers in the documentation and/or other materials provided - * with the distribution. - * - * * Neither the name of University of New South Wales, nor the names of its - * contributors, may be used to endorse or promote products derived - * from this Software without specific prior written permission. - * - * EXCEPT AS EXPRESSLY STATED IN THIS LICENCE AND TO THE FULL EXTENT - * PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED "AS-IS", AND - * NATIONAL ICT AUSTRALIA AND ITS CONTRIBUTORS MAKE NO REPRESENTATIONS, - * WARRANTIES OR CONDITIONS OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - * BUT NOT LIMITED TO ANY REPRESENTATIONS, WARRANTIES OR CONDITIONS - * REGARDING THE CONTENTS OR ACCURACY OF THE SOFTWARE, OR OF TITLE, - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, - * THE ABSENCE OF LATENT OR OTHER DEFECTS, OR THE PRESENCE OR ABSENCE OF - * ERRORS, WHETHER OR NOT DISCOVERABLE. - * - * TO THE FULL EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL - * NATIONAL ICT AUSTRALIA OR ITS CONTRIBUTORS BE LIABLE ON ANY LEGAL - * THEORY (INCLUDING, WITHOUT LIMITATION, IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHERWISE) FOR ANY CLAIM, LOSS, DAMAGES OR OTHER - * LIABILITY, INCLUDING (WITHOUT LIMITATION) LOSS OF PRODUCTION OR - * OPERATION TIME, LOSS, DAMAGE OR CORRUPTION OF DATA OR RECORDS; OR LOSS - * OF ANTICIPATED SAVINGS, OPPORTUNITY, REVENUE, PROFIT OR GOODWILL, OR - * OTHER ECONOMIC LOSS; OR ANY SPECIAL, INCIDENTAL, INDIRECT, - * CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES, ARISING OUT OF OR IN - * CONNECTION WITH THIS LICENCE, THE SOFTWARE OR THE USE OF OR OTHER - * DEALINGS WITH THE SOFTWARE, EVEN IF NATIONAL ICT AUSTRALIA OR ITS - * CONTRIBUTORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH CLAIM, LOSS, - * DAMAGES OR OTHER LIABILITY. - * - * If applicable legislation implies representations, warranties, or - * conditions, or imposes obligations or liability on University of New South - * Wales or one of its contributors in respect of the Software that - * cannot be wholly or partly excluded, restricted or modified, the - * liability of University of New South Wales or the contributor is limited, to - * the full extent permitted by the applicable legislation, at its - * option, to: - * a. in the case of goods, any one or more of the following: - * i. the replacement of the goods or the supply of equivalent goods; - * ii. the repair of the goods; - * iii. the payment of the cost of replacing the goods or of acquiring - * equivalent goods; - * iv. the payment of the cost of having the goods repaired; or - * b. in the case of services: - * i. the supplying of the services again; or - * ii. the payment of the cost of having the services supplied again. - * - * The construction, validity and performance of this licence is governed - * by the laws in force in New South Wales, Australia. - */ -/* - Author: Carl van Schaik -*/ -#include -#include - -/* - * copy n bytes from s to d; the regions must not overlap - */ -/* THREAD SAFE */ -void * -memcpy(void *d, const void *s, size_t n) -{ - size_t i; - uintptr_t align = sizeof(uintptr_t)-1; - - if (((uintptr_t)d & align) || ((uintptr_t)s & align) || (n & align)) - { - char *bs = (char *)s; - char *bd = (char *)d; - - /* XXX - optimize this */ - for (i = 0; i < n; i++) - *bd++ = *bs++; - } - else - { /* memcpy - word aligned */ - uintptr_t *ws = (uintptr_t*)s; - uintptr_t *wd = (uintptr_t*)d; - - n /= sizeof(uintptr_t); - - for (i = 0; i < n; i++) - *wd++ = *ws++; - } - return d; -} diff --git a/conts/libc/src/memset.c b/conts/libc/src/memset.c deleted file mode 100644 index 66bb045..0000000 --- a/conts/libc/src/memset.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Australian Public Licence B (OZPLB) - * - * Version 1-0 - * - * Copyright (c) 2004 University of New South Wales - * - * All rights reserved. - * - * Developed by: Operating Systems and Distributed Systems Group (DiSy) - * University of New South Wales - * http://www.disy.cse.unsw.edu.au - * - * Permission is granted by University of New South Wales, free of charge, to - * any person obtaining a copy of this software and any associated - * documentation files (the "Software") to deal with the Software without - * restriction, including (without limitation) the rights to use, copy, - * modify, adapt, merge, publish, distribute, communicate to the public, - * sublicense, and/or sell, lend or rent out copies of the Software, and - * to permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimers. - * - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimers in the documentation and/or other materials provided - * with the distribution. - * - * * Neither the name of University of New South Wales, nor the names of its - * contributors, may be used to endorse or promote products derived - * from this Software without specific prior written permission. - * - * EXCEPT AS EXPRESSLY STATED IN THIS LICENCE AND TO THE FULL EXTENT - * PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED "AS-IS", AND - * NATIONAL ICT AUSTRALIA AND ITS CONTRIBUTORS MAKE NO REPRESENTATIONS, - * WARRANTIES OR CONDITIONS OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - * BUT NOT LIMITED TO ANY REPRESENTATIONS, WARRANTIES OR CONDITIONS - * REGARDING THE CONTENTS OR ACCURACY OF THE SOFTWARE, OR OF TITLE, - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, - * THE ABSENCE OF LATENT OR OTHER DEFECTS, OR THE PRESENCE OR ABSENCE OF - * ERRORS, WHETHER OR NOT DISCOVERABLE. - * - * TO THE FULL EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL - * NATIONAL ICT AUSTRALIA OR ITS CONTRIBUTORS BE LIABLE ON ANY LEGAL - * THEORY (INCLUDING, WITHOUT LIMITATION, IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHERWISE) FOR ANY CLAIM, LOSS, DAMAGES OR OTHER - * LIABILITY, INCLUDING (WITHOUT LIMITATION) LOSS OF PRODUCTION OR - * OPERATION TIME, LOSS, DAMAGE OR CORRUPTION OF DATA OR RECORDS; OR LOSS - * OF ANTICIPATED SAVINGS, OPPORTUNITY, REVENUE, PROFIT OR GOODWILL, OR - * OTHER ECONOMIC LOSS; OR ANY SPECIAL, INCIDENTAL, INDIRECT, - * CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES, ARISING OUT OF OR IN - * CONNECTION WITH THIS LICENCE, THE SOFTWARE OR THE USE OF OR OTHER - * DEALINGS WITH THE SOFTWARE, EVEN IF NATIONAL ICT AUSTRALIA OR ITS - * CONTRIBUTORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH CLAIM, LOSS, - * DAMAGES OR OTHER LIABILITY. - * - * If applicable legislation implies representations, warranties, or - * conditions, or imposes obligations or liability on University of New South - * Wales or one of its contributors in respect of the Software that - * cannot be wholly or partly excluded, restricted or modified, the - * liability of University of New South Wales or the contributor is limited, to - * the full extent permitted by the applicable legislation, at its - * option, to: - * a. in the case of goods, any one or more of the following: - * i. the replacement of the goods or the supply of equivalent goods; - * ii. the repair of the goods; - * iii. the payment of the cost of replacing the goods or of acquiring - * equivalent goods; - * iv. the payment of the cost of having the goods repaired; or - * b. in the case of services: - * i. the supplying of the services again; or - * ii. the payment of the cost of having the services supplied again. - * - * The construction, validity and performance of this licence is governed - * by the laws in force in New South Wales, Australia. - */ -/* - Author: Carl van Schaik -*/ -#include -#include -#include - -/* - * Fill memory at s with (n) * byte value 'c' - */ -void * -memset(void *s, int c, size_t n) -{ - uintptr_t num, align, pattern, *p, x; - unsigned char *mem = s; - - x = (unsigned char)c; - align = sizeof(uintptr_t)-1; - - if ((uintptr_t)s & align) - { - num = n > align ? (sizeof(uintptr_t) - ((uintptr_t)s & align)) : n; - n -= num; - while (num--) - *mem++ = x; - } - - num = (uintptr_t)n / sizeof(uintptr_t); - - p = (uintptr_t*)mem; - -#if UINTPTR_MAX == UINT32_MAX - pattern = x | x << 8 | x << 16 | x << 24; -#elif UINTPTR_MAX == UINT64_MAX - pattern = x | x << 8 | x << 16 | x << 24 | - x << 32 | x << 40 | x << 48 | x << 56; -#else -#error UINTPTR_MAX not valid -#endif - while (num) { - /* simple hand unrolled loop */ - if ((num & 3)==0) { - num -= 4; - *p++ = pattern; - *p++ = pattern; - *p++ = pattern; - *p++ = pattern; - } else { - num--; - *p++ = pattern; - } - } - mem = (unsigned char*)p; - - num = n & align; - while (num--) - *mem++ = x; - - return s; -} diff --git a/tools/run-qemu-insight b/tools/run-qemu-insight index 4a2dfab..c181d9c 100755 --- a/tools/run-qemu-insight +++ b/tools/run-qemu-insight @@ -1,5 +1,5 @@ + cd build -qemu-system-arm -s -kernel final.elf -nographic -m 128 -M versatilepb & +qemu-system-arm -s -S -kernel final.elf -nographic -M versatilepb -cpu arm926 & arm-none-insight ; pkill qemu-system-arm cd .. -