Changeset 04cb68f2 in mainline


Ignore:
Timestamp:
2010-10-20T19:30:54Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
78a9e5ef
Parents:
e0e568ff (diff), a6e54c5d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~helenos-dd/helenos/dd.

Files:
86 added
15 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile

    re0e568ff r04cb68f2  
    6161                cp "$$file" "$(DIST_PATH)/cfg/net/" ; \
    6262        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       
    6472clean: clean_dist
    6573        $(MAKE) -f $(BUILD) clean PRECHECK=$(PRECHECK)
  • boot/Makefile.common

    re0e568ff r04cb68f2  
    4949DIST_PATH = $(USPACE_PATH)/dist
    5050TOOLS_PATH = $(ROOT_PATH)/tools
     51DRVS_PATH = srv/drivers
    5152
    5253SANDBOX = pack
     
    106107        $(USPACE_PATH)/srv/net/net/net \
    107108        $(USPACE_PATH)/srv/net/netstart/netstart \
     109        $(USPACE_PATH)/srv/devman/devman \
     110        $(USPACE_PATH)/srv/drivers/root/root
     111       
     112RD_DRVS = \
     113        root
     114
     115RD_DRV_CFG =
    108116
    109117ifneq ($(CONFIG_NETIF_NIL_BUNDLE),y)
     
    125133        $(USPACE_PATH)/app/taskdump/taskdump \
    126134        $(USPACE_PATH)/app/tester/tester \
     135        $(USPACE_PATH)/app/test_serial/test_serial \
    127136        $(USPACE_PATH)/app/tetris/tetris \
    128137        $(USPACE_PATH)/app/trace/trace \
  • boot/arch/amd64/Makefile.inc

    re0e568ff r04cb68f2  
    3737        $(USPACE_PATH)/srv/hid/char_mouse/char_ms
    3838
     39RD_DRVS += \
     40        rootia32 \
     41        pciintel \
     42        isa \
     43        ns8250
     44       
     45RD_DRV_CFG += \
     46        isa/isa.dev
     47
    3948BOOT_OUTPUT = $(ROOT_PATH)/image.iso
    4049PREBUILD = $(INITRD).img
  • kernel/generic/include/ddi/ddi.h

    re0e568ff r04cb68f2  
    5454extern unative_t sys_physmem_map(unative_t, unative_t, unative_t, unative_t);
    5555extern unative_t sys_iospace_enable(ddi_ioarg_t *);
     56extern unative_t sys_interrupt_enable(int irq, int enable);
    5657
    5758/*
     
    6061extern int ddi_iospace_enable_arch(task_t *, uintptr_t, size_t);
    6162
     63
    6264#endif
    6365
  • kernel/generic/include/syscall/syscall.h

    re0e568ff r04cb68f2  
    8080        SYS_PHYSMEM_MAP,
    8181        SYS_IOSPACE_ENABLE,
     82        SYS_INTERRUPT_ENABLE,
    8283       
    8384        SYS_SYSINFO_GET_TAG,
  • kernel/generic/src/ddi/ddi.c

    re0e568ff r04cb68f2  
    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 */
     267unative_t sys_interrupt_enable(int irq, int enable)
     268{       
     269        cap_t task_cap = cap_get(TASK);
     270        if (!(task_cap & CAP_IRQ_REG))
     271                return EPERM;
     272               
     273        if (irq < 0 || irq > 16) {
     274                return EINVAL;
     275        }
     276       
     277        uint16_t irq_mask = (uint16_t)(1 << irq);
     278        if (enable) {
     279                trap_virtual_enable_irqs(irq_mask);
     280        } else {
     281                trap_virtual_disable_irqs(irq_mask);
     282        }
     283       
     284        return 0;       
     285}
     286
    260287/** @}
    261288 */
  • kernel/generic/src/syscall/syscall.c

    re0e568ff r04cb68f2  
    159159        (syshandler_t) sys_physmem_map,
    160160        (syshandler_t) sys_iospace_enable,
     161        (syshandler_t) sys_interrupt_enable,
    161162       
    162163        /* Sysinfo syscalls */
  • uspace/Makefile

    re0e568ff r04cb68f2  
    4343        app/sbi \
    4444        app/stats \
     45        app/shutters \
    4546        app/taskdump \
    4647        app/tasks \
    4748        app/tester \
     49        app/test_serial \
    4850        app/tetris \
    4951        app/trace \
     
    5153        srv/clip \
    5254        srv/devmap \
     55        srv/devman \
     56        srv/drivers/root \
    5357        srv/loader \
    5458        srv/ns \
     
    111115
    112116ifeq ($(UARCH),ia32)
    113         DIRS += srv/hw/bus/pci
     117        DIRS += srv/drivers/rootia32
     118        DIRS += srv/drivers/pciintel
     119        DIRS += srv/drivers/isa
     120        DIRS += srv/drivers/ns8250
     121#       DIRS += srv/hw/bus/pci
    114122endif
    115123
     
    134142        lib/softint \
    135143        lib/softfloat \
     144        lib/drv \
    136145        lib/packet \
    137146        lib/net
  • uspace/Makefile.common

    re0e568ff r04cb68f2  
    8888LIBPCI_PREFIX = $(LIB_PREFIX)/pci
    8989
     90LIBDRV_PREFIX = $(LIB_PREFIX)/drv
    9091LIBPACKET_PREFIX = $(LIB_PREFIX)/packet
    9192LIBNET_PREFIX = $(LIB_PREFIX)/net
  • uspace/app/init/init.c

    re0e568ff r04cb68f2  
    309309        getterm("term/vc5", "/app/bdsh");
    310310        getterm("term/vc6", "/app/klog");
     311        getterm("term/vc7", "/srv/devman");
    311312       
    312313        return 0;
  • uspace/app/trace/syscalls.c

    re0e568ff r04cb68f2  
    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 },
    7576
    7677    [SYS_SYSINFO_GET_TAG] = { "sysinfo_get_tag",                2,      V_INTEGER },
  • uspace/lib/c/Makefile

    re0e568ff r04cb68f2  
    5757        generic/clipboard.c \
    5858        generic/devmap.c \
     59        generic/devman.c \
     60        generic/device/hw_res.c \
     61        generic/device/char.c \
    5962        generic/event.c \
    6063        generic/errno.c \
  • uspace/lib/c/generic/ddi.c

    re0e568ff r04cb68f2  
    9696}
    9797
     98/** Enable an interrupt.
     99 *
     100 * @param irq the interrupt.
     101 *
     102 * @return Zero on success, negative error code otherwise.
     103 */
     104int 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 */
     115int interrupt_disable(int irq)
     116{
     117        return __SYSCALL2(SYS_INTERRUPT_ENABLE, (sysarg_t) irq, 0);
     118}
     119
    98120/** Enable PIO for specified I/O range.
    99121 *
  • uspace/lib/c/include/ddi.h

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

    re0e568ff r04cb68f2  
    4545        SERVICE_VFS,
    4646        SERVICE_DEVMAP,
     47        SERVICE_DEVMAN,
    4748        SERVICE_FHC,
    4849        SERVICE_OBIO,
Note: See TracChangeset for help on using the changeset viewer.