Changes in / [730dce77:1bebadee] in mainline
- Files:
-
- 58 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r730dce77 r1bebadee 562 562 ! CONFIG_OPTIMIZE_FOR_SIZE (n/y) 563 563 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 564 576 % Barebone build with essential binaries only 565 577 ! CONFIG_BAREBONE (n/y) -
boot/Makefile.common
r730dce77 r1bebadee 115 115 $(USPACE_PATH)/srv/devman/devman 116 116 117 RD_DRVS = \ 118 infrastructure/root \ 117 RD_DRVS_ESSENTIAL = \ 118 infrastructure/root 119 120 RD_DRVS_NON_ESSENTIAL = \ 119 121 infrastructure/rootvirt \ 120 122 test/test1 \ … … 157 159 $(USPACE_PATH)/app/dltest2/dltest2 \ 158 160 $(USPACE_PATH)/app/dload/dload \ 161 $(USPACE_PATH)/app/dplay/dplay \ 159 162 $(USPACE_PATH)/app/edit/edit \ 160 163 $(USPACE_PATH)/app/ext2info/ext2info \ … … 163 166 $(USPACE_PATH)/app/killall/killall \ 164 167 $(USPACE_PATH)/app/loc/loc \ 168 $(USPACE_PATH)/app/mixerctl/mixerctl \ 165 169 $(USPACE_PATH)/app/mkfat/mkfat \ 166 170 $(USPACE_PATH)/app/mkexfat/mkexfat \ … … 222 226 RD_SRVS = $(RD_SRVS_ESSENTIAL) 223 227 RD_APPS = $(RD_APPS_ESSENTIAL) 228 RD_DRVS = $(RD_DRVS_ESSENTIAL) 224 229 else 225 230 RD_SRVS = $(RD_SRVS_ESSENTIAL) $(RD_SRVS_NON_ESSENTIAL) 226 231 RD_APPS = $(RD_APPS_ESSENTIAL) $(RD_APPS_NON_ESSENTIAL) 232 RD_DRVS = $(RD_DRVS_ESSENTIAL) $(RD_DRVS_NON_ESSENTAIL) 227 233 endif 228 234 -
boot/arch/amd64/Makefile.inc
r730dce77 r1bebadee 28 28 29 29 RD_SRVS_ESSENTIAL += \ 30 $(USPACE_PATH)/srv/audio/hound/hound \ 31 $(USPACE_PATH)/srv/devman/devman \ 30 32 $(USPACE_PATH)/srv/hw/irc/apic/apic \ 31 33 $(USPACE_PATH)/srv/hw/irc/i8259/i8259 … … 34 36 $(USPACE_PATH)/srv/bd/ata_bd/ata_bd 35 37 36 RD_DRVS += \38 RD_DRVS_ESSENTIAL += \ 37 39 infrastructure/rootpc \ 38 40 bus/pci/pciintel \ 39 41 bus/isa \ 42 audio/sb16 \ 40 43 char/i8042 \ 44 char/ps2mouse \ 45 char/xtkbd 46 47 RD_DRVS_NON_ESSENTIAL += \ 41 48 char/ns8250 \ 42 char/ps2mouse \43 char/xtkbd \44 49 bus/usb/ehci\ 45 50 bus/usb/ohci \ … … 56 61 bus/isa 57 62 63 RD_APPS_ESSENTIAL += \ 64 $(USPACE_PATH)/app/edit/edit \ 65 $(USPACE_PATH)/app/mixerctl/mixerctl \ 66 $(USPACE_PATH)/app/wavplay/wavplay \ 67 58 68 BOOT_OUTPUT = $(ROOT_PATH)/image.iso 59 69 PREBUILD = $(INITRD).img -
boot/arch/ppc32/Makefile.inc
r730dce77 r1bebadee 42 42 $(USPACE_PATH)/srv/hw/bus/cuda_adb/cuda_adb 43 43 44 RD_DRVS += \44 RD_DRVS_NON_ESSENTIAL += \ 45 45 infrastructure/rootmac 46 46 -
defaults/amd64/Makefile.config
r730dce77 r1bebadee 25 25 # Kernel console support 26 26 CONFIG_KCONSOLE = y 27 28 # Number of shell consoles 29 CONFIG_VC_COUNT = 5 27 30 28 31 # Kernel symbol information -
defaults/arm32/Makefile.config
r730dce77 r1bebadee 16 16 # Kernel console support 17 17 CONFIG_KCONSOLE = y 18 19 # Number of shell consoles 20 CONFIG_VC_COUNT = 5 18 21 19 22 # Kernel symbol information -
defaults/ia32/Makefile.config
r730dce77 r1bebadee 31 31 # Kernel console support 32 32 CONFIG_KCONSOLE = y 33 34 # Number of shell consoles 35 CONFIG_VC_COUNT = 5 33 36 34 37 # Kernel symbol information -
defaults/ia64/Makefile.config
r730dce77 r1bebadee 29 29 CONFIG_KCONSOLE = y 30 30 31 # Number of shell consoles 32 CONFIG_VC_COUNT = 5 33 31 34 # Kernel symbol information 32 35 CONFIG_SYMTAB = y -
defaults/mips32/Makefile.config
r730dce77 r1bebadee 22 22 # Kernel console support 23 23 CONFIG_KCONSOLE = y 24 25 # Number of shell consoles 26 CONFIG_VC_COUNT = 5 24 27 25 28 # Kernel symbol information -
defaults/mips64/Makefile.config
r730dce77 r1bebadee 22 22 # Kernel console support 23 23 CONFIG_KCONSOLE = y 24 25 # Number of shell consoles 26 CONFIG_VC_COUNT = 5 24 27 25 28 # Kernel symbol information -
defaults/ppc32/Makefile.config
r730dce77 r1bebadee 16 16 # Kernel console support 17 17 CONFIG_KCONSOLE = y 18 19 # Number of shell consoles 20 CONFIG_VC_COUNT = 5 18 21 19 22 # Kernel symbol information -
defaults/sparc64/Makefile.config
r730dce77 r1bebadee 32 32 CONFIG_KCONSOLE = y 33 33 34 # Number of shell consoles 35 CONFIG_VC_COUNT = 5 36 34 37 # Kernel symbol information 35 38 CONFIG_SYMTAB = y -
defaults/special/Makefile.config
r730dce77 r1bebadee 17 17 CONFIG_KCONSOLE = y 18 18 19 # Number of shell consoles 20 CONFIG_VC_COUNT = 5 21 19 22 # Kernel symbol information 20 23 CONFIG_SYMTAB = y -
uspace/Makefile
r730dce77 r1bebadee 38 38 app/bnchmark \ 39 39 app/devctl \ 40 app/drec \ 40 41 app/edit \ 41 42 app/ext2info \ … … 48 49 app/loc \ 49 50 app/lsusb \ 51 app/mixerctl \ 50 52 app/mkfat \ 51 53 app/mkexfat \ … … 71 73 app/sysinfo \ 72 74 app/mkbd \ 75 app/wavplay \ 73 76 app/websrv \ 77 srv/audio/hound \ 74 78 srv/clipboard \ 75 79 srv/locsrv \ … … 104 108 srv/hid/remcons \ 105 109 srv/hw/char/s3c24xx_uart \ 110 drv/audio/sb16 \ 106 111 drv/infrastructure/root \ 107 112 drv/infrastructure/rootvirt \ … … 193 198 lib/drv \ 194 199 lib/fb \ 200 lib/hound \ 195 201 lib/net \ 196 202 lib/nic \ … … 201 207 lib/usbhid \ 202 208 lib/usbvirt \ 209 lib/pcm \ 203 210 lib/posix 204 211 -
uspace/Makefile.common
r730dce77 r1bebadee 123 123 124 124 LIBDRV_PREFIX = $(LIB_PREFIX)/drv 125 LIBHOUND_PREFIX = $(LIB_PREFIX)/hound 126 LIBPCM_PREFIX = $(LIB_PREFIX)/pcm 125 127 LIBNET_PREFIX = $(LIB_PREFIX)/net 126 128 LIBNIC_PREFIX = $(LIB_PREFIX)/nic … … 250 252 251 253 ifneq ($(BINARY),) 252 %.disasm: $(BINARY) 254 %.disasm: $(BINARY)_prestrip 253 255 ifeq ($(CONFIG_LINE_DEBUG),y) 254 256 $(OBJDUMP) -d -S $< > $@ … … 257 259 endif 258 260 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) 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 $@ 261 268 ifeq ($(CONFIG_STRIP_BINARIES),y) 262 269 $(STRIP) $(BINARY) -
uspace/app/init/init.c
r730dce77 r1bebadee 339 339 #endif 340 340 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); 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 347 352 getterm("term/vc6", "/app/klog", false); 353 #endif 348 354 349 355 return 0; -
uspace/drv/bus/isa/isa.c
r730dce77 r1bebadee 91 91 fibril_mutex_t mutex; 92 92 ddf_fun_t *fnode; 93 hw_resource_t resources[ISA_MAX_HW_RES]; 93 94 hw_resource_list_t hw_resources; 94 95 link_t bus_link; … … 207 208 208 209 fibril_mutex_initialize(&fun->mutex); 210 fun->hw_resources.resources = fun->resources; 211 209 212 fun->fnode = fnode; 210 213 return fun; … … 518 521 } 519 522 520 static 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 526 static void fun_hw_res_free(isa_fun_t *fun)527 {528 free(fun->hw_resources.resources);529 fun->hw_resources.resources = NULL;530 }531 532 523 static char *isa_fun_read_info(char *fun_conf, isa_bus_t *isa) 533 524 { … … 558 549 return NULL; 559 550 } 560 561 /* Allocate buffer for the list of hardware resources of the device. */562 fun_hw_res_alloc(fun);563 551 564 552 /* Get properties of the device (match ids, irq and io range). */ … … 677 665 list_remove(&fun->bus_link); 678 666 679 fun_hw_res_free(fun);680 667 ddf_fun_destroy(fun->fnode); 681 668 } -
uspace/lib/c/generic/device/hw_res.c
r730dce77 r1bebadee 42 42 { 43 43 sysarg_t count = 0; 44 44 45 45 async_exch_t *exch = async_exchange_begin(sess); 46 if (exch == NULL) 47 return ENOMEM; 46 48 int rc = async_req_1_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 47 49 HW_RES_GET_RESOURCE_LIST, &count); 48 50 49 51 if (rc != EOK) { 50 52 async_exchange_end(exch); 51 53 return rc; 52 54 } 53 55 54 56 size_t size = count * sizeof(hw_resource_t); 55 57 hw_resource_t *resources = (hw_resource_t *) malloc(size); … … 59 61 return ENOMEM; 60 62 } 61 63 62 64 rc = async_data_read_start(exch, resources, size); 63 65 async_exchange_end(exch); 64 66 65 67 if (rc != EOK) { 66 68 free(resources); 67 69 return rc; 68 70 } 69 71 70 72 hw_resources->resources = resources; 71 73 hw_resources->count = count; 72 74 73 75 return EOK; 74 76 } … … 77 79 { 78 80 async_exch_t *exch = async_exchange_begin(sess); 81 if (exch == NULL) 82 return false; 79 83 int rc = async_req_1_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 80 84 HW_RES_ENABLE_INTERRUPT); 81 85 async_exchange_end(exch); 82 86 83 87 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; 84 115 } 85 116 -
uspace/lib/c/generic/device/hw_res_parsed.c
r730dce77 r1bebadee 38 38 #include <errno.h> 39 39 40 static void hw_res_parse_add_irq(hw_res_list_parsed_t *out, hw_resource_t *res, 41 int flags) 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) 42 64 { 43 65 assert(res && (res->type == INTERRUPT)); … … 59 81 60 82 static void hw_res_parse_add_io_range(hw_res_list_parsed_t *out, 61 hw_resource_t *res, int flags)83 const hw_resource_t *res, int flags) 62 84 { 63 85 assert(res && (res->type == IO_RANGE)); … … 90 112 91 113 static void hw_res_parse_add_mem_range(hw_res_list_parsed_t *out, 92 hw_resource_t *res, int flags)114 const hw_resource_t *res, int flags) 93 115 { 94 116 assert(res && (res->type == MEM_RANGE)); … … 132 154 * 133 155 */ 134 int hw_res_list_parse( hw_resource_list_t *hw_resources,156 int hw_res_list_parse(const hw_resource_list_t *hw_resources, 135 157 hw_res_list_parsed_t *out, int flags) 136 158 { … … 141 163 hw_res_list_parsed_clean(out); 142 164 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)); 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 } 146 174 147 175 for (size_t i = 0; i < res_count; ++i) { 148 hw_resource_t *resource = &(hw_resources->resources[i]);149 176 const hw_resource_t *resource = &(hw_resources->resources[i]); 177 150 178 switch (resource->type) { 151 179 case INTERRUPT: … … 158 186 hw_res_parse_add_mem_range(out, resource, flags); 159 187 break; 188 case DMA_CHANNEL_8: 189 case DMA_CHANNEL_16: 190 hw_res_parse_add_dma_channel(out, resource, flags); 191 break; 160 192 default: 193 hw_res_list_parsed_clean(out); 161 194 return EINVAL; 162 195 } 163 196 } 164 197 165 198 return EOK; 166 199 }; -
uspace/lib/c/include/device/hw_res_parsed.h
r730dce77 r1bebadee 139 139 } 140 140 141 extern int hw_res_list_parse(hw_resource_list_t *, hw_res_list_parsed_t *, int); 141 extern int hw_res_list_parse( 142 const hw_resource_list_t *, hw_res_list_parsed_t *, int); 142 143 extern int hw_res_get_list_parsed(async_sess_t *, hw_res_list_parsed_t *, int); 143 144 -
uspace/lib/c/include/ipc/dev_iface.h
r730dce77 r1bebadee 36 36 typedef enum { 37 37 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 38 44 /** Character device interface */ 39 45 CHAR_DEV_IFACE, -
uspace/lib/drv/Makefile
r730dce77 r1bebadee 29 29 30 30 USPACE_PREFIX = ../.. 31 EXTRA_CFLAGS = -Iinclude -I$(LIBUSB_PREFIX)/include 31 EXTRA_CFLAGS = -Iinclude -I$(LIBUSB_PREFIX)/include -I$(LIBPCM_PREFIX)/include 32 32 LIBRARY = libdrv 33 33 … … 38 38 generic/log.c \ 39 39 generic/logbuf.c \ 40 generic/remote_audio_mixer.c \ 41 generic/remote_audio_pcm.c \ 40 42 generic/remote_hw_res.c \ 41 43 generic/remote_char_dev.c \ -
uspace/lib/drv/generic/dev_iface.c
r730dce77 r1bebadee 46 46 #include "remote_usbhid.h" 47 47 #include "remote_pci.h" 48 #include "remote_audio_mixer.h" 49 #include "remote_audio_pcm.h" 48 50 #include "remote_ahci.h" 49 51 50 static iface_dipatch_table_t remote_ifaces = {52 static const iface_dipatch_table_t remote_ifaces = { 51 53 .ifaces = { 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 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, 60 64 } 61 65 }; -
uspace/lib/drv/generic/remote_hw_res.c
r730dce77 r1bebadee 1 1 /* 2 2 * Copyright (c) 2010 Lenka Trochtova 3 * Copyright (c) 2011 Jan Vesely 3 4 * All rights reserved. 4 5 * … … 43 44 static void remote_hw_res_enable_interrupt(ddf_fun_t *, void *, ipc_callid_t, 44 45 ipc_call_t *); 46 static void remote_hw_res_dma_channel_setup(ddf_fun_t *, void *, ipc_callid_t, 47 ipc_call_t *); 45 48 46 49 static remote_iface_func_ptr_t remote_hw_res_iface_ops [] = { 47 &remote_hw_res_get_resource_list, 48 &remote_hw_res_enable_interrupt 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, 49 53 }; 50 54 … … 94 98 } 95 99 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 96 119 /** 97 120 * @} -
uspace/srv/locsrv/locsrv.c
r730dce77 r1bebadee 1368 1368 categ_dir_add_cat(&cdir, cat); 1369 1369 1370 cat = category_new("audio-pcm"); 1371 categ_dir_add_cat(&cdir, cat); 1372 1370 1373 return true; 1371 1374 }
Note:
See TracChangeset
for help on using the changeset viewer.