- Timestamp:
- 2019-01-03T06:53:22Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 043d464f
- Parents:
- b4a4ad94 (diff), 7acd787 (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.
- Location:
- uspace
- Files:
- 
      - 9 added
- 10 edited
 
 - 
          
  Makefile (modified) (1 diff)
- 
          
  app/bdsh/cmds/modules/ls/ls.c (modified) (1 diff)
- 
          
  app/pci/Makefile (added)
- 
          
  app/pci/doc/doxygroups.h (added)
- 
          
  app/pci/pci.c (added)
- 
          
  drv/bus/pci/pciintel/Makefile (modified) (1 diff)
- 
          
  drv/bus/pci/pciintel/ctl.c (added)
- 
          
  drv/bus/pci/pciintel/ctl.h (added)
- 
          
  drv/bus/pci/pciintel/pci.c (modified) (8 diffs)
- 
          
  drv/bus/pci/pciintel/pci.h (modified) (4 diffs)
- 
          
  lib/c/Makefile (modified) (1 diff)
- 
          
  lib/c/generic/io/chargrid.c (modified) (1 diff)
- 
          
  lib/c/generic/pci.c (added)
- 
          
  lib/c/include/ipc/pci.h (added)
- 
          
  lib/c/include/pci.h (added)
- 
          
  lib/c/include/types/pci.h (added)
- 
          
  lib/clui/tinput.c (modified) (5 diffs)
- 
          
  srv/locsrv/locsrv.c (modified) (1 diff)
- 
          
  srv/vfs/vfs_ops.c (modified) (1 diff)
 
Legend:
- Unmodified
- Added
- Removed
- 
      uspace/Makefilerb4a4ad94 rb9f1585 67 67 app/netecho \ 68 68 app/nterm \ 69 app/pci \ 69 70 app/perf \ 70 71 app/redir \ 
- 
      uspace/app/bdsh/cmds/modules/ls/ls.crb4a4ad94 rb9f1585 199 199 200 200 /* Populate the directory list. */ 201 if (ls.recursive ) {201 if (ls.recursive && nbdirs > 0) { 202 202 tmp = (struct dir_elem_t *) realloc(*dir_list_ptr, 203 203 nbdirs * sizeof(struct dir_elem_t)); 
- 
      uspace/drv/bus/pci/pciintel/Makefilerb4a4ad94 rb9f1585 32 32 33 33 SOURCES = \ 34 ctl.c \ 34 35 pci.c 35 36 
- 
      uspace/drv/bus/pci/pciintel/pci.crb4a4ad94 rb9f1585 1 1 /* 2 * Copyright (c) 2019 Jiri Svoboda 2 3 * Copyright (c) 2010 Lenka Trochtova 3 * Copyright (c) 2018 Jiri Svoboda4 4 * All rights reserved. 5 5 * … … 58 58 #include <pci_dev_iface.h> 59 59 60 #include "ctl.h" 60 61 #include "pci.h" 62 #include "pci_regs.h" 61 63 62 64 #define NAME "pciintel" … … 73 75 74 76 /** Obtain PCI bus soft-state from DDF device node */ 75 #if 0 76 static pci_bus_t *pci_bus(ddf_dev_t *dnode) 77 pci_bus_t *pci_bus(ddf_dev_t *dnode) 77 78 { 78 79 return ddf_dev_data_get(dnode); 79 80 } 80 #endif81 81 82 82 /** Obtain PCI bus soft-state from function soft-state */ … … 448 448 449 449 /* TODO add subsys ids, but those exist only in header type 0 */ 450 } 451 452 /** Get first PCI function. 453 * 454 * @param bus PCI bus 455 * @return First PCI function on @a bus or @c NULL if there is none 456 */ 457 pci_fun_t *pci_fun_first(pci_bus_t *bus) 458 { 459 link_t *link; 460 461 link = list_first(&bus->funs); 462 if (link == NULL) 463 return NULL; 464 465 return list_get_instance(link, pci_fun_t, lfuns); 466 } 467 468 /** Get next PCI function. 469 * 470 * @param cur Current function 471 * @return Next PCI function on the same bus or @c NULL if there is none 472 */ 473 pci_fun_t *pci_fun_next(pci_fun_t *cur) 474 { 475 link_t *link; 476 477 link = list_next(&cur->lfuns, &cur->busptr->funs); 478 if (link == NULL) 479 return NULL; 480 481 return list_get_instance(link, pci_fun_t, lfuns); 450 482 } 451 483 … … 691 723 continue; 692 724 } 725 726 list_append(&fun->lfuns, &bus->funs); 693 727 } 694 728 } … … 718 752 goto fail; 719 753 } 754 755 list_initialize(&bus->funs); 720 756 fibril_mutex_initialize(&bus->conf_mutex); 721 757 … … 802 838 } 803 839 840 ddf_fun_set_conn_handler(ctl, pci_ctl_connection); 841 804 842 /* Enumerate functions. */ 805 843 ddf_msg(LVL_DEBUG, "Enumerating the bus"); … … 816 854 } 817 855 856 rc = ddf_fun_add_to_category(ctl, "pci"); 857 if (rc != EOK) { 858 ddf_msg(LVL_ERROR, "Failed adding control function to category " 859 "'pci'."); 860 goto fail; 861 } 862 818 863 hw_res_clean_resource_list(&hw_resources); 819 864 
- 
      uspace/drv/bus/pci/pciintel/pci.hrb4a4ad94 rb9f1585 37 37 #define PCI_H_ 38 38 39 #include <adt/list.h> 40 #include <ddi.h> 39 41 #include <ddf/driver.h> 40 #include "pci_regs.h"42 #include <fibril_synch.h> 41 43 42 44 #define PCI_MAX_HW_RES 10 … … 50 52 pio_window_t pio_win; 51 53 fibril_mutex_t conf_mutex; 54 /** List of functions (of pci_fun_t) */ 55 list_t funs; 52 56 } pci_bus_t; 53 57 … … 55 59 pci_bus_t *busptr; 56 60 ddf_fun_t *fnode; 61 /** Link to @c busptr->funs */ 62 link_t lfuns; 57 63 58 64 int bus; … … 71 77 } pci_fun_t; 72 78 79 extern pci_bus_t *pci_bus(ddf_dev_t *); 80 73 81 extern void pci_fun_create_match_ids(pci_fun_t *); 82 extern pci_fun_t *pci_fun_first(pci_bus_t *); 83 extern pci_fun_t *pci_fun_next(pci_fun_t *); 74 84 75 85 extern uint8_t pci_conf_read_8(pci_fun_t *, int); 
- 
      uspace/lib/c/Makefilerb4a4ad94 rb9f1585 165 165 generic/assert.c \ 166 166 generic/bsearch.c \ 167 generic/pci.c \ 167 168 generic/pio_trace.c \ 168 169 generic/qsort.c \ 
- 
      uspace/lib/c/generic/io/chargrid.crb4a4ad94 rb9f1585 263 263 void chargrid_set_cursor(chargrid_t *scrbuf, sysarg_t col, sysarg_t row) 264 264 { 265 if (col >= scrbuf->cols || row >= scrbuf->rows) 266 return; 267 265 268 scrbuf->col = col; 266 269 scrbuf->row = row; 
- 
      uspace/lib/clui/tinput.crb4a4ad94 rb9f1585 56 56 } seek_dir_t; 57 57 58 static void tinput_update_origin(tinput_t *); 58 59 static void tinput_init(tinput_t *); 59 60 static void tinput_insert_string(tinput_t *, const char *); … … 71 72 static void tinput_console_set_lpos(tinput_t *ti, unsigned lpos) 72 73 { 73 console_set_pos(ti->console, LIN_TO_COL(ti, lpos), 74 LIN_TO_ROW(ti, lpos)); 74 unsigned col = LIN_TO_COL(ti, lpos); 75 unsigned row = LIN_TO_ROW(ti, lpos); 76 77 assert(col < ti->con_cols); 78 assert(row < ti->con_rows); 79 console_set_pos(ti->console, col, row); 75 80 } 76 81 … … 163 168 static void tinput_position_caret(tinput_t *ti) 164 169 { 170 tinput_update_origin(ti); 165 171 tinput_console_set_lpos(ti, ti->text_coord + ti->pos); 166 172 } … … 232 238 233 239 tinput_display_tail(ti, ti->pos - 1, 0); 234 tinput_update_origin(ti);235 240 tinput_position_caret(ti); 236 241 } … … 276 281 277 282 tinput_display_tail(ti, ti->pos - ilen, 0); 278 tinput_update_origin(ti);279 283 tinput_position_caret(ti); 280 284 } 
- 
      uspace/srv/locsrv/locsrv.crb4a4ad94 rb9f1585 1390 1390 categ_dir_add_cat(&cdir, cat); 1391 1391 1392 cat = category_new("pci"); 1393 categ_dir_add_cat(&cdir, cat); 1394 1392 1395 return true; 1393 1396 } 
- 
      uspace/srv/vfs/vfs_ops.crb4a4ad94 rb9f1585 892 892 rc = vfs_fd_alloc(&file, false, out_fd); 893 893 if (rc != EOK) { 894 fibril_rwlock_read_unlock(&namespace_rwlock); 894 895 vfs_node_put(node); 895 896 vfs_file_put(parent); 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  
