Changes in / [1bebadee:730dce77] in mainline


Ignore:
Files:
58 deleted
25 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    r1bebadee r730dce77  
    562562! CONFIG_OPTIMIZE_FOR_SIZE (n/y)
    563563
    564 % Number of consoles
    565 @ "1"
    566 @ "2"
    567 @ "3"
    568 @ "4"
    569 @ "5"
    570 @ "6"
    571 ! CONFIG_VC_COUNT(choice)
    572 
    573 %Kernel log on console 6
    574 ! CONFIG_KERNEL_LOG_VC_6 (y/n)
    575 
    576564% Barebone build with essential binaries only
    577565! CONFIG_BAREBONE (n/y)
  • boot/Makefile.common

    r1bebadee r730dce77  
    115115        $(USPACE_PATH)/srv/devman/devman
    116116
    117 RD_DRVS_ESSENTIAL = \
    118         infrastructure/root
    119 
    120 RD_DRVS_NON_ESSENTIAL = \
     117RD_DRVS = \
     118        infrastructure/root \
    121119        infrastructure/rootvirt \
    122120        test/test1 \
     
    159157        $(USPACE_PATH)/app/dltest2/dltest2 \
    160158        $(USPACE_PATH)/app/dload/dload \
    161         $(USPACE_PATH)/app/dplay/dplay \
    162159        $(USPACE_PATH)/app/edit/edit \
    163160        $(USPACE_PATH)/app/ext2info/ext2info \
     
    166163        $(USPACE_PATH)/app/killall/killall \
    167164        $(USPACE_PATH)/app/loc/loc \
    168         $(USPACE_PATH)/app/mixerctl/mixerctl \
    169165        $(USPACE_PATH)/app/mkfat/mkfat \
    170166        $(USPACE_PATH)/app/mkexfat/mkexfat \
     
    226222RD_SRVS = $(RD_SRVS_ESSENTIAL)
    227223RD_APPS = $(RD_APPS_ESSENTIAL)
    228 RD_DRVS = $(RD_DRVS_ESSENTIAL)
    229224else
    230225RD_SRVS = $(RD_SRVS_ESSENTIAL) $(RD_SRVS_NON_ESSENTIAL)
    231226RD_APPS = $(RD_APPS_ESSENTIAL) $(RD_APPS_NON_ESSENTIAL)
    232 RD_DRVS = $(RD_DRVS_ESSENTIAL) $(RD_DRVS_NON_ESSENTAIL)
    233227endif
    234228
  • boot/arch/amd64/Makefile.inc

    r1bebadee r730dce77  
    2828
    2929RD_SRVS_ESSENTIAL += \
    30         $(USPACE_PATH)/srv/audio/hound/hound \
    31         $(USPACE_PATH)/srv/devman/devman \
    3230        $(USPACE_PATH)/srv/hw/irc/apic/apic \
    3331        $(USPACE_PATH)/srv/hw/irc/i8259/i8259
     
    3634        $(USPACE_PATH)/srv/bd/ata_bd/ata_bd
    3735
    38 RD_DRVS_ESSENTIAL += \
     36RD_DRVS += \
    3937        infrastructure/rootpc \
    4038        bus/pci/pciintel \
    4139        bus/isa \
    42         audio/sb16 \
    4340        char/i8042 \
     41        char/ns8250 \
    4442        char/ps2mouse \
    45         char/xtkbd
    46 
    47 RD_DRVS_NON_ESSENTIAL += \
    48         char/ns8250 \
     43        char/xtkbd \
    4944        bus/usb/ehci\
    5045        bus/usb/ohci \
     
    6156        bus/isa
    6257
    63 RD_APPS_ESSENTIAL += \
    64         $(USPACE_PATH)/app/edit/edit \
    65         $(USPACE_PATH)/app/mixerctl/mixerctl \
    66         $(USPACE_PATH)/app/wavplay/wavplay \
    67        
    6858BOOT_OUTPUT = $(ROOT_PATH)/image.iso
    6959PREBUILD = $(INITRD).img
  • boot/arch/ppc32/Makefile.inc

    r1bebadee r730dce77  
    4242        $(USPACE_PATH)/srv/hw/bus/cuda_adb/cuda_adb
    4343
    44 RD_DRVS_NON_ESSENTIAL += \
     44RD_DRVS += \
    4545        infrastructure/rootmac
    4646
  • defaults/amd64/Makefile.config

    r1bebadee r730dce77  
    2525# Kernel console support
    2626CONFIG_KCONSOLE = y
    27 
    28 # Number of shell consoles
    29 CONFIG_VC_COUNT = 5
    3027
    3128# Kernel symbol information
  • defaults/arm32/Makefile.config

    r1bebadee r730dce77  
    1616# Kernel console support
    1717CONFIG_KCONSOLE = y
    18 
    19 # Number of shell consoles
    20 CONFIG_VC_COUNT = 5
    2118
    2219# Kernel symbol information
  • defaults/ia32/Makefile.config

    r1bebadee r730dce77  
    3131# Kernel console support
    3232CONFIG_KCONSOLE = y
    33 
    34 # Number of shell consoles
    35 CONFIG_VC_COUNT = 5
    3633
    3734# Kernel symbol information
  • defaults/ia64/Makefile.config

    r1bebadee r730dce77  
    2929CONFIG_KCONSOLE = y
    3030
    31 # Number of shell consoles
    32 CONFIG_VC_COUNT = 5
    33 
    3431# Kernel symbol information
    3532CONFIG_SYMTAB = y
  • defaults/mips32/Makefile.config

    r1bebadee r730dce77  
    2222# Kernel console support
    2323CONFIG_KCONSOLE = y
    24 
    25 # Number of shell consoles
    26 CONFIG_VC_COUNT = 5
    2724
    2825# Kernel symbol information
  • defaults/mips64/Makefile.config

    r1bebadee r730dce77  
    2222# Kernel console support
    2323CONFIG_KCONSOLE = y
    24 
    25 # Number of shell consoles
    26 CONFIG_VC_COUNT = 5
    2724
    2825# Kernel symbol information
  • defaults/ppc32/Makefile.config

    r1bebadee r730dce77  
    1616# Kernel console support
    1717CONFIG_KCONSOLE = y
    18 
    19 # Number of shell consoles
    20 CONFIG_VC_COUNT = 5
    2118
    2219# Kernel symbol information
  • defaults/sparc64/Makefile.config

    r1bebadee r730dce77  
    3232CONFIG_KCONSOLE = y
    3333
    34 # Number of shell consoles
    35 CONFIG_VC_COUNT = 5
    36 
    3734# Kernel symbol information
    3835CONFIG_SYMTAB = y
  • defaults/special/Makefile.config

    r1bebadee r730dce77  
    1717CONFIG_KCONSOLE = y
    1818
    19 # Number of shell consoles
    20 CONFIG_VC_COUNT = 5
    21 
    2219# Kernel symbol information
    2320CONFIG_SYMTAB = y
  • uspace/Makefile

    r1bebadee r730dce77  
    3838        app/bnchmark \
    3939        app/devctl \
    40         app/drec \
    4140        app/edit \
    4241        app/ext2info \
     
    4948        app/loc \
    5049        app/lsusb \
    51         app/mixerctl \
    5250        app/mkfat \
    5351        app/mkexfat \
     
    7371        app/sysinfo \
    7472        app/mkbd \
    75         app/wavplay \
    7673        app/websrv \
    77         srv/audio/hound \
    7874        srv/clipboard \
    7975        srv/locsrv \
     
    108104        srv/hid/remcons \
    109105        srv/hw/char/s3c24xx_uart \
    110         drv/audio/sb16 \
    111106        drv/infrastructure/root \
    112107        drv/infrastructure/rootvirt \
     
    198193        lib/drv \
    199194        lib/fb \
    200         lib/hound \
    201195        lib/net \
    202196        lib/nic \
     
    207201        lib/usbhid \
    208202        lib/usbvirt \
    209         lib/pcm \
    210203        lib/posix
    211204
  • uspace/Makefile.common

    r1bebadee r730dce77  
    123123
    124124LIBDRV_PREFIX = $(LIB_PREFIX)/drv
    125 LIBHOUND_PREFIX = $(LIB_PREFIX)/hound
    126 LIBPCM_PREFIX = $(LIB_PREFIX)/pcm
    127125LIBNET_PREFIX = $(LIB_PREFIX)/net
    128126LIBNIC_PREFIX = $(LIB_PREFIX)/nic
     
    252250
    253251ifneq ($(BINARY),)
    254 %.disasm: $(BINARY)_prestrip
     252%.disasm: $(BINARY)
    255253ifeq ($(CONFIG_LINE_DEBUG),y)
    256254        $(OBJDUMP) -d -S $< > $@
     
    259257endif
    260258
    261 .INTERMEDIATE: $(BINARY)_prestrip
    262 
    263 $(BINARY)_prestrip: $(LINKER_SCRIPT) $(OBJECTS) $(LIBS) $(BASE_LIBS)
    264         $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $@ $(OBJECTS) $(LIBS) $(BASE_LIBS)
    265 
    266 $(BINARY): $(BINARY)_prestrip $(BINARY).disasm
    267         cp $(BINARY)_prestrip $@
     259$(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBS) $(BASE_LIBS)
     260        $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $(BINARY) $(OBJECTS) $(LIBS) $(BASE_LIBS)
    268261ifeq ($(CONFIG_STRIP_BINARIES),y)
    269262        $(STRIP) $(BINARY)
  • uspace/app/init/init.c

    r1bebadee r730dce77  
    339339#endif
    340340       
    341         spawn("/srv/hound");
    342         switch((unsigned)CONFIG_VC_COUNT) {
    343         default:
    344         case 6: getterm("term/vc5", "/app/bdsh", false);
    345         case 5: getterm("term/vc4", "/app/bdsh", false);
    346         case 4: getterm("term/vc3", "/app/bdsh", false);
    347         case 3: getterm("term/vc2", "/app/bdsh", false);
    348         case 2: getterm("term/vc1", "/app/bdsh", false);
    349         case 1: getterm("term/vc0", "/app/bdsh", true);
    350         }
    351 #ifdef CONFIG_KERNEL_LOG_VC_6
     341        getterm("term/vc0", "/app/bdsh", true);
     342        getterm("term/vc1", "/app/bdsh", false);
     343        getterm("term/vc2", "/app/bdsh", false);
     344        getterm("term/vc3", "/app/bdsh", false);
     345        getterm("term/vc4", "/app/bdsh", false);
     346        getterm("term/vc5", "/app/bdsh", false);
    352347        getterm("term/vc6", "/app/klog", false);
    353 #endif
    354348       
    355349        return 0;
  • uspace/drv/bus/isa/isa.c

    r1bebadee r730dce77  
    9191        fibril_mutex_t mutex;
    9292        ddf_fun_t *fnode;
    93         hw_resource_t resources[ISA_MAX_HW_RES];
    9493        hw_resource_list_t hw_resources;
    9594        link_t bus_link;
     
    208207
    209208        fibril_mutex_initialize(&fun->mutex);
    210         fun->hw_resources.resources = fun->resources;
    211 
    212209        fun->fnode = fnode;
    213210        return fun;
     
    521518}
    522519
     520static void fun_hw_res_alloc(isa_fun_t *fun)
     521{
     522        fun->hw_resources.resources =
     523            (hw_resource_t *) malloc(sizeof(hw_resource_t) * ISA_MAX_HW_RES);
     524}
     525
     526static void fun_hw_res_free(isa_fun_t *fun)
     527{
     528        free(fun->hw_resources.resources);
     529        fun->hw_resources.resources = NULL;
     530}
     531
    523532static char *isa_fun_read_info(char *fun_conf, isa_bus_t *isa)
    524533{
     
    549558                return NULL;
    550559        }
     560
     561        /* Allocate buffer for the list of hardware resources of the device. */
     562        fun_hw_res_alloc(fun);
    551563
    552564        /* Get properties of the device (match ids, irq and io range). */
     
    665677                list_remove(&fun->bus_link);
    666678
     679                fun_hw_res_free(fun);
    667680                ddf_fun_destroy(fun->fnode);
    668681        }
  • uspace/lib/c/generic/device/hw_res.c

    r1bebadee r730dce77  
    4242{
    4343        sysarg_t count = 0;
    44 
     44       
    4545        async_exch_t *exch = async_exchange_begin(sess);
    46         if (exch == NULL)
    47                 return ENOMEM;
    4846        int rc = async_req_1_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    4947            HW_RES_GET_RESOURCE_LIST, &count);
    50 
     48       
    5149        if (rc != EOK) {
    5250                async_exchange_end(exch);
    5351                return rc;
    5452        }
    55 
     53       
    5654        size_t size = count * sizeof(hw_resource_t);
    5755        hw_resource_t *resources = (hw_resource_t *) malloc(size);
     
    6159                return ENOMEM;
    6260        }
    63 
     61       
    6462        rc = async_data_read_start(exch, resources, size);
    6563        async_exchange_end(exch);
    66 
     64       
    6765        if (rc != EOK) {
    6866                free(resources);
    6967                return rc;
    7068        }
    71 
     69       
    7270        hw_resources->resources = resources;
    7371        hw_resources->count = count;
    74 
     72       
    7573        return EOK;
    7674}
     
    7977{
    8078        async_exch_t *exch = async_exchange_begin(sess);
    81         if (exch == NULL)
    82                 return false;
    8379        int rc = async_req_1_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    8480            HW_RES_ENABLE_INTERRUPT);
    8581        async_exchange_end(exch);
    86 
     82       
    8783        return (rc == EOK);
    88 }
    89 
    90 /**
    91  * Setup DMA channel to specified place and mode.
    92  * @param channel DMA Channel 1,2,3 for 8 bit transfers, 5,6,7 for 16 bit.
    93  * @param pa Physical address of the buffer. Must be < 16MB for 16 bit and < 1MB
    94  *           for 8 bit transfers.
    95  * @param size DMA buffer size, limited to 64K.
    96  * @param mode Mode of the DMA channel:
    97  *              - Read or Write
    98  *              - Allow automatic reset
    99  *              - Use address decrement instead of increment
    100  *              - Use SINGLE/BLOCK/ON DEMAND transfer mode
    101  * @return Error code.
    102  */
    103 int hw_res_dma_channel_setup(async_sess_t *sess,
    104     unsigned channel, uint32_t pa, uint16_t size, uint8_t mode)
    105 {
    106         async_exch_t *exch = async_exchange_begin(sess);
    107         if (exch == NULL)
    108                 return ENOMEM;
    109         const uint32_t packed = size | (mode << 16);
    110         const int ret = async_req_4_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    111             HW_RES_DMA_CHANNEL_SETUP, channel, pa, packed);
    112         async_exchange_end(exch);
    113 
    114         return ret;
    11584}
    11685
  • uspace/lib/c/generic/device/hw_res_parsed.c

    r1bebadee r730dce77  
    3838#include <errno.h>
    3939
    40 static void hw_res_parse_add_dma_channel(hw_res_list_parsed_t *out,
    41     const hw_resource_t *res, int flags)
    42 {
    43         assert(res);
    44         assert((res->type == DMA_CHANNEL_8) || (res->type == DMA_CHANNEL_16));
    45        
    46         const unsigned channel = (res->type == DMA_CHANNEL_8) ?
    47             res->res.dma_channel.dma8 : res->res.dma_channel.dma16;
    48         const size_t count = out->dma_channels.count;
    49         const int keep_duplicit = flags & HW_RES_KEEP_DUPLICIT;
    50        
    51         if (!keep_duplicit) {
    52                 for (size_t i = 0; i < count; ++i) {
    53                         if (out->dma_channels.channels[i] == channel)
    54                                 return;
    55                 }
    56         }
    57        
    58         out->dma_channels.channels[count] = channel;
    59         ++out->dma_channels.count;
    60 }
    61 
    62 static void hw_res_parse_add_irq(hw_res_list_parsed_t *out,
    63     const hw_resource_t *res, int flags)
     40static void hw_res_parse_add_irq(hw_res_list_parsed_t *out, hw_resource_t *res,
     41    int flags)
    6442{
    6543        assert(res && (res->type == INTERRUPT));
     
    8159
    8260static void hw_res_parse_add_io_range(hw_res_list_parsed_t *out,
    83     const hw_resource_t *res, int flags)
     61    hw_resource_t *res, int flags)
    8462{
    8563        assert(res && (res->type == IO_RANGE));
     
    11290
    11391static void hw_res_parse_add_mem_range(hw_res_list_parsed_t *out,
    114     const hw_resource_t *res, int flags)
     92    hw_resource_t *res, int flags)
    11593{
    11694        assert(res && (res->type == MEM_RANGE));
     
    154132 *
    155133 */
    156 int hw_res_list_parse(const hw_resource_list_t *hw_resources,
     134int hw_res_list_parse(hw_resource_list_t *hw_resources,
    157135    hw_res_list_parsed_t *out, int flags)
    158136{
     
    163141        hw_res_list_parsed_clean(out);
    164142       
    165         out->irqs.irqs = calloc(res_count, sizeof(int));
    166         out->dma_channels.channels = calloc(res_count, sizeof(int));
    167         out->io_ranges.ranges = calloc(res_count, sizeof(io_range_t));
    168         out->mem_ranges.ranges = calloc(res_count, sizeof(mem_range_t));
    169         if (!out->irqs.irqs || !out->dma_channels.channels ||
    170             !out->io_ranges.ranges || !out->mem_ranges.ranges) {
    171                 hw_res_list_parsed_clean(out);
    172                 return ENOMEM;
    173         }
     143        out->irqs.irqs = malloc(res_count * sizeof(int));
     144        out->io_ranges.ranges = malloc(res_count * sizeof(io_range_t));
     145        out->mem_ranges.ranges = malloc(res_count * sizeof(mem_range_t));
    174146       
    175147        for (size_t i = 0; i < res_count; ++i) {
    176                 const hw_resource_t *resource = &(hw_resources->resources[i]);
    177 
     148                hw_resource_t *resource = &(hw_resources->resources[i]);
     149               
    178150                switch (resource->type) {
    179151                case INTERRUPT:
     
    186158                        hw_res_parse_add_mem_range(out, resource, flags);
    187159                        break;
    188                 case DMA_CHANNEL_8:
    189                 case DMA_CHANNEL_16:
    190                         hw_res_parse_add_dma_channel(out, resource, flags);
    191                         break;
    192160                default:
    193                         hw_res_list_parsed_clean(out);
    194161                        return EINVAL;
    195162                }
    196163        }
    197 
     164       
    198165        return EOK;
    199166};
  • uspace/lib/c/include/device/hw_res_parsed.h

    r1bebadee r730dce77  
    139139}
    140140
    141 extern int hw_res_list_parse(
    142     const hw_resource_list_t *, hw_res_list_parsed_t *, int);
     141extern int hw_res_list_parse(hw_resource_list_t *, hw_res_list_parsed_t *, int);
    143142extern int hw_res_get_list_parsed(async_sess_t *, hw_res_list_parsed_t *, int);
    144143
  • uspace/lib/c/include/ipc/dev_iface.h

    r1bebadee r730dce77  
    3636typedef enum {
    3737        HW_RES_DEV_IFACE = 0,
    38 
    39         /** Audio device mixer interface */
    40         AUDIO_MIXER_IFACE,
    41         /** Audio device pcm buffer interface */
    42         AUDIO_PCM_BUFFER_IFACE,
    43 
    4438        /** Character device interface */
    4539        CHAR_DEV_IFACE,
  • uspace/lib/drv/Makefile

    r1bebadee r730dce77  
    2929
    3030USPACE_PREFIX = ../..
    31 EXTRA_CFLAGS = -Iinclude -I$(LIBUSB_PREFIX)/include -I$(LIBPCM_PREFIX)/include
     31EXTRA_CFLAGS = -Iinclude -I$(LIBUSB_PREFIX)/include
    3232LIBRARY = libdrv
    3333
     
    3838        generic/log.c \
    3939        generic/logbuf.c \
    40         generic/remote_audio_mixer.c \
    41         generic/remote_audio_pcm.c \
    4240        generic/remote_hw_res.c \
    4341        generic/remote_char_dev.c \
  • uspace/lib/drv/generic/dev_iface.c

    r1bebadee r730dce77  
    4646#include "remote_usbhid.h"
    4747#include "remote_pci.h"
    48 #include "remote_audio_mixer.h"
    49 #include "remote_audio_pcm.h"
    5048#include "remote_ahci.h"
    5149
    52 static const iface_dipatch_table_t remote_ifaces = {
     50static iface_dipatch_table_t remote_ifaces = {
    5351        .ifaces = {
    54                 [AUDIO_MIXER_IFACE] = &remote_audio_mixer_iface,
    55                 [AUDIO_PCM_BUFFER_IFACE] = &remote_audio_pcm_iface,
    56                 [HW_RES_DEV_IFACE] = &remote_hw_res_iface,
    57                 [CHAR_DEV_IFACE] = &remote_char_dev_iface,
    58                 [NIC_DEV_IFACE] = &remote_nic_iface,
    59                 [PCI_DEV_IFACE] = &remote_pci_iface,
    60                 [USB_DEV_IFACE] = &remote_usb_iface,
    61                 [USBHC_DEV_IFACE] = &remote_usbhc_iface,
    62                 [USBHID_DEV_IFACE] = &remote_usbhid_iface,
    63                 [AHCI_DEV_IFACE] = &remote_ahci_iface,
     52                &remote_hw_res_iface,
     53                &remote_char_dev_iface,
     54                &remote_nic_iface,
     55                &remote_pci_iface,
     56                &remote_usb_iface,
     57                &remote_usbhc_iface,
     58                &remote_usbhid_iface,
     59                &remote_ahci_iface
    6460        }
    6561};
  • uspace/lib/drv/generic/remote_hw_res.c

    r1bebadee r730dce77  
    11/*
    22 * Copyright (c) 2010 Lenka Trochtova
    3  * Copyright (c) 2011 Jan Vesely
    43 * All rights reserved.
    54 *
     
    4443static void remote_hw_res_enable_interrupt(ddf_fun_t *, void *, ipc_callid_t,
    4544    ipc_call_t *);
    46 static void remote_hw_res_dma_channel_setup(ddf_fun_t *, void *, ipc_callid_t,
    47     ipc_call_t *);
    4845
    4946static remote_iface_func_ptr_t remote_hw_res_iface_ops [] = {
    50         [HW_RES_GET_RESOURCE_LIST] = &remote_hw_res_get_resource_list,
    51         [HW_RES_ENABLE_INTERRUPT] = &remote_hw_res_enable_interrupt,
    52         [HW_RES_DMA_CHANNEL_SETUP] = &remote_hw_res_dma_channel_setup,
     47        &remote_hw_res_get_resource_list,
     48        &remote_hw_res_enable_interrupt
    5349};
    5450
     
    9894}
    9995
    100 static void remote_hw_res_dma_channel_setup(ddf_fun_t *fun, void *ops,
    101     ipc_callid_t callid, ipc_call_t *call)
    102 {
    103         hw_res_ops_t *hw_res_ops = ops;
    104 
    105         if (hw_res_ops->dma_channel_setup == NULL) {
    106                 async_answer_0(callid, ENOTSUP);
    107                 return;
    108         }
    109         const unsigned channel = DEV_IPC_GET_ARG1(*call);
    110         const uint32_t address = DEV_IPC_GET_ARG2(*call);
    111         const uint16_t size = DEV_IPC_GET_ARG3(*call) & 0xffff;
    112         const uint8_t mode = DEV_IPC_GET_ARG3(*call) >> 16;
    113 
    114         const int ret = hw_res_ops->dma_channel_setup(
    115             fun, channel, address, size, mode);
    116         async_answer_0(callid, ret);
    117 }
    118 
    11996/**
    12097 * @}
  • uspace/srv/locsrv/locsrv.c

    r1bebadee r730dce77  
    13681368        categ_dir_add_cat(&cdir, cat);
    13691369       
    1370         cat = category_new("audio-pcm");
    1371         categ_dir_add_cat(&cdir, cat);
    1372        
    13731370        return true;
    13741371}
Note: See TracChangeset for help on using the changeset viewer.