Changeset bd1deed in mainline
- Timestamp:
- 2007-02-11T20:04:08Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c993e45
- Parents:
- ce8aed1
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/toolchain/toolchain.ia32.sh
rce8aed1 rbd1deed 92 92 "${GCCDIR}/configure" "--host=${HOST}" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib --disable-libgcj --without-headers --disable-shared 93 93 check_error $? "Error configuring GCC." 94 PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc 94 PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc all-target-libobjc install-target-libobjc 95 95 check_error $? "Error compiling/installing GCC." 96 96 -
contrib/toolchain/toolchain.sparc64.sh
rce8aed1 rbd1deed 92 92 "${GCCDIR}/configure" "--host=${HOST}" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib --disable-libgcj --without-headers --disable-shared 93 93 check_error $? "Error configuring GCC." 94 PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc 94 PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc all-target-libobjc install-target-libobjc 95 95 check_error $? "Error compiling/installing GCC." 96 96 -
kernel/Makefile
rce8aed1 rbd1deed 129 129 OBJCOPY = objcopy 130 130 OBJDUMP = objdump 131 LIBDIR = /usr/lib 131 132 else 132 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 133 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 134 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 135 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 136 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 133 CC = $(TOOLCHAIN_DIR)/bin/$(TARGET)-gcc 134 AS = $(TOOLCHAIN_DIR)/bin/$(TARGET)-as 135 LD = $(TOOLCHAIN_DIR)/bin/$(TARGET)-ld 136 OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy 137 OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump 138 LIBDIR = $(TOOLCHAIN_DIR)/lib 137 139 endif 138 140 … … 240 242 endif 241 243 244 ## Experimental features 245 # 246 247 ifeq ($(CONFIG_EXPERIMENTAL),y) 248 GENERIC_SOURCES += generic/src/lib/objc.c 249 EXTRA_OBJECTS = $(LIBDIR)/libobjc.a 250 EXTRA_FLAGS += -x objective-c 251 endif 252 242 253 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) 243 254 ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) … … 280 291 generic/src/debug/real_map.bin: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) 281 292 $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab Makefile generic/src/debug/empty_map.o 282 $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/empty_map.o-o $@ -Map kernel.map.pre293 $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre 283 294 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump 284 295 tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin … … 286 297 # on architectures, that have bss after symtab 287 298 $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab generic/src/debug/real_map.bin generic/src/debug/sizeok_map.o 288 $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre299 $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre 289 300 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump 290 301 tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin … … 294 305 295 306 kernel.raw: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o 296 $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o -o $@ -Map kernel.map307 $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/real_map.o -o $@ -Map kernel.map 297 308 298 309 kernel.bin: kernel.raw … … 309 320 310 321 %.o: %.c 311 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@322 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@ -
kernel/arch/amd64/Makefile.inc
rce8aed1 rbd1deed 34 34 BFD = binary 35 35 TARGET = amd64-linux-gnu 36 TOOLCHAIN_DIR = /usr/local/amd64 /bin36 TOOLCHAIN_DIR = /usr/local/amd64 37 37 38 38 CFLAGS += -fno-unwind-tables -m64 -mcmodel=kernel -mno-red-zone -
kernel/arch/ia32/Makefile.inc
rce8aed1 rbd1deed 34 34 BFD = binary 35 35 TARGET = i686-pc-linux-gnu 36 TOOLCHAIN_DIR = /usr/local/i686 /bin36 TOOLCHAIN_DIR = /usr/local/i686 37 37 38 38 DEFS += -DMACHINE=$(MACHINE) -D__32_BITS__ -
kernel/arch/ia32/src/mm/as.c
rce8aed1 rbd1deed 40 40 void as_arch_init(void) 41 41 { 42 #ifndef __OBJC__ 42 43 as_operations = &as_pt_operations; 44 #endif 43 45 } 44 46 -
kernel/arch/ia32xen/Makefile.inc
rce8aed1 rbd1deed 34 34 BFD = elf32-i386 35 35 TARGET = i686-pc-linux-gnu 36 TOOLCHAIN_DIR = /usr/local/i686 /bin36 TOOLCHAIN_DIR = /usr/local/i686 37 37 38 38 DEFS += -DMACHINE=$(MACHINE) -D__32_BITS__ -
kernel/arch/ia64/Makefile.inc
rce8aed1 rbd1deed 34 34 BFD = elf64-ia64-little 35 35 TARGET = ia64-pc-linux-gnu 36 TOOLCHAIN_DIR = /usr/local/ia64 /bin36 TOOLCHAIN_DIR = /usr/local/ia64 37 37 38 38 INIT0_ADDRESS = 0xe000000000400000 -
kernel/arch/mips32/Makefile.inc
rce8aed1 rbd1deed 32 32 BFD_ARCH = mips 33 33 TARGET = mipsel-linux-gnu 34 TOOLCHAIN_DIR = /usr/local/mipsel /bin34 TOOLCHAIN_DIR = /usr/local/mipsel 35 35 36 36 KERNEL_LOAD_ADDRESS = 0x80100000 -
kernel/arch/ppc32/Makefile.inc
rce8aed1 rbd1deed 34 34 BFD = binary 35 35 TARGET = ppc-linux-gnu 36 TOOLCHAIN_DIR = /usr/local/ppc /bin36 TOOLCHAIN_DIR = /usr/local/ppc 37 37 38 38 CFLAGS += -mcpu=powerpc -msoft-float -m32 -
kernel/arch/ppc64/Makefile.inc
rce8aed1 rbd1deed 34 34 BFD = binary 35 35 TARGET = ppc64-linux-gnu 36 TOOLCHAIN_DIR = /usr/local/ppc64 /bin36 TOOLCHAIN_DIR = /usr/local/ppc64 37 37 38 38 CFLAGS += -mcpu=powerpc64 -msoft-float -m64 -
kernel/arch/sparc64/Makefile.inc
rce8aed1 rbd1deed 34 34 BFD = binary 35 35 TARGET = sparc64-linux-gnu 36 TOOLCHAIN_DIR = /usr/local/sparc64 /bin36 TOOLCHAIN_DIR = /usr/local/sparc64 37 37 38 38 CFLAGS += -mcpu=ultrasparc -m64 -
kernel/genarch/include/mm/page_pt.h
rce8aed1 rbd1deed 108 108 #define PTE_EXECUTABLE(p) PTE_EXECUTABLE_ARCH((p)) 109 109 110 #ifndef __OBJC__ 110 111 extern as_operations_t as_pt_operations; 112 #endif 111 113 extern page_mapping_operations_t pt_mapping_operations; 112 114 -
kernel/genarch/src/mm/as_pt.c
rce8aed1 rbd1deed 53 53 static void pt_unlock(as_t *as, bool unlock); 54 54 55 #ifdef __OBJC__ 56 @implementation as_t 57 58 + (pte_t *) page_table_create: (int) flags 59 { 60 return ptl0_create(flags); 61 } 62 63 + (void) page_table_destroy: (pte_t *) page_table 64 { 65 ptl0_destroy(page_table); 66 } 67 68 - (void) page_table_lock: (bool) _lock 69 { 70 pt_lock(self, _lock); 71 } 72 73 - (void) page_table_unlock: (bool) unlock 74 { 75 pt_unlock(self, unlock); 76 } 77 78 @end 79 #else 55 80 as_operations_t as_pt_operations = { 56 81 .page_table_create = ptl0_create, … … 59 84 .page_table_unlock = pt_unlock 60 85 }; 86 #endif 61 87 62 88 /** Create PTL0. -
kernel/generic/include/memstr.h
rce8aed1 rbd1deed 45 45 extern void _memsetb(uintptr_t dst, size_t cnt, uint8_t x); 46 46 extern void _memsetw(uintptr_t dst, size_t cnt, uint16_t x); 47 extern char *strcpy(char *dest, const char *src); 47 48 48 49 #endif -
kernel/generic/include/mm/as.h
rce8aed1 rbd1deed 80 80 /** The page fault was caused by memcpy_from_uspace() or memcpy_to_uspace(). */ 81 81 #define AS_PF_DEFER 2 82 83 #ifdef __OBJC__ 84 @interface as_t { 85 @public 86 /** Protected by asidlock. */ 87 link_t inactive_as_with_asid_link; 88 89 mutex_t lock; 90 91 /** Number of references (i.e tasks that reference this as). */ 92 count_t refcount; 93 94 /** Number of processors on wich is this address space active. */ 95 count_t cpu_refcount; 96 97 /** B+tree of address space areas. */ 98 btree_t as_area_btree; 99 100 /** 101 * Address space identifier. 102 * Constant on architectures that do not support ASIDs. 103 */ 104 asid_t asid; 105 106 /** Non-generic content. */ 107 as_genarch_t genarch; 108 109 /** Architecture specific content. */ 110 as_arch_t arch; 111 } 112 + (pte_t *) page_table_create: (int) flags; 113 + (void) page_table_destroy: (pte_t *) page_table; 114 - (void) page_table_lock: (bool) _lock; 115 - (void) page_table_unlock: (bool) unlock; 116 @end 117 118 #else 82 119 83 120 /** Address space structure. … … 122 159 void (* page_table_unlock)(as_t *as, bool unlock); 123 160 } as_operations_t; 161 #endif 124 162 125 163 /** … … 202 240 203 241 extern as_t *AS_KERNEL; 242 243 #ifndef __OBJC__ 204 244 extern as_operations_t *as_operations; 245 #endif 205 246 206 247 SPINLOCK_EXTERN(inactive_as_with_asid_lock); -
kernel/generic/include/print.h
rce8aed1 rbd1deed 45 45 #define EOF (-1) 46 46 47 extern int puts(const char *s); 47 48 extern int printf(const char *fmt, ...); 48 49 extern int sprintf(char *str, const char *fmt, ...); -
kernel/generic/src/lib/memstr.c
rce8aed1 rbd1deed 75 75 } 76 76 77 return (char *) src;77 return (char *) src; 78 78 } 79 79 … … 93 93 uint8_t *p = (uint8_t *) dst; 94 94 95 for (i=0; i<cnt; i++)95 for (i = 0; i < cnt; i++) 96 96 p[i] = x; 97 97 } … … 112 112 uint16_t *p = (uint16_t *) dst; 113 113 114 for (i=0; i<cnt; i++)114 for (i = 0; i < cnt; i++) 115 115 p[i] = x; 116 } 117 118 /** Copy string 119 * 120 * Copy string from src address to dst address. 121 * The copying is done char-by-char until the null 122 * character. The source and destination memory areas 123 * cannot overlap. 124 * 125 * @param src Origin string to copy from. 126 * @param dst Origin string to copy to. 127 * 128 */ 129 char *strcpy(char *dest, const char *src) 130 { 131 char *orig = dest; 132 133 while ((*(dest++) = *(src++))); 134 return orig; 116 135 } 117 136 -
kernel/generic/src/mm/as.c
rce8aed1 rbd1deed 82 82 #endif /* CONFIG_VIRT_IDX_DCACHE */ 83 83 84 #ifndef __OBJC__ 84 85 /** 85 86 * Each architecture decides what functions will be used to carry out … … 87 88 */ 88 89 as_operations_t *as_operations = NULL; 90 #endif 89 91 90 92 /** … … 993 995 pte_t *page_table_create(int flags) 994 996 { 995 ASSERT(as_operations); 996 ASSERT(as_operations->page_table_create); 997 998 return as_operations->page_table_create(flags); 997 #ifdef __OBJC__ 998 return [as_t page_table_create: flags]; 999 #else 1000 ASSERT(as_operations); 1001 ASSERT(as_operations->page_table_create); 1002 1003 return as_operations->page_table_create(flags); 1004 #endif 999 1005 } 1000 1006 … … 1007 1013 void page_table_destroy(pte_t *page_table) 1008 1014 { 1009 ASSERT(as_operations); 1010 ASSERT(as_operations->page_table_destroy); 1011 1012 as_operations->page_table_destroy(page_table); 1015 #ifdef __OBJC__ 1016 return [as_t page_table_destroy: page_table]; 1017 #else 1018 ASSERT(as_operations); 1019 ASSERT(as_operations->page_table_destroy); 1020 1021 as_operations->page_table_destroy(page_table); 1022 #endif 1013 1023 } 1014 1024 … … 1027 1037 void page_table_lock(as_t *as, bool lock) 1028 1038 { 1039 #ifdef __OBJC__ 1040 [as page_table_lock: lock]; 1041 #else 1029 1042 ASSERT(as_operations); 1030 1043 ASSERT(as_operations->page_table_lock); 1031 1044 1032 1045 as_operations->page_table_lock(as, lock); 1046 #endif 1033 1047 } 1034 1048 … … 1040 1054 void page_table_unlock(as_t *as, bool unlock) 1041 1055 { 1056 #ifdef __OBJC__ 1057 [as page_table_unlock: unlock]; 1058 #else 1042 1059 ASSERT(as_operations); 1043 1060 ASSERT(as_operations->page_table_unlock); 1044 1061 1045 1062 as_operations->page_table_unlock(as, unlock); 1063 #endif 1046 1064 } 1047 1065 -
kernel/generic/src/printf/vprintf.c
rce8aed1 rbd1deed 37 37 #include <putchar.h> 38 38 39 int vprintf_write(const char *str, size_t count, void *unused); 39 static int vprintf_write(const char *str, size_t count, void *unused) 40 { 41 size_t i; 42 for (i = 0; i < count; i++) 43 putchar(str[i]); 44 return i; 45 } 40 46 41 int vprintf_write(const char *str, size_t count, void *unused)47 int puts(const char *s) 42 48 { 43 size_t i = 0;44 for ( ; i < count; i++)45 putchar(s tr[i]);49 size_t i; 50 for (i = 0; s[i] != 0; i++) 51 putchar(s[i]); 46 52 return i; 47 53 } … … 49 55 int vprintf(const char *fmt, va_list ap) 50 56 { 51 struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL};57 struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL}; 52 58 return printf_core(fmt, &ps, ap); 53 59 -
kernel/kernel.config
rce8aed1 rbd1deed 41 41 @ "i460GX" i460GX chipset machine 42 42 ! [ARCH=ia64] MACHINE (choice) 43 44 43 45 44 # Framebuffer support … … 127 126 # Compile kernel tests 128 127 ! CONFIG_TEST (y/n) 128 129 130 ## Experimental features 131 132 # Enable experimental features 133 ! CONFIG_EXPERIMENTAL (n/y)
Note:
See TracChangeset
for help on using the changeset viewer.