Changes in / [f4d5f90:d9f8dd13] in mainline
- Files:
-
- 14 deleted
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/boot/vesa_real.inc
rf4d5f90 rd9f8dd13 374 374 xor %ebx, %ebx 375 375 xor %edx, %edx 376 xor %edi, %edi376 mov $0xffffffff, %edi 377 377 378 378 jz vesa_leave_real /* force relative jump */ -
kernel/arch/ia64/src/start.S
rf4d5f90 rd9f8dd13 174 174 mov ar.bspstore = r8 175 175 loadrs 176 176 177 177 # 178 178 # Initialize memory stack to some sane value and allocate a scratch area … … 196 196 srlz.i 197 197 srlz.d ;; 198 198 199 199 br.call.sptk.many b0 = arch_pre_main 200 200 0: -
uspace/Makefile
rf4d5f90 rd9f8dd13 121 121 drv/bus/usb/vhc \ 122 122 drv/nic/lo \ 123 drv/nic/ne2k \ 124 drv/nic/e1k 123 drv/nic/ne2k 125 124 126 125 ifeq ($(CONFIG_PCC),y) -
uspace/lib/c/Makefile
rf4d5f90 rd9f8dd13 70 70 generic/device/char_dev.c \ 71 71 generic/device/nic.c \ 72 generic/device/pci.c \73 72 generic/elf/elf_load.c \ 74 73 generic/event.c \ -
uspace/lib/c/generic/async.c
rf4d5f90 rd9f8dd13 1846 1846 1847 1847 fibril_mutex_lock(&async_sess_mutex); 1848 1848 1849 1849 int rc = async_hangup_internal(sess->phone); 1850 1850 -
uspace/lib/c/generic/ddi.c
rf4d5f90 rd9f8dd13 75 75 } 76 76 77 int dmamem_map(dmamem_t *dmamem, size_t pages, unsigned int map_flags,78 unsigned int dma_flags)79 {80 // FIXME TODO81 return -1;82 }83 84 int dmamem_unmap(dmamem_t *dmamem)85 {86 // FIXME TODO87 return -1;88 }89 90 int dmamem_lock(void *virt, void **phys, size_t pages)91 {92 // FIXME TODO93 return -1;94 }95 96 int dmamem_unlock(void *virt, size_t pages)97 {98 // FIXME TODO99 return -1;100 }101 102 77 /** Enable I/O space range to task. 103 78 * 104 79 * Caller of this function must have the IO_MEM_MANAGER capability. 105 80 * 106 * @param id 107 * @param ioaddr 108 * @param size 81 * @param id Task ID. 82 * @param ioaddr Starting address of the I/O range. 83 * @param size Size of the range. 109 84 * 110 * @return EOK on success 111 * @return EPERM if the caller lacks the CAP_IO_MANAGER capability 112 * @return ENOENT if there is no task with specified ID 113 * @return ENOMEM if there was some problem in allocating memory. 114 * 85 * @return 0 on success, EPERM if the caller lacks the 86 * CAP_IO_MANAGER capability, ENOENT if there is no task 87 * with specified ID and ENOMEM if there was some problem 88 * in allocating memory. 115 89 */ 116 90 int iospace_enable(task_id_t id, void *ioaddr, unsigned long size) 117 91 { 118 92 ddi_ioarg_t arg; 119 93 120 94 arg.task_id = id; 121 95 arg.ioaddr = ioaddr; 122 96 arg.size = size; 123 97 124 98 return __SYSCALL1(SYS_IOSPACE_ENABLE, (sysarg_t) &arg); 125 99 } … … 127 101 /** Enable PIO for specified I/O range. 128 102 * 129 * @param pio_addr 130 * @param size 131 * @param use_addr Address where the final address for132 * application's PIOwill be stored.103 * @param pio_addr I/O start address. 104 * @param size Size of the I/O region. 105 * @param use_addr Address where the final address for application's PIO 106 * will be stored. 133 107 * 134 * @return Zero on success or negative error code. 135 * 108 * @return Zero on success or negative error code. 136 109 */ 137 110 int pio_enable(void *pio_addr, size_t size, void **use_addr) … … 141 114 size_t offset; 142 115 unsigned int pages; 143 116 144 117 #ifdef IO_SPACE_BOUNDARY 145 118 if (pio_addr < IO_SPACE_BOUNDARY) { … … 148 121 } 149 122 #endif 150 123 151 124 phys = (void *) ALIGN_DOWN((uintptr_t) pio_addr, PAGE_SIZE); 152 125 offset = pio_addr - phys; -
uspace/lib/c/generic/device/nic.c
rf4d5f90 rd9f8dd13 895 895 * 896 896 */ 897 int nic_vlan_set_tag(async_sess_t *dev_sess, uint16_t tag, bool add, boolstrip)897 int nic_vlan_set_tag(async_sess_t *dev_sess, uint16_t tag, int add, int strip) 898 898 { 899 899 async_exch_t *exch = async_exchange_begin(dev_sess); -
uspace/lib/c/include/bitops.h
rf4d5f90 rd9f8dd13 40 40 /** Mask with bit @a n set. */ 41 41 #define BIT_V(type, n) \ 42 ((type) 42 ((type)1 << (n)) 43 43 44 44 /** Mask with rightmost @a n bits set. */ -
uspace/lib/c/include/ddi.h
rf4d5f90 rd9f8dd13 40 40 #include <task.h> 41 41 42 typedef struct {43 /** Physical memory */44 void *phys;45 46 /** Virtual memory */47 void *virt;48 49 /** Size in pages */50 size_t size;51 52 /** Mapping flags */53 unsigned int flags;54 } dmamem_t;55 56 42 extern int device_assign_devno(void); 57 43 extern int physmem_map(void *, void *, size_t, unsigned int); 58 extern int dmamem_map(dmamem_t *, size_t, unsigned int, unsigned int);59 extern int dmamem_unmap(dmamem_t *);60 extern int dmamem_lock(void *, void **, size_t);61 extern int dmamem_unlock(void *, size_t);62 44 extern int iospace_enable(task_id_t, void *, unsigned long); 63 45 extern int pio_enable(void *, size_t, void **); -
uspace/lib/c/include/device/nic.h
rf4d5f90 rd9f8dd13 127 127 extern int nic_vlan_get_mask(async_sess_t *, nic_vlan_mask_t *); 128 128 extern int nic_vlan_set_mask(async_sess_t *, const nic_vlan_mask_t *); 129 extern int nic_vlan_set_tag(async_sess_t *, uint16_t, bool, bool);129 extern int nic_vlan_set_tag(async_sess_t *, uint16_t, int, int); 130 130 131 131 extern int nic_wol_virtue_add(async_sess_t *, nic_wv_type_t, const void *, -
uspace/lib/c/include/ipc/net.h
rf4d5f90 rd9f8dd13 305 305 * 306 306 */ 307 #define IPC_GET_DEVICE_HANDLE(call) 307 #define IPC_GET_DEVICE_HANDLE(call) ((devman_handle_t) IPC_GET_ARG2(call)) 308 308 309 309 /** Return the device driver service message argument. -
uspace/lib/c/include/net/device.h
rf4d5f90 rd9f8dd13 77 77 #define NIC_PART_NUMBER_MAX_LENGTH 64 78 78 #define NIC_SERIAL_NUMBER_MAX_LENGTH 64 79 80 #define NIC_DEFECTIVE_LONG 0x000181 #define NIC_DEFECTIVE_SHORT 0x000282 #define NIC_DEFECTIVE_BAD_CRC 0x001083 #define NIC_DEFECTIVE_BAD_IPV4_CHECKSUM 0x002084 #define NIC_DEFECTIVE_BAD_IPV6_CHECKSUM 0x004085 #define NIC_DEFECTIVE_BAD_TCP_CHECKSUM 0x008086 #define NIC_DEFECTIVE_BAD_UDP_CHECKSUM 0x010087 79 88 80 /** -
uspace/lib/drv/generic/remote_nic.c
rf4d5f90 rd9f8dd13 829 829 830 830 uint16_t tag = (uint16_t) IPC_GET_ARG2(*call); 831 booladd = (int) IPC_GET_ARG3(*call);832 boolstrip = (int) IPC_GET_ARG4(*call);831 int add = (int) IPC_GET_ARG3(*call); 832 int strip = (int) IPC_GET_ARG4(*call); 833 833 834 834 int rc = nic_iface->vlan_set_tag(dev, tag, add, strip); -
uspace/lib/drv/include/ops/nic.h
rf4d5f90 rd9f8dd13 89 89 int (*vlan_get_mask)(ddf_fun_t *, nic_vlan_mask_t *); 90 90 int (*vlan_set_mask)(ddf_fun_t *, const nic_vlan_mask_t *); 91 int (*vlan_set_tag)(ddf_fun_t *, uint16_t, bool, bool);91 int (*vlan_set_tag)(ddf_fun_t *, uint16_t, int, int); 92 92 93 93 int (*wol_virtue_add)(ddf_fun_t *, nic_wv_type_t, const void *, -
uspace/lib/nic/include/nic.h
rf4d5f90 rd9f8dd13 275 275 276 276 /* Packet DMA lock */ 277 extern void * nic_dma_lock_packet(packet_t *);278 extern int nic_dma_unlock_packet(packet_t *);277 extern void * nic_dma_lock_packet(packet_t * packet); 278 extern void nic_dma_unlock_packet(packet_t * packet); 279 279 280 280 #endif // __NIC_H__ -
uspace/lib/nic/src/nic_driver.c
rf4d5f90 rd9f8dd13 1329 1329 } 1330 1330 1331 // FIXME: Later 1332 #if 0 1333 1331 1334 /** Lock packet for DMA usage 1332 1335 * … … 1337 1340 { 1338 1341 void *phys_addr; 1339 int rc = dmamem_lock(packet, &phys_addr, 1); 1342 size_t locked; 1343 int rc = dma_lock(packet, &phys_addr, 1, &locked); 1340 1344 if (rc != EOK) 1341 1345 return NULL; 1342 1346 1347 assert(locked == 1); 1343 1348 return phys_addr; 1344 1349 } … … 1348 1353 * @param packet 1349 1354 */ 1350 int nic_dma_unlock_packet(packet_t *packet) 1351 { 1352 return dmamem_unlock(packet, 1); 1353 } 1355 void nic_dma_unlock_packet(packet_t *packet) 1356 { 1357 size_t unlocked; 1358 int rc = dma_unlock(packet, 1, &unlocked); 1359 if (rc != EOK) 1360 return; 1361 1362 assert(unlocked == 1); 1363 } 1364 1365 #endif 1354 1366 1355 1367 /** @} -
uspace/lib/usbhost/Makefile
rf4d5f90 rd9f8dd13 32 32 -I$(LIBUSB_PREFIX)/include \ 33 33 -I$(LIBDRV_PREFIX)/include \ 34 -Iinclude 34 -Iinclude 35 35 36 36 SOURCES = \ -
uspace/srv/fs/exfat/exfat_bitmap.c
rf4d5f90 rd9f8dd13 45 45 #include <assert.h> 46 46 #include <fibril_synch.h> 47 #include <malloc.h> 47 48 #include <mem.h> 48 49 -
uspace/srv/fs/exfat/exfat_dentry.c
rf4d5f90 rd9f8dd13 101 101 bool exfat_valid_char(wchar_t ch) 102 102 { 103 switch (ch) { 104 case 0x01 ... 0x1F: 105 case '/': 106 case '\\': 107 case '?': 108 case '|': 109 case '>': 110 case '<': 111 case '"': 112 case '*': 113 case ':': 114 return false; 115 default: 116 return true; 117 } 103 /* TODO */ 104 return true; 118 105 } 119 106 120 107 bool exfat_valid_name(const char *name) 121 108 { 122 size_t off = 0; 123 wchar_t ch; 124 125 while ((ch = str_decode(name, &off, STR_NO_LIMIT)) != 0) { 126 if (!exfat_valid_char(ch)) 127 return false; 128 } 109 /* TODO */ 129 110 return true; 130 111 } -
uspace/srv/fs/exfat/exfat_directory.c
rf4d5f90 rd9f8dd13 112 112 rc = block_put(di->b); 113 113 di->b = NULL; 114 if (rc != EOK)115 return rc;116 114 } 117 115 if (!di->b) { … … 268 266 if (idx == 2 || idx == 3) 269 267 continue; 270 checksum = ((checksum << 15) | (checksum >> 1)) + 271 (uint16_t)bytes[idx]; 268 checksum = ((checksum << 15) | (checksum >> 1)) + (uint16_t)bytes[idx]; 272 269 } 273 270 return checksum; … … 313 310 array[1].stream.valid_data_size = host2uint64_t_le(ds->valid_data_size); 314 311 array[1].stream.data_size = host2uint64_t_le(ds->data_size); 315 array[0].file.checksum = 316 host2uint16_t_le(exfat_directory_set_checksum((uint8_t *)array, 312 array[0].file.checksum = host2uint16_t_le(exfat_directory_set_checksum((uint8_t *)array, 317 313 count * sizeof(exfat_dentry_t))); 318 314 … … 356 352 uctablep = EXFAT_NODE(fn); 357 353 358 uctable_chars = ALIGN_DOWN(uctablep->size, 359 sizeof(uint16_t)) / sizeof(uint16_t); 354 uctable_chars = ALIGN_DOWN(uctablep->size, sizeof(uint16_t)) / sizeof(uint16_t); 360 355 uctable = (uint16_t *) malloc(uctable_chars * sizeof(uint16_t)); 361 356 rc = exfat_read_uctable(di->bs, uctablep, (uint8_t *)uctable); … … 422 417 return rc; 423 418 424 if (i == df.file.count - 2) { 425 chars = ds.stream.name_size - 426 EXFAT_NAME_PART_LEN*(df.file.count - 2); 427 } 428 419 if (i == df.file.count - 2) 420 chars = ds.stream.name_size - EXFAT_NAME_PART_LEN*(df.file.count - 2); 429 421 rc = exfat_directory_get(di, &de); 430 422 if (rc != EOK) -
uspace/srv/fs/exfat/exfat_fat.c
rf4d5f90 rd9f8dd13 50 50 #include <malloc.h> 51 51 #include <mem.h> 52 #include <str.h>53 52 54 53 … … 323 322 (found == 0) ? EXFAT_CLST_EOF : lifo[found - 1]); 324 323 if (rc != EOK) 325 goto exit_error;324 break; 326 325 found++; 327 326 rc = bitmap_set_cluster(bs, service_id, clst); 328 327 if (rc != EOK) 329 goto exit_error;328 break; 330 329 331 330 } … … 340 339 } 341 340 342 rc = ENOSPC;343 344 exit_error:345 346 341 /* If something wrong - free the clusters */ 347 342 while (found--) { … … 352 347 free(lifo); 353 348 fibril_mutex_unlock(&exfat_alloc_lock); 354 return rc;349 return ENOSPC; 355 350 } 356 351 … … 542 537 int exfat_sanity_check(exfat_bs_t *bs, service_id_t service_id) 543 538 { 544 if (str_cmp((char const *)bs->oem_name, "EXFAT ")) 545 return ENOTSUP; 546 else if (uint16_t_le2host(bs->signature) != 0xAA55) 547 return ENOTSUP; 548 else if (uint32_t_le2host(bs->fat_sector_count) == 0) 549 return ENOTSUP; 550 else if (uint32_t_le2host(bs->data_clusters) == 0) 551 return ENOTSUP; 552 else if (bs->fat_count != 1) 553 return ENOTSUP; 554 else if ((bs->bytes_per_sector + bs->sec_per_cluster) > 25) { 555 /* exFAT does not support cluster size > 32 Mb */ 556 return ENOTSUP; 557 } 539 /* TODO */ 558 540 return EOK; 559 541 } -
uspace/srv/fs/exfat/exfat_ops.c
rf4d5f90 rd9f8dd13 657 657 return rc; 658 658 } 659 660 rc = exfat_zero_cluster(bs, service_id, nodep->firstc);661 if (rc != EOK) {662 (void) exfat_node_put(FS_NODE(nodep));663 return rc;664 }665 666 659 nodep->size = BPC(bs); 667 660 } else { … … 746 739 */ 747 740 rc = exfat_directory_write_file(&di, name); 748 if (rc != EOK) { 749 (void) exfat_directory_close(&di); 750 fibril_mutex_unlock(&parentp->idx->lock); 751 return rc; 752 } 741 if (rc != EOK) 742 return rc; 753 743 rc = exfat_directory_close(&di); 754 if (rc != EOK) { 755 fibril_mutex_unlock(&parentp->idx->lock); 756 return rc; 757 } 744 if (rc != EOK) 745 return rc; 758 746 759 747 fibril_mutex_unlock(&parentp->idx->lock); … … 1270 1258 exfat_directory_t di; 1271 1259 rc = exfat_directory_open(nodep, &di); 1272 if (rc != EOK) 1273 goto err; 1274 1260 if (rc != EOK) goto err; 1275 1261 rc = exfat_directory_seek(&di, pos); 1276 1262 if (rc != EOK) { … … 1282 1268 &df, &ds); 1283 1269 if (rc == EOK) 1284 goto hit; 1285 else if (rc == ENOENT) 1286 goto miss; 1287 1288 (void) exfat_directory_close(&di); 1270 goto hit; 1271 if (rc == ENOENT) 1272 goto miss; 1289 1273 1290 1274 err: … … 1295 1279 miss: 1296 1280 rc = exfat_directory_close(&di); 1297 if (rc !=EOK)1281 if (rc!=EOK) 1298 1282 goto err; 1299 1283 rc = exfat_node_put(fn); … … 1413 1397 1414 1398 (void) async_data_write_finalize(callid, 1415 1399 b->data + pos % BPS(bs), bytes); 1416 1400 b->dirty = true; /* need to sync block */ 1417 1401 rc = block_put(b);
Note:
See TracChangeset
for help on using the changeset viewer.