Changes in / [84c20da:1b11576d] in mainline
- Files:
-
- 51 added
- 18 deleted
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
r84c20da r1b11576d 61 61 cp "$$file" "$(DIST_PATH)/cfg/net/" ; \ 62 62 done 63 63 for drv in $(RD_DRVS) ; do \ 64 mkdir -p "$(DIST_PATH)/$(DRVS_PATH)/$$drv" ; \ 65 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv/$$drv" "$(DIST_PATH)/$(DRVS_PATH)/$$drv/$$drv" ; \ 66 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv/$$drv.ma" "$(DIST_PATH)/$(DRVS_PATH)/$$drv/$$drv.ma" ; \ 67 done 68 for file in $(RD_DRV_CFG) ; do \ 69 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$file" "$(DIST_PATH)/$(DRVS_PATH)/$$file" ; \ 70 done 71 64 72 clean: clean_dist 65 73 $(MAKE) -f $(BUILD) clean PRECHECK=$(PRECHECK) … … 74 82 rm -f $(INITRD).fs $(INITRD).img $(COMPS_H) $(COMPS_C) $(LINK) $(LINK).comp *.co 75 83 rm -f $(USPACE_PATH)/dist/srv/* 84 rm -rf $(USPACE_PATH)/dist/drv/* 76 85 rm -f $(USPACE_PATH)/dist/app/* 77 86 rm -f $(USPACE_PATH)/dist/cfg/net/* -
boot/Makefile.common
r84c20da r1b11576d 49 49 DIST_PATH = $(USPACE_PATH)/dist 50 50 TOOLS_PATH = $(ROOT_PATH)/tools 51 DRVS_PATH = drv 51 52 52 53 SANDBOX = pack … … 106 107 $(USPACE_PATH)/srv/net/net/net \ 107 108 $(USPACE_PATH)/srv/net/netstart/netstart \ 109 $(USPACE_PATH)/srv/devman/devman \ 110 $(USPACE_PATH)/srv/drivers/root/root 111 112 RD_DRVS = \ 113 root 114 115 RD_DRV_CFG = 108 116 109 117 ifneq ($(CONFIG_NETIF_NIL_BUNDLE),y) … … 125 133 $(USPACE_PATH)/app/taskdump/taskdump \ 126 134 $(USPACE_PATH)/app/tester/tester \ 135 $(USPACE_PATH)/app/test_serial/test_serial \ 127 136 $(USPACE_PATH)/app/tetris/tetris \ 128 137 $(USPACE_PATH)/app/trace/trace \ -
boot/arch/amd64/Makefile.inc
r84c20da r1b11576d 37 37 $(USPACE_PATH)/srv/hid/char_mouse/char_ms 38 38 39 RD_DRVS += \ 40 rootia32 \ 41 pciintel \ 42 isa \ 43 ns8250 44 45 RD_DRV_CFG += \ 46 isa/isa.dev 47 39 48 BOOT_OUTPUT = $(ROOT_PATH)/image.iso 40 49 PREBUILD = $(INITRD).img -
kernel/arch/mips32/src/interrupt.c
r84c20da r1b11576d 38 38 #include <arch.h> 39 39 #include <arch/cp0.h> 40 #include <arch/smp/dorder.h> 40 41 #include <time/clock.h> 41 42 #include <ipc/sysipc.h> … … 48 49 function virtual_timer_fnc = NULL; 49 50 static irq_t timer_irq; 51 static irq_t dorder_irq; 50 52 51 53 // TODO: This is SMP unsafe!!! … … 149 151 } 150 152 153 static irq_ownership_t dorder_claim(irq_t *irq) 154 { 155 return IRQ_ACCEPT; 156 } 157 158 static void dorder_irq_handler(irq_t *irq) 159 { 160 dorder_ipi_ack(1 << dorder_cpuid()); 161 } 162 151 163 /* Initialize basic tables for exception dispatching */ 152 164 void interrupt_init(void) … … 163 175 timer_start(); 164 176 cp0_unmask_int(TIMER_IRQ); 177 178 irq_initialize(&dorder_irq); 179 dorder_irq.devno = device_assign_devno(); 180 dorder_irq.inr = DORDER_IRQ; 181 dorder_irq.claim = dorder_claim; 182 dorder_irq.handler = dorder_irq_handler; 183 irq_register(&dorder_irq); 184 185 cp0_unmask_int(DORDER_IRQ); 165 186 } 166 187 -
kernel/arch/mips32/src/smp/dorder.c
r84c20da r1b11576d 33 33 */ 34 34 35 #include <typedefs.h> 35 36 #include <smp/ipi.h> 37 #include <arch/smp/dorder.h> 38 39 #define MSIM_DORDER_ADDRESS 0xB0000004 36 40 37 41 #ifdef CONFIG_SMP 38 42 39 #define MSIM_DORDER_ADDRESS 0xB000000440 41 43 void ipi_broadcast_arch(int ipi) 42 44 { 43 *((volatile u nsigned int *) MSIM_DORDER_ADDRESS) = 0x7FFFFFFF;45 *((volatile uint32_t *) MSIM_DORDER_ADDRESS) = 0x7fffffff; 44 46 } 45 47 46 48 #endif 47 49 50 uint32_t dorder_cpuid(void) 51 { 52 return *((volatile uint32_t *) MSIM_DORDER_ADDRESS); 53 } 54 55 void dorder_ipi_ack(uint32_t mask) 56 { 57 *((volatile uint32_t *) (MSIM_DORDER_ADDRESS + 4)) = mask; 58 } 59 48 60 /** @} 49 61 */ -
kernel/generic/include/ddi/ddi.h
r84c20da r1b11576d 54 54 extern unative_t sys_physmem_map(unative_t, unative_t, unative_t, unative_t); 55 55 extern unative_t sys_iospace_enable(ddi_ioarg_t *); 56 extern unative_t sys_interrupt_enable(int irq, int enable); 56 57 57 58 /* … … 60 61 extern int ddi_iospace_enable_arch(task_t *, uintptr_t, size_t); 61 62 63 62 64 #endif 63 65 -
kernel/generic/include/syscall/syscall.h
r84c20da r1b11576d 80 80 SYS_PHYSMEM_MAP, 81 81 SYS_IOSPACE_ENABLE, 82 SYS_INTERRUPT_ENABLE, 82 83 83 84 SYS_SYSINFO_GET_TAG, -
kernel/generic/src/ddi/ddi.c
r84c20da r1b11576d 258 258 } 259 259 260 /** Disable or enable specified interrupts. 261 * 262 * @param irq the interrupt to be enabled/disabled. 263 * @param enable if true enable the interrupt, disable otherwise. 264 * 265 * @retutn Zero on success, error code otherwise. 266 */ 267 unative_t sys_interrupt_enable(int irq, int enable) 268 { 269 /* FIXME: this needs to be generic code, or better not be in kernel at all. */ 270 #if 0 271 cap_t task_cap = cap_get(TASK); 272 if (!(task_cap & CAP_IRQ_REG)) 273 return EPERM; 274 275 if (irq < 0 || irq > 16) { 276 return EINVAL; 277 } 278 279 uint16_t irq_mask = (uint16_t)(1 << irq); 280 if (enable) { 281 trap_virtual_enable_irqs(irq_mask); 282 } else { 283 trap_virtual_disable_irqs(irq_mask); 284 } 285 286 #endif 287 return 0; 288 } 289 260 290 /** @} 261 291 */ -
kernel/generic/src/syscall/syscall.c
r84c20da r1b11576d 159 159 (syshandler_t) sys_physmem_map, 160 160 (syshandler_t) sys_iospace_enable, 161 (syshandler_t) sys_interrupt_enable, 161 162 162 163 /* Sysinfo syscalls */ -
tools/toolchain.sh
r84c20da r1b11576d 1 #! /bin/bash1 #! /bin/bash 2 2 3 3 # … … 33 33 echo 34 34 echo "Script failed: $2" 35 35 36 exit 1 36 37 fi … … 45 46 echo 46 47 echo "Checksum of ${FILE} does not match." 48 47 49 exit 2 48 50 fi … … 71 73 } 72 74 75 change_title() { 76 echo -en "\e]0;$1\a" 77 } 78 79 show_countdown() { 80 TM="$1" 81 82 if [ "${TM}" -eq 0 ] ; then 83 echo 84 return 0 85 fi 86 87 echo -n "${TM} " 88 change_title "${TM}" 89 sleep 1 90 91 TM="`expr "${TM}" - 1`" 92 show_countdown "${TM}" 93 } 94 95 show_dependencies() { 96 echo "IMPORTANT NOTICE:" 97 echo 98 echo "For a successful compilation and use of the cross-compiler" 99 echo "toolchain you need at least the following dependencies." 100 echo 101 echo "Please make sure that the dependencies are present in your" 102 echo "system. Otherwise the compilation process might fail after" 103 echo "a few seconds or minutes." 104 echo 105 echo " - SED, AWK, Flex, Bison, gzip, bzip2, Bourne Shell" 106 echo " - gettext, zlib, Texinfo, libelf, libgomp" 107 echo " - GNU Multiple Precision Library (GMP)" 108 echo " - GNU Make" 109 echo " - GNU tar" 110 echo " - GNU Coreutils" 111 echo " - GNU Sharutils" 112 echo " - MPFR" 113 echo " - MPC" 114 echo " - Parma Polyhedra Library (PPL)" 115 echo " - ClooG-PPL" 116 echo " - native C compiler, assembler and linker" 117 echo " - native C library with headers" 118 echo 119 120 show_countdown 10 121 } 122 73 123 download_check() { 74 124 SOURCE="$1" … … 77 127 78 128 if [ ! -f "${FILE}" ]; then 129 change_title "Downloading ${FILE}" 79 130 wget -c "${SOURCE}${FILE}" 80 131 check_error $? "Error downloading ${FILE}." … … 88 139 89 140 if [ -d "${DIR}" ]; then 141 change_title "Removing ${DIR}" 90 142 echo " >>> Removing ${DIR}" 91 143 rm -fr "${DIR}" … … 97 149 DESC="$2" 98 150 151 change_title "Creating ${DESC}" 99 152 echo ">>> Creating ${DESC}" 100 153 … … 108 161 DESC="$2" 109 162 110 echo " >>> ${DESC}" 163 change_title "Unpacking ${DESC}" 164 echo " >>> Unpacking ${DESC}" 111 165 112 166 tar -xjf "${FILE}" … … 142 196 143 197 BINUTILS_VERSION="2.20" 144 GCC_VERSION="4.5. 0"198 GCC_VERSION="4.5.1" 145 199 146 200 BINUTILS="binutils-${BINUTILS_VERSION}.tar.bz2" … … 165 219 echo ">>> Downloading tarballs" 166 220 download_check "${BINUTILS_SOURCE}" "${BINUTILS}" "ee2d3e996e9a2d669808713360fa96f8" 167 download_check "${GCC_SOURCE}" "${GCC_CORE}" " 58eda33c3184303628f91c42a7ab15b5"168 download_check "${GCC_SOURCE}" "${GCC_OBJC}" " 8d8c01b6631b020cc6c167860fde2398"169 download_check "${GCC_SOURCE}" "${GCC_CPP}" " 5ab93605af40def4844eda09ca769c2d"221 download_check "${GCC_SOURCE}" "${GCC_CORE}" "dc8959e31b01a65ce10d269614815054" 222 download_check "${GCC_SOURCE}" "${GCC_OBJC}" "3c11b7037896e967eddf8178af2ddd98" 223 download_check "${GCC_SOURCE}" "${GCC_CPP}" "b294953ff0bb2f20c7acb2bf005d832a" 170 224 171 225 echo ">>> Removing previous content" … … 184 238 unpack_tarball "${GCC_CPP}" "C++" 185 239 186 echo ">>> Compiling and installing binutils"240 echo ">>> Processing binutils (${PLATFORM})" 187 241 cd "${BINUTILSDIR}" 188 242 check_error $? "Change directory failed." 189 243 patch_binutils "${PLATFORM}" 190 ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls" 244 245 change_title "binutils: configure (${PLATFORM})" 246 ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --disable-nls 191 247 check_error $? "Error configuring binutils." 248 249 change_title "binutils: make (${PLATFORM})" 192 250 make all install 193 251 check_error $? "Error compiling/installing binutils." 194 252 195 echo ">>> Compiling and installing GCC"253 echo ">>> Processing GCC (${PLATFORM})" 196 254 cd "${OBJDIR}" 197 255 check_error $? "Change directory failed." 256 257 change_title "GCC: configure (${PLATFORM})" 198 258 "${GCCDIR}/configure" "--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 --enable-lto 199 259 check_error $? "Error configuring GCC." 260 261 change_title "GCC: make (${PLATFORM})" 200 262 PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc 201 263 check_error $? "Error compiling/installing GCC." … … 216 278 show_usage 217 279 fi 280 281 show_dependencies 218 282 219 283 case "$1" in -
uspace/Makefile
r84c20da r1b11576d 46 46 app/tasks \ 47 47 app/tester \ 48 app/test_serial \ 48 49 app/tetris \ 49 50 app/trace \ 50 51 app/top \ 52 app/netecho \ 53 app/nettest1 \ 54 app/nettest2 \ 55 app/ping \ 51 56 srv/clip \ 52 57 srv/devmap \ 58 srv/devman \ 53 59 srv/loader \ 54 60 srv/ns \ … … 81 87 srv/net/net \ 82 88 srv/net/netstart \ 83 app/netecho \ 84 app/nettest1 \ 85 app/nettest2 \ 86 app/ping 89 drv/root 87 90 88 91 ## Networking … … 107 110 108 111 ifeq ($(UARCH),amd64) 109 DIRS += srv/hw/bus/pci110 112 endif 111 113 112 114 ifeq ($(UARCH),ia32) 113 DIRS += srv/hw/bus/pci 115 DIRS += drv/rootia32 116 DIRS += drv/pciintel 117 DIRS += drv/isa 118 DIRS += drv/ns8250 114 119 endif 115 120 … … 134 139 lib/softint \ 135 140 lib/softfloat \ 141 lib/drv \ 136 142 lib/packet \ 137 143 lib/net 138 139 ifeq ($(UARCH),amd64)140 LIBS += lib/pci141 endif142 143 ifeq ($(UARCH),ia32)144 LIBS += lib/pci145 endif146 147 144 148 145 LIBC_BUILD = $(addsuffix .build,$(LIBC)) -
uspace/Makefile.common
r84c20da r1b11576d 86 86 LIBCLUI_PREFIX = $(LIB_PREFIX)/clui 87 87 88 LIBPCI_PREFIX = $(LIB_PREFIX)/pci 89 88 LIBDRV_PREFIX = $(LIB_PREFIX)/drv 90 89 LIBPACKET_PREFIX = $(LIB_PREFIX)/packet 91 90 LIBNET_PREFIX = $(LIB_PREFIX)/net -
uspace/app/trace/syscalls.c
r84c20da r1b11576d 73 73 [SYS_PHYSMEM_MAP] = { "physmem_map", 4, V_ERRNO }, 74 74 [SYS_IOSPACE_ENABLE] = { "iospace_enable", 1, V_ERRNO }, 75 [SYS_INTERRUPT_ENABLE] = { "interrupt_enable", 2, V_ERRNO }, 75 76 76 77 [SYS_SYSINFO_GET_TAG] = { "sysinfo_get_tag", 2, V_INTEGER }, -
uspace/lib/c/Makefile
r84c20da r1b11576d 57 57 generic/clipboard.c \ 58 58 generic/devmap.c \ 59 generic/devman.c \ 60 generic/device/hw_res.c \ 61 generic/device/char.c \ 59 62 generic/event.c \ 60 63 generic/errno.c \ -
uspace/lib/c/generic/adt/dynamic_fifo.c
r84c20da r1b11576d 28 28 29 29 /** @addtogroup libc 30 * 30 * @{ 31 31 */ 32 32 … … 34 34 * Dynamic first in first out positive integer queue implementation. 35 35 */ 36 37 #include <adt/dynamic_fifo.h> 36 38 37 39 #include <errno.h> 38 40 #include <malloc.h> 39 41 #include <mem.h> 40 41 #include <adt/dynamic_fifo.h>42 42 43 43 /** Internal magic value for a consistency check. */ … … 106 106 int dyn_fifo_push(dyn_fifo_ref fifo, int value, int max_size) 107 107 { 108 int * 108 int *new_items; 109 109 110 110 if (!dyn_fifo_is_valid(fifo)) … … 149 149 /** Returns and excludes the first item in the queue. 150 150 * 151 * @param[in,out] fifo iThe dynamic queue.151 * @param[in,out] fifo The dynamic queue. 152 152 * @returns Value of the first item in the queue. 153 153 * @returns EINVAL if the queue is not valid. … … 189 189 /** Clears and destroys the queue. 190 190 * 191 * @param[in,out] fifoThe dynamic queue.192 * @returnsEOK on success.193 * @returnsEINVAL if the queue is not valid.191 * @param[in,out] fifo The dynamic queue. 192 * @returns EOK on success. 193 * @returns EINVAL if the queue is not valid. 194 194 */ 195 195 int dyn_fifo_destroy(dyn_fifo_ref fifo) -
uspace/lib/c/generic/ddi.c
r84c20da r1b11576d 96 96 } 97 97 98 /** Enable an interrupt. 99 * 100 * @param irq the interrupt. 101 * 102 * @return Zero on success, negative error code otherwise. 103 */ 104 int interrupt_enable(int irq) 105 { 106 return __SYSCALL2(SYS_INTERRUPT_ENABLE, (sysarg_t) irq, 1); 107 } 108 109 /** Disable an interrupt. 110 * 111 * @param irq the interrupt. 112 * 113 * @return Zero on success, negative error code otherwise. 114 */ 115 int interrupt_disable(int irq) 116 { 117 return __SYSCALL2(SYS_INTERRUPT_ENABLE, (sysarg_t) irq, 0); 118 } 119 98 120 /** Enable PIO for specified I/O range. 99 121 * -
uspace/lib/c/include/ddi.h
r84c20da r1b11576d 42 42 extern int iospace_enable(task_id_t, void *, unsigned long); 43 43 extern int pio_enable(void *, size_t, void **); 44 extern int interrupt_enable(int); 45 extern int interrupt_disable(int); 44 46 45 47 #endif -
uspace/lib/c/include/ipc/services.h
r84c20da r1b11576d 45 45 SERVICE_VFS, 46 46 SERVICE_DEVMAP, 47 SERVICE_DEVMAN, 47 48 SERVICE_FHC, 48 49 SERVICE_OBIO, -
uspace/srv/fs/fat/fat_ops.c
r84c20da r1b11576d 369 369 unsigned blocks; 370 370 fat_dentry_t *d; 371 dev_handle_t dev_handle; 371 372 block_t *b; 372 373 int rc; 373 374 374 375 fibril_mutex_lock(&parentp->idx->lock); 375 bs = block_bb_get(parentp->idx->dev_handle); 376 dev_handle = parentp->idx->dev_handle; 377 fibril_mutex_unlock(&parentp->idx->lock); 378 379 bs = block_bb_get(dev_handle); 376 380 blocks = parentp->size / BPS(bs); 377 381 for (i = 0; i < blocks; i++) { 378 382 rc = fat_block_get(&b, bs, parentp, i, BLOCK_FLAGS_NONE); 379 if (rc != EOK) { 380 fibril_mutex_unlock(&parentp->idx->lock); 383 if (rc != EOK) 381 384 return rc; 382 }383 385 for (j = 0; j < DPS(bs); j++) { 384 386 d = ((fat_dentry_t *)b->data) + j; … … 390 392 /* miss */ 391 393 rc = block_put(b); 392 fibril_mutex_unlock(&parentp->idx->lock);393 394 *rfn = NULL; 394 395 return rc; … … 401 402 /* hit */ 402 403 fat_node_t *nodep; 403 /* 404 * Assume tree hierarchy for locking. We 405 * already have the parent and now we are going 406 * to lock the child. Never lock in the oposite 407 * order. 408 */ 409 fat_idx_t *idx = fat_idx_get_by_pos( 410 parentp->idx->dev_handle, parentp->firstc, 411 i * DPS(bs) + j); 412 fibril_mutex_unlock(&parentp->idx->lock); 404 fat_idx_t *idx = fat_idx_get_by_pos(dev_handle, 405 parentp->firstc, i * DPS(bs) + j); 413 406 if (!idx) { 414 407 /* … … 433 426 } 434 427 rc = block_put(b); 435 if (rc != EOK) { 436 fibril_mutex_unlock(&parentp->idx->lock); 428 if (rc != EOK) 437 429 return rc; 438 } 439 } 440 441 fibril_mutex_unlock(&parentp->idx->lock); 430 } 431 442 432 *rfn = NULL; 443 433 return EOK; -
uspace/srv/net/tl/tcp/tcp.c
r84c20da r1b11576d 2033 2033 if (!fibril) { 2034 2034 free(operation_timeout); 2035 return EPARTY; 2035 return EPARTY; /* FIXME: use another EC */ 2036 2036 } 2037 2037 // fibril_mutex_lock(&socket_data->operation.mutex); -
uspace/srv/vfs/vfs_ops.c
r84c20da r1b11576d 1355 1355 int ret = vfs_close_internal(newfile); 1356 1356 if (ret != EOK) { 1357 fibril_mutex_unlock(&oldfile->lock); 1357 1358 ipc_answer_0(rid, ret); 1358 1359 return; … … 1361 1362 ret = vfs_fd_free(newfd); 1362 1363 if (ret != EOK) { 1364 fibril_mutex_unlock(&oldfile->lock); 1363 1365 ipc_answer_0(rid, ret); 1364 1366 return;
Note:
See TracChangeset
for help on using the changeset viewer.