Changes in / [1b11576d:84c20da] in mainline
- Files:
-
- 18 added
- 51 deleted
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
r1b11576d r84c20da 61 61 cp "$$file" "$(DIST_PATH)/cfg/net/" ; \ 62 62 done 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 63 72 64 clean: clean_dist 73 65 $(MAKE) -f $(BUILD) clean PRECHECK=$(PRECHECK) … … 82 74 rm -f $(INITRD).fs $(INITRD).img $(COMPS_H) $(COMPS_C) $(LINK) $(LINK).comp *.co 83 75 rm -f $(USPACE_PATH)/dist/srv/* 84 rm -rf $(USPACE_PATH)/dist/drv/*85 76 rm -f $(USPACE_PATH)/dist/app/* 86 77 rm -f $(USPACE_PATH)/dist/cfg/net/* -
boot/Makefile.common
r1b11576d r84c20da 49 49 DIST_PATH = $(USPACE_PATH)/dist 50 50 TOOLS_PATH = $(ROOT_PATH)/tools 51 DRVS_PATH = drv52 51 53 52 SANDBOX = pack … … 107 106 $(USPACE_PATH)/srv/net/net/net \ 108 107 $(USPACE_PATH)/srv/net/netstart/netstart \ 109 $(USPACE_PATH)/srv/devman/devman \110 $(USPACE_PATH)/srv/drivers/root/root111 112 RD_DRVS = \113 root114 115 RD_DRV_CFG =116 108 117 109 ifneq ($(CONFIG_NETIF_NIL_BUNDLE),y) … … 133 125 $(USPACE_PATH)/app/taskdump/taskdump \ 134 126 $(USPACE_PATH)/app/tester/tester \ 135 $(USPACE_PATH)/app/test_serial/test_serial \136 127 $(USPACE_PATH)/app/tetris/tetris \ 137 128 $(USPACE_PATH)/app/trace/trace \ -
boot/arch/amd64/Makefile.inc
r1b11576d r84c20da 37 37 $(USPACE_PATH)/srv/hid/char_mouse/char_ms 38 38 39 RD_DRVS += \40 rootia32 \41 pciintel \42 isa \43 ns825044 45 RD_DRV_CFG += \46 isa/isa.dev47 48 39 BOOT_OUTPUT = $(ROOT_PATH)/image.iso 49 40 PREBUILD = $(INITRD).img -
kernel/arch/mips32/src/interrupt.c
r1b11576d r84c20da 38 38 #include <arch.h> 39 39 #include <arch/cp0.h> 40 #include <arch/smp/dorder.h>41 40 #include <time/clock.h> 42 41 #include <ipc/sysipc.h> … … 49 48 function virtual_timer_fnc = NULL; 50 49 static irq_t timer_irq; 51 static irq_t dorder_irq;52 50 53 51 // TODO: This is SMP unsafe!!! … … 151 149 } 152 150 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 163 151 /* Initialize basic tables for exception dispatching */ 164 152 void interrupt_init(void) … … 175 163 timer_start(); 176 164 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);186 165 } 187 166 -
kernel/arch/mips32/src/smp/dorder.c
r1b11576d r84c20da 33 33 */ 34 34 35 #include <typedefs.h>36 35 #include <smp/ipi.h> 37 #include <arch/smp/dorder.h> 36 37 #ifdef CONFIG_SMP 38 38 39 39 #define MSIM_DORDER_ADDRESS 0xB0000004 40 40 41 #ifdef CONFIG_SMP42 43 41 void ipi_broadcast_arch(int ipi) 44 42 { 45 *((volatile u int32_t *) MSIM_DORDER_ADDRESS) = 0x7fffffff;43 *((volatile unsigned int *) MSIM_DORDER_ADDRESS) = 0x7FFFFFFF; 46 44 } 47 45 48 46 #endif 49 47 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 60 48 /** @} 61 49 */ -
kernel/generic/include/ddi/ddi.h
r1b11576d r84c20da 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);57 56 58 57 /* … … 61 60 extern int ddi_iospace_enable_arch(task_t *, uintptr_t, size_t); 62 61 63 64 62 #endif 65 63 -
kernel/generic/include/syscall/syscall.h
r1b11576d r84c20da 80 80 SYS_PHYSMEM_MAP, 81 81 SYS_IOSPACE_ENABLE, 82 SYS_INTERRUPT_ENABLE,83 82 84 83 SYS_SYSINFO_GET_TAG, -
kernel/generic/src/ddi/ddi.c
r1b11576d r84c20da 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 0271 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 #endif287 return 0;288 }289 290 260 /** @} 291 261 */ -
kernel/generic/src/syscall/syscall.c
r1b11576d r84c20da 159 159 (syshandler_t) sys_physmem_map, 160 160 (syshandler_t) sys_iospace_enable, 161 (syshandler_t) sys_interrupt_enable,162 161 163 162 /* Sysinfo syscalls */ -
tools/toolchain.sh
r1b11576d r84c20da 1 #! 1 #!/bin/bash 2 2 3 3 # … … 33 33 echo 34 34 echo "Script failed: $2" 35 36 35 exit 1 37 36 fi … … 46 45 echo 47 46 echo "Checksum of ${FILE} does not match." 48 49 47 exit 2 50 48 fi … … 73 71 } 74 72 75 change_title() {76 echo -en "\e]0;$1\a"77 }78 79 show_countdown() {80 TM="$1"81 82 if [ "${TM}" -eq 0 ] ; then83 echo84 return 085 fi86 87 echo -n "${TM} "88 change_title "${TM}"89 sleep 190 91 TM="`expr "${TM}" - 1`"92 show_countdown "${TM}"93 }94 95 show_dependencies() {96 echo "IMPORTANT NOTICE:"97 echo98 echo "For a successful compilation and use of the cross-compiler"99 echo "toolchain you need at least the following dependencies."100 echo101 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 echo105 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 echo119 120 show_countdown 10121 }122 123 73 download_check() { 124 74 SOURCE="$1" … … 127 77 128 78 if [ ! -f "${FILE}" ]; then 129 change_title "Downloading ${FILE}"130 79 wget -c "${SOURCE}${FILE}" 131 80 check_error $? "Error downloading ${FILE}." … … 139 88 140 89 if [ -d "${DIR}" ]; then 141 change_title "Removing ${DIR}"142 90 echo " >>> Removing ${DIR}" 143 91 rm -fr "${DIR}" … … 149 97 DESC="$2" 150 98 151 change_title "Creating ${DESC}"152 99 echo ">>> Creating ${DESC}" 153 100 … … 161 108 DESC="$2" 162 109 163 change_title "Unpacking ${DESC}" 164 echo " >>> Unpacking ${DESC}" 110 echo " >>> ${DESC}" 165 111 166 112 tar -xjf "${FILE}" … … 196 142 197 143 BINUTILS_VERSION="2.20" 198 GCC_VERSION="4.5. 1"144 GCC_VERSION="4.5.0" 199 145 200 146 BINUTILS="binutils-${BINUTILS_VERSION}.tar.bz2" … … 219 165 echo ">>> Downloading tarballs" 220 166 download_check "${BINUTILS_SOURCE}" "${BINUTILS}" "ee2d3e996e9a2d669808713360fa96f8" 221 download_check "${GCC_SOURCE}" "${GCC_CORE}" " dc8959e31b01a65ce10d269614815054"222 download_check "${GCC_SOURCE}" "${GCC_OBJC}" " 3c11b7037896e967eddf8178af2ddd98"223 download_check "${GCC_SOURCE}" "${GCC_CPP}" " b294953ff0bb2f20c7acb2bf005d832a"167 download_check "${GCC_SOURCE}" "${GCC_CORE}" "58eda33c3184303628f91c42a7ab15b5" 168 download_check "${GCC_SOURCE}" "${GCC_OBJC}" "8d8c01b6631b020cc6c167860fde2398" 169 download_check "${GCC_SOURCE}" "${GCC_CPP}" "5ab93605af40def4844eda09ca769c2d" 224 170 225 171 echo ">>> Removing previous content" … … 238 184 unpack_tarball "${GCC_CPP}" "C++" 239 185 240 echo ">>> Processing binutils (${PLATFORM})"186 echo ">>> Compiling and installing binutils" 241 187 cd "${BINUTILSDIR}" 242 188 check_error $? "Change directory failed." 243 189 patch_binutils "${PLATFORM}" 244 245 change_title "binutils: configure (${PLATFORM})" 246 ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --disable-nls 190 ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls" 247 191 check_error $? "Error configuring binutils." 248 249 change_title "binutils: make (${PLATFORM})"250 192 make all install 251 193 check_error $? "Error compiling/installing binutils." 252 194 253 echo ">>> Processing GCC (${PLATFORM})"195 echo ">>> Compiling and installing GCC" 254 196 cd "${OBJDIR}" 255 197 check_error $? "Change directory failed." 256 257 change_title "GCC: configure (${PLATFORM})"258 198 "${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 259 199 check_error $? "Error configuring GCC." 260 261 change_title "GCC: make (${PLATFORM})"262 200 PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc 263 201 check_error $? "Error compiling/installing GCC." … … 278 216 show_usage 279 217 fi 280 281 show_dependencies282 218 283 219 case "$1" in -
uspace/Makefile
r1b11576d r84c20da 46 46 app/tasks \ 47 47 app/tester \ 48 app/test_serial \49 48 app/tetris \ 50 49 app/trace \ 51 50 app/top \ 52 app/netecho \53 app/nettest1 \54 app/nettest2 \55 app/ping \56 51 srv/clip \ 57 52 srv/devmap \ 58 srv/devman \59 53 srv/loader \ 60 54 srv/ns \ … … 87 81 srv/net/net \ 88 82 srv/net/netstart \ 89 drv/root 83 app/netecho \ 84 app/nettest1 \ 85 app/nettest2 \ 86 app/ping 90 87 91 88 ## Networking … … 110 107 111 108 ifeq ($(UARCH),amd64) 109 DIRS += srv/hw/bus/pci 112 110 endif 113 111 114 112 ifeq ($(UARCH),ia32) 115 DIRS += drv/rootia32 116 DIRS += drv/pciintel 117 DIRS += drv/isa 118 DIRS += drv/ns8250 113 DIRS += srv/hw/bus/pci 119 114 endif 120 115 … … 139 134 lib/softint \ 140 135 lib/softfloat \ 141 lib/drv \142 136 lib/packet \ 143 137 lib/net 138 139 ifeq ($(UARCH),amd64) 140 LIBS += lib/pci 141 endif 142 143 ifeq ($(UARCH),ia32) 144 LIBS += lib/pci 145 endif 146 144 147 145 148 LIBC_BUILD = $(addsuffix .build,$(LIBC)) -
uspace/Makefile.common
r1b11576d r84c20da 86 86 LIBCLUI_PREFIX = $(LIB_PREFIX)/clui 87 87 88 LIBDRV_PREFIX = $(LIB_PREFIX)/drv 88 LIBPCI_PREFIX = $(LIB_PREFIX)/pci 89 89 90 LIBPACKET_PREFIX = $(LIB_PREFIX)/packet 90 91 LIBNET_PREFIX = $(LIB_PREFIX)/net -
uspace/app/trace/syscalls.c
r1b11576d r84c20da 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 },76 75 77 76 [SYS_SYSINFO_GET_TAG] = { "sysinfo_get_tag", 2, V_INTEGER }, -
uspace/lib/c/Makefile
r1b11576d r84c20da 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 \62 59 generic/event.c \ 63 60 generic/errno.c \ -
uspace/lib/c/generic/adt/dynamic_fifo.c
r1b11576d r84c20da 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>38 36 39 37 #include <errno.h> 40 38 #include <malloc.h> 41 39 #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 * new_items;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 The dynamic queue.151 * @param[in,out] fifoi 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
r1b11576d r84c20da 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 120 98 /** Enable PIO for specified I/O range. 121 99 * -
uspace/lib/c/include/ddi.h
r1b11576d r84c20da 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);46 44 47 45 #endif -
uspace/lib/c/include/ipc/services.h
r1b11576d r84c20da 45 45 SERVICE_VFS, 46 46 SERVICE_DEVMAP, 47 SERVICE_DEVMAN,48 47 SERVICE_FHC, 49 48 SERVICE_OBIO, -
uspace/srv/fs/fat/fat_ops.c
r1b11576d r84c20da 369 369 unsigned blocks; 370 370 fat_dentry_t *d; 371 dev_handle_t dev_handle;372 371 block_t *b; 373 372 int rc; 374 373 375 374 fibril_mutex_lock(&parentp->idx->lock); 376 dev_handle = parentp->idx->dev_handle; 377 fibril_mutex_unlock(&parentp->idx->lock); 378 379 bs = block_bb_get(dev_handle); 375 bs = block_bb_get(parentp->idx->dev_handle); 380 376 blocks = parentp->size / BPS(bs); 381 377 for (i = 0; i < blocks; i++) { 382 378 rc = fat_block_get(&b, bs, parentp, i, BLOCK_FLAGS_NONE); 383 if (rc != EOK) 379 if (rc != EOK) { 380 fibril_mutex_unlock(&parentp->idx->lock); 384 381 return rc; 382 } 385 383 for (j = 0; j < DPS(bs); j++) { 386 384 d = ((fat_dentry_t *)b->data) + j; … … 392 390 /* miss */ 393 391 rc = block_put(b); 392 fibril_mutex_unlock(&parentp->idx->lock); 394 393 *rfn = NULL; 395 394 return rc; … … 402 401 /* hit */ 403 402 fat_node_t *nodep; 404 fat_idx_t *idx = fat_idx_get_by_pos(dev_handle, 405 parentp->firstc, i * DPS(bs) + j); 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); 406 413 if (!idx) { 407 414 /* … … 426 433 } 427 434 rc = block_put(b); 428 if (rc != EOK) 435 if (rc != EOK) { 436 fibril_mutex_unlock(&parentp->idx->lock); 429 437 return rc; 430 } 431 438 } 439 } 440 441 fibril_mutex_unlock(&parentp->idx->lock); 432 442 *rfn = NULL; 433 443 return EOK; -
uspace/srv/net/tl/tcp/tcp.c
r1b11576d r84c20da 2033 2033 if (!fibril) { 2034 2034 free(operation_timeout); 2035 return EPARTY; /* FIXME: use another EC */2035 return EPARTY; 2036 2036 } 2037 2037 // fibril_mutex_lock(&socket_data->operation.mutex); -
uspace/srv/vfs/vfs_ops.c
r1b11576d r84c20da 1355 1355 int ret = vfs_close_internal(newfile); 1356 1356 if (ret != EOK) { 1357 fibril_mutex_unlock(&oldfile->lock);1358 1357 ipc_answer_0(rid, ret); 1359 1358 return; … … 1362 1361 ret = vfs_fd_free(newfd); 1363 1362 if (ret != EOK) { 1364 fibril_mutex_unlock(&oldfile->lock);1365 1363 ipc_answer_0(rid, ret); 1366 1364 return;
Note:
See TracChangeset
for help on using the changeset viewer.