Changes in / [1b11576d:84c20da] in mainline


Ignore:
Files:
18 added
51 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile

    r1b11576d r84c20da  
    6161                cp "$$file" "$(DIST_PATH)/cfg/net/" ; \
    6262        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
    7264clean: clean_dist
    7365        $(MAKE) -f $(BUILD) clean PRECHECK=$(PRECHECK)
     
    8274        rm -f $(INITRD).fs $(INITRD).img $(COMPS_H) $(COMPS_C) $(LINK) $(LINK).comp *.co
    8375        rm -f $(USPACE_PATH)/dist/srv/*
    84         rm -rf $(USPACE_PATH)/dist/drv/*
    8576        rm -f $(USPACE_PATH)/dist/app/*
    8677        rm -f $(USPACE_PATH)/dist/cfg/net/*
  • boot/Makefile.common

    r1b11576d r84c20da  
    4949DIST_PATH = $(USPACE_PATH)/dist
    5050TOOLS_PATH = $(ROOT_PATH)/tools
    51 DRVS_PATH = drv
    5251
    5352SANDBOX = pack
     
    107106        $(USPACE_PATH)/srv/net/net/net \
    108107        $(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 =
    116108
    117109ifneq ($(CONFIG_NETIF_NIL_BUNDLE),y)
     
    133125        $(USPACE_PATH)/app/taskdump/taskdump \
    134126        $(USPACE_PATH)/app/tester/tester \
    135         $(USPACE_PATH)/app/test_serial/test_serial \
    136127        $(USPACE_PATH)/app/tetris/tetris \
    137128        $(USPACE_PATH)/app/trace/trace \
  • boot/arch/amd64/Makefile.inc

    r1b11576d r84c20da  
    3737        $(USPACE_PATH)/srv/hid/char_mouse/char_ms
    3838
    39 RD_DRVS += \
    40         rootia32 \
    41         pciintel \
    42         isa \
    43         ns8250
    44        
    45 RD_DRV_CFG += \
    46         isa/isa.dev
    47 
    4839BOOT_OUTPUT = $(ROOT_PATH)/image.iso
    4940PREBUILD = $(INITRD).img
  • kernel/arch/mips32/src/interrupt.c

    r1b11576d r84c20da  
    3838#include <arch.h>
    3939#include <arch/cp0.h>
    40 #include <arch/smp/dorder.h>
    4140#include <time/clock.h>
    4241#include <ipc/sysipc.h>
     
    4948function virtual_timer_fnc = NULL;
    5049static irq_t timer_irq;
    51 static irq_t dorder_irq;
    5250
    5351// TODO: This is SMP unsafe!!!
     
    151149}
    152150
    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 
    163151/* Initialize basic tables for exception dispatching */
    164152void interrupt_init(void)
     
    175163        timer_start();
    176164        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);
    186165}
    187166
  • kernel/arch/mips32/src/smp/dorder.c

    r1b11576d r84c20da  
    3333 */
    3434
    35 #include <typedefs.h>
    3635#include <smp/ipi.h>
    37 #include <arch/smp/dorder.h>
     36
     37#ifdef CONFIG_SMP
    3838
    3939#define MSIM_DORDER_ADDRESS  0xB0000004
    4040
    41 #ifdef CONFIG_SMP
    42 
    4341void ipi_broadcast_arch(int ipi)
    4442{
    45         *((volatile uint32_t *) MSIM_DORDER_ADDRESS) = 0x7fffffff;
     43        *((volatile unsigned int *) MSIM_DORDER_ADDRESS) = 0x7FFFFFFF;
    4644}
    4745
    4846#endif
    4947
    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 
    6048/** @}
    6149 */
  • kernel/generic/include/ddi/ddi.h

    r1b11576d r84c20da  
    5454extern unative_t sys_physmem_map(unative_t, unative_t, unative_t, unative_t);
    5555extern unative_t sys_iospace_enable(ddi_ioarg_t *);
    56 extern unative_t sys_interrupt_enable(int irq, int enable);
    5756
    5857/*
     
    6160extern int ddi_iospace_enable_arch(task_t *, uintptr_t, size_t);
    6261
    63 
    6462#endif
    6563
  • kernel/generic/include/syscall/syscall.h

    r1b11576d r84c20da  
    8080        SYS_PHYSMEM_MAP,
    8181        SYS_IOSPACE_ENABLE,
    82         SYS_INTERRUPT_ENABLE,
    8382       
    8483        SYS_SYSINFO_GET_TAG,
  • kernel/generic/src/ddi/ddi.c

    r1b11576d r84c20da  
    258258}
    259259
    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 
    290260/** @}
    291261 */
  • kernel/generic/src/syscall/syscall.c

    r1b11576d r84c20da  
    159159        (syshandler_t) sys_physmem_map,
    160160        (syshandler_t) sys_iospace_enable,
    161         (syshandler_t) sys_interrupt_enable,
    162161       
    163162        /* Sysinfo syscalls */
  • tools/toolchain.sh

    r1b11576d r84c20da  
    1 #! /bin/bash
     1#!/bin/bash
    22
    33#
     
    3333                echo
    3434                echo "Script failed: $2"
    35                
    3635                exit 1
    3736        fi
     
    4645                echo
    4746                echo "Checksum of ${FILE} does not match."
    48                
    4947                exit 2
    5048        fi
     
    7371}
    7472
    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 
    12373download_check() {
    12474        SOURCE="$1"
     
    12777       
    12878        if [ ! -f "${FILE}" ]; then
    129                 change_title "Downloading ${FILE}"
    13079                wget -c "${SOURCE}${FILE}"
    13180                check_error $? "Error downloading ${FILE}."
     
    13988       
    14089        if [ -d "${DIR}" ]; then
    141                 change_title "Removing ${DIR}"
    14290                echo " >>> Removing ${DIR}"
    14391                rm -fr "${DIR}"
     
    14997        DESC="$2"
    15098       
    151         change_title "Creating ${DESC}"
    15299        echo ">>> Creating ${DESC}"
    153100       
     
    161108        DESC="$2"
    162109       
    163         change_title "Unpacking ${DESC}"
    164         echo " >>> Unpacking ${DESC}"
     110        echo " >>> ${DESC}"
    165111       
    166112        tar -xjf "${FILE}"
     
    196142       
    197143        BINUTILS_VERSION="2.20"
    198         GCC_VERSION="4.5.1"
     144        GCC_VERSION="4.5.0"
    199145       
    200146        BINUTILS="binutils-${BINUTILS_VERSION}.tar.bz2"
     
    219165        echo ">>> Downloading tarballs"
    220166        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"
    224170       
    225171        echo ">>> Removing previous content"
     
    238184        unpack_tarball "${GCC_CPP}" "C++"
    239185       
    240         echo ">>> Processing binutils (${PLATFORM})"
     186        echo ">>> Compiling and installing binutils"
    241187        cd "${BINUTILSDIR}"
    242188        check_error $? "Change directory failed."
    243189        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"
    247191        check_error $? "Error configuring binutils."
    248        
    249         change_title "binutils: make (${PLATFORM})"
    250192        make all install
    251193        check_error $? "Error compiling/installing binutils."
    252194       
    253         echo ">>> Processing GCC (${PLATFORM})"
     195        echo ">>> Compiling and installing GCC"
    254196        cd "${OBJDIR}"
    255197        check_error $? "Change directory failed."
    256        
    257         change_title "GCC: configure (${PLATFORM})"
    258198        "${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
    259199        check_error $? "Error configuring GCC."
    260        
    261         change_title "GCC: make (${PLATFORM})"
    262200        PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc
    263201        check_error $? "Error compiling/installing GCC."
     
    278216        show_usage
    279217fi
    280 
    281 show_dependencies
    282218
    283219case "$1" in
  • uspace/Makefile

    r1b11576d r84c20da  
    4646        app/tasks \
    4747        app/tester \
    48         app/test_serial \
    4948        app/tetris \
    5049        app/trace \
    5150        app/top \
    52         app/netecho \
    53         app/nettest1 \
    54         app/nettest2 \
    55         app/ping \
    5651        srv/clip \
    5752        srv/devmap \
    58         srv/devman \
    5953        srv/loader \
    6054        srv/ns \
     
    8781        srv/net/net \
    8882        srv/net/netstart \
    89         drv/root
     83        app/netecho \
     84        app/nettest1 \
     85        app/nettest2 \
     86        app/ping
    9087
    9188## Networking
     
    110107
    111108ifeq ($(UARCH),amd64)
     109        DIRS += srv/hw/bus/pci
    112110endif
    113111
    114112ifeq ($(UARCH),ia32)
    115         DIRS += drv/rootia32
    116         DIRS += drv/pciintel
    117         DIRS += drv/isa
    118         DIRS += drv/ns8250
     113        DIRS += srv/hw/bus/pci
    119114endif
    120115
     
    139134        lib/softint \
    140135        lib/softfloat \
    141         lib/drv \
    142136        lib/packet \
    143137        lib/net
     138
     139ifeq ($(UARCH),amd64)
     140        LIBS += lib/pci
     141endif
     142
     143ifeq ($(UARCH),ia32)
     144        LIBS += lib/pci
     145endif
     146
    144147
    145148LIBC_BUILD = $(addsuffix .build,$(LIBC))
  • uspace/Makefile.common

    r1b11576d r84c20da  
    8686LIBCLUI_PREFIX = $(LIB_PREFIX)/clui
    8787
    88 LIBDRV_PREFIX = $(LIB_PREFIX)/drv
     88LIBPCI_PREFIX = $(LIB_PREFIX)/pci
     89
    8990LIBPACKET_PREFIX = $(LIB_PREFIX)/packet
    9091LIBNET_PREFIX = $(LIB_PREFIX)/net
  • uspace/app/trace/syscalls.c

    r1b11576d r84c20da  
    7373    [SYS_PHYSMEM_MAP] = { "physmem_map",                4,      V_ERRNO },
    7474    [SYS_IOSPACE_ENABLE] = { "iospace_enable",          1,      V_ERRNO },
    75     [SYS_INTERRUPT_ENABLE] = { "interrupt_enable",      2,      V_ERRNO },
    7675
    7776    [SYS_SYSINFO_GET_TAG] = { "sysinfo_get_tag",                2,      V_INTEGER },
  • uspace/lib/c/Makefile

    r1b11576d r84c20da  
    5757        generic/clipboard.c \
    5858        generic/devmap.c \
    59         generic/devman.c \
    60         generic/device/hw_res.c \
    61         generic/device/char.c \
    6259        generic/event.c \
    6360        generic/errno.c \
  • uspace/lib/c/generic/adt/dynamic_fifo.c

    r1b11576d r84c20da  
    2828
    2929/** @addtogroup libc
    30  * @{
     30 *  @{
    3131 */
    3232
     
    3434 * Dynamic first in first out positive integer queue implementation.
    3535 */
    36 
    37 #include <adt/dynamic_fifo.h>
    3836
    3937#include <errno.h>
    4038#include <malloc.h>
    4139#include <mem.h>
     40
     41#include <adt/dynamic_fifo.h>
    4242
    4343/** Internal magic value for a consistency check. */
     
    106106int dyn_fifo_push(dyn_fifo_ref fifo, int value, int max_size)
    107107{
    108         int *new_items;
     108        int * new_items;
    109109
    110110        if (!dyn_fifo_is_valid(fifo))
     
    149149/** Returns and excludes the first item in the queue.
    150150 *
    151  * @param[in,out] fifo  The dynamic queue.
     151 * @param[in,out] fifoi The dynamic queue.
    152152 * @returns             Value of the first item in the queue.
    153153 * @returns             EINVAL if the queue is not valid.
     
    189189/** Clears and destroys the queue.
    190190 *
    191  * @param[in,out] fifo  The dynamic queue.
    192  * @returns             EOK on success.
    193  * @returns             EINVAL 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.
    194194 */
    195195int dyn_fifo_destroy(dyn_fifo_ref fifo)
  • uspace/lib/c/generic/ddi.c

    r1b11576d r84c20da  
    9696}
    9797
    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 
    12098/** Enable PIO for specified I/O range.
    12199 *
  • uspace/lib/c/include/ddi.h

    r1b11576d r84c20da  
    4242extern int iospace_enable(task_id_t, void *, unsigned long);
    4343extern int pio_enable(void *, size_t, void **);
    44 extern int interrupt_enable(int);
    45 extern int interrupt_disable(int);
    4644
    4745#endif
  • uspace/lib/c/include/ipc/services.h

    r1b11576d r84c20da  
    4545        SERVICE_VFS,
    4646        SERVICE_DEVMAP,
    47         SERVICE_DEVMAN,
    4847        SERVICE_FHC,
    4948        SERVICE_OBIO,
  • uspace/srv/fs/fat/fat_ops.c

    r1b11576d r84c20da  
    369369        unsigned blocks;
    370370        fat_dentry_t *d;
    371         dev_handle_t dev_handle;
    372371        block_t *b;
    373372        int rc;
    374373
    375374        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);
    380376        blocks = parentp->size / BPS(bs);
    381377        for (i = 0; i < blocks; i++) {
    382378                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);
    384381                        return rc;
     382                }
    385383                for (j = 0; j < DPS(bs); j++) {
    386384                        d = ((fat_dentry_t *)b->data) + j;
     
    392390                                /* miss */
    393391                                rc = block_put(b);
     392                                fibril_mutex_unlock(&parentp->idx->lock);
    394393                                *rfn = NULL;
    395394                                return rc;
     
    402401                                /* hit */
    403402                                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);
    406413                                if (!idx) {
    407414                                        /*
     
    426433                }
    427434                rc = block_put(b);
    428                 if (rc != EOK)
     435                if (rc != EOK) {
     436                        fibril_mutex_unlock(&parentp->idx->lock);
    429437                        return rc;
    430         }
    431 
     438                }
     439        }
     440
     441        fibril_mutex_unlock(&parentp->idx->lock);
    432442        *rfn = NULL;
    433443        return EOK;
  • uspace/srv/net/tl/tcp/tcp.c

    r1b11576d r84c20da  
    20332033        if (!fibril) {
    20342034                free(operation_timeout);
    2035                 return EPARTY;  /* FIXME: use another EC */
     2035                return EPARTY;
    20362036        }
    20372037//      fibril_mutex_lock(&socket_data->operation.mutex);
  • uspace/srv/vfs/vfs_ops.c

    r1b11576d r84c20da  
    13551355                int ret = vfs_close_internal(newfile);
    13561356                if (ret != EOK) {
    1357                         fibril_mutex_unlock(&oldfile->lock);
    13581357                        ipc_answer_0(rid, ret);
    13591358                        return;
     
    13621361                ret = vfs_fd_free(newfd);
    13631362                if (ret != EOK) {
    1364                         fibril_mutex_unlock(&oldfile->lock);
    13651363                        ipc_answer_0(rid, ret);
    13661364                        return;
Note: See TracChangeset for help on using the changeset viewer.