Changes in / [fbfe59d:2498b95] in mainline


Ignore:
Files:
8 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.common

    rfbfe59d r2498b95  
    139139        nic/rtl8169 \
    140140        nic/ar9271 \
    141         nic/virtio-net \
    142141        block/ahci
    143142
  • tools/ew.py

    rfbfe59d r2498b95  
    146146        return ' -device rtl8139,vlan=0'
    147147
    148 def qemu_nic_virtio_options():
    149         return ' -device virtio-net,vlan=0'
    150 
    151148def qemu_net_options():
    152149        if is_override('nonet'):
     
    161158                if 'ne2k' in overrides['net'].keys():
    162159                        nic_options += qemu_nic_ne2k_options()
    163                 if 'virtio-net' in overrides['net'].keys():
    164                         nic_options += qemu_nic_virtio_options()
    165160        else:
    166161                # Use the default NIC
     
    331326def usage():
    332327        print("%s - emulator wrapper for running HelenOS\n" % os.path.basename(sys.argv[0]))
    333         print("%s [-d] [-h] [-net e1k|rtl8139|ne2k|virtio-net] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" %
     328        print("%s [-d] [-h] [-net e1k|rtl8139|ne2k] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" %
    334329            os.path.basename(sys.argv[0]))
    335330        print("-d\tDry run: do not run the emulation, just print the command line.")
     
    365360                        elif sys.argv[i] == 'ne2k':
    366361                                overrides['net']['ne2k'] = True
    367                         elif sys.argv[i] == 'virtio-net':
    368                                 overrides['net']['virtio-net'] = True
    369362                        else:
    370363                                usage()
  • uspace/Makefile

    rfbfe59d r2498b95  
    181181        drv/nic/rtl8169 \
    182182        drv/nic/ar9271 \
    183         drv/nic/virtio-net \
    184183        drv/platform/amdm37x \
    185184        drv/platform/icp \
     
    252251        lib/bithenge \
    253252        lib/posix \
    254         lib/ieee80211 \
    255         lib/virtio
     253        lib/ieee80211
    256254
    257255BASE_BUILDS := $(addsuffix .build,$(BASE_LIBS))
  • uspace/drv/bus/pci/pciintel/pci.c

    rfbfe59d r2498b95  
    738738
    739739                if (pio_enable_resource(&bus->pio_win,
    740                     &hw_resources.resources[0], (void **) &bus->conf_space,
    741                     NULL, NULL)) {
     740                    &hw_resources.resources[0],
     741                    (void **) &bus->conf_space)) {
    742742                        ddf_msg(LVL_ERROR,
    743743                            "Failed to map configuration space.");
     
    759759
    760760                if (pio_enable_resource(&bus->pio_win,
    761                     &hw_resources.resources[0], (void **) &bus->conf_addr_reg,
    762                     NULL, NULL)) {
     761                    &hw_resources.resources[0],
     762                    (void **) &bus->conf_addr_reg)) {
    763763                        ddf_msg(LVL_ERROR,
    764764                            "Failed to enable configuration ports.");
     
    767767                }
    768768                if (pio_enable_resource(&bus->pio_win,
    769                     &hw_resources.resources[1], (void **) &bus->conf_data_reg,
    770                     NULL, NULL)) {
     769                    &hw_resources.resources[1],
     770                    (void **) &bus->conf_data_reg)) {
    771771                        ddf_msg(LVL_ERROR,
    772772                            "Failed to enable configuration ports.");
  • uspace/lib/c/generic/ddi.c

    rfbfe59d r2498b95  
    220220/** Enable PIO for specified HW resource wrt. to the PIO window.
    221221 *
    222  * @param win        PIO window. May be NULL if the resources are known to be
    223  *                   absolute.
    224  * @param res        Resources specifying the I/O range wrt. to the PIO window.
    225  * @param[out] virt  Virtual address for application's PIO operations.
    226  * @param[out] phys  If non-NULL, physical address of the resource
    227  * @param[out] size  If non-NULL, size of the enabled resource.
     222 * @param win      PIO window. May be NULL if the resources are known to be
     223 *                 absolute.
     224 * @param res      Resources specifying the I/O range wrt. to the PIO window.
     225 * @param virt     Virtual address for application's PIO operations.
    228226 *
    229227 * @return EOK on success.
     
    231229 *
    232230 */
    233 errno_t pio_enable_resource(pio_window_t *win, hw_resource_t *res, void **virt,
    234     uintptr_t *phys, size_t *size)
     231errno_t pio_enable_resource(pio_window_t *win, hw_resource_t *res, void **virt)
    235232{
    236233        uintptr_t addr;
    237         size_t sz;
     234        size_t size;
    238235
    239236        switch (res->type) {
     
    245242                        addr += win->io.base;
    246243                }
    247                 sz = res->res.io_range.size;
     244                size = res->res.io_range.size;
    248245                break;
    249246        case MEM_RANGE:
     
    254251                        addr += win->mem.base;
    255252                }
    256                 sz = res->res.mem_range.size;
     253                size = res->res.mem_range.size;
    257254                break;
    258255        default:
     
    260257        }
    261258
    262         if (phys)
    263                 *phys = addr;
    264         if (size)
    265                 *size = sz;
    266 
    267         return pio_enable((void *) addr, sz, virt);
     259        return pio_enable((void *) addr, size, virt);
    268260}
    269261
  • uspace/lib/c/include/ddi.h

    rfbfe59d r2498b95  
    4040#include <stdint.h>
    4141#include <sys/time.h>
    42 #include <byteorder.h>
    4342#include <abi/ddi/irq.h>
    4443#include <device/hw_res.h>
     
    6564
    6665extern errno_t pio_enable_range(addr_range_t *, void **);
    67 extern errno_t pio_enable_resource(pio_window_t *, hw_resource_t *, void **,
    68     uintptr_t *, size_t *);
     66extern errno_t pio_enable_resource(pio_window_t *, hw_resource_t *, void **);
    6967extern errno_t pio_enable(void *, size_t, void **);
    7068extern errno_t pio_disable(void *, size_t);
     
    8684extern uint32_t pio_read_32(const ioport32_t *);
    8785extern uint64_t pio_read_64(const ioport64_t *);
    88 
    89 static inline void pio_write_le16(ioport16_t *reg, uint16_t val)
    90 {
    91         pio_write_16(reg, host2uint16_t_le(val));
    92 }
    93 static inline void pio_write_be16(ioport16_t *reg, uint16_t val)
    94 {
    95         pio_write_16(reg, host2uint16_t_be(val));
    96 }
    97 static inline void pio_write_le32(ioport32_t *reg, uint32_t val)
    98 {
    99         pio_write_32(reg, host2uint32_t_le(val));
    100 }
    101 static inline void pio_write_be32(ioport32_t *reg, uint32_t val)
    102 {
    103         pio_write_32(reg, host2uint32_t_be(val));
    104 }
    105 static inline void pio_write_le64(ioport64_t *reg, uint64_t val)
    106 {
    107         pio_write_64(reg, host2uint64_t_le(val));
    108 }
    109 static inline void pio_write_be64(ioport64_t *reg, uint64_t val)
    110 {
    111         pio_write_64(reg, host2uint64_t_be(val));
    112 }
    113 
    114 static inline uint16_t pio_read_le16(const ioport16_t *reg)
    115 {
    116         return uint16_t_le2host(pio_read_16(reg));
    117 }
    118 static inline uint16_t pio_read_be16(const ioport16_t *reg)
    119 {
    120         return uint16_t_be2host(pio_read_16(reg));
    121 }
    122 static inline uint32_t pio_read_le32(const ioport32_t *reg)
    123 {
    124         return uint32_t_le2host(pio_read_32(reg));
    125 }
    126 static inline uint32_t pio_read_be32(const ioport32_t *reg)
    127 {
    128         return uint32_t_be2host(pio_read_32(reg));
    129 }
    130 static inline uint64_t pio_read_le64(const ioport64_t *reg)
    131 {
    132         return uint64_t_le2host(pio_read_64(reg));
    133 }
    134 static inline uint64_t pio_read_be64(const ioport64_t *reg)
    135 {
    136         return uint64_t_be2host(pio_read_64(reg));
    137 }
    13886
    13987static inline uint8_t pio_change_8(ioport8_t *reg, uint8_t val, uint8_t mask,
  • uspace/lib/drv/include/pci_dev_iface.h

    rfbfe59d r2498b95  
    4242#define PCI_VENDOR_ID   0x00
    4343#define PCI_DEVICE_ID   0x02
    44 #define PCI_STATUS      0x06
    4544#define PCI_SUB_CLASS   0x0A
    4645#define PCI_BASE_CLASS  0x0B
    47 #define PCI_BAR0        0x10
    48 #define PCI_CAP_PTR     0x34
    49 
    50 #define PCI_BAR_COUNT   6
    51 
    52 #define PCI_STATUS_CAP_LIST     (1 << 4)
    53 
    54 #define PCI_CAP_ID(c)   ((c) + 0x0)
    55 #define PCI_CAP_NEXT(c) ((c) + 0x1)
    56 
    57 #define PCI_CAP_PMID            0x1
    58 #define PCI_CAP_VENDORSPECID    0x9
    5946
    6047extern errno_t pci_config_space_read_8(async_sess_t *, uint32_t, uint8_t *);
     
    6552extern errno_t pci_config_space_write_16(async_sess_t *, uint32_t, uint16_t);
    6653extern errno_t pci_config_space_write_32(async_sess_t *, uint32_t, uint32_t);
    67 
    68 static inline errno_t
    69 pci_config_space_cap_first(async_sess_t *sess, uint8_t *c, uint8_t *id)
    70 {
    71         errno_t rc;
    72         uint16_t status;
    73 
    74         rc = pci_config_space_read_16(sess, PCI_STATUS, &status);
    75         if (rc != EOK)
    76                 return rc;
    77 
    78         if (!(status & PCI_STATUS_CAP_LIST)) {
    79                 *c = 0;
    80                 return EOK;
    81         }
    82 
    83         rc = pci_config_space_read_8(sess, PCI_CAP_PTR, c);
    84         if (rc != EOK)
    85                 return rc;
    86         if (!c)
    87                 return EOK;
    88         return pci_config_space_read_8(sess, PCI_CAP_ID(*c), id);
    89 }
    90 
    91 static inline errno_t
    92 pci_config_space_cap_next(async_sess_t *sess, uint8_t *c, uint8_t *id)
    93 {
    94         errno_t rc = pci_config_space_read_8(sess, PCI_CAP_NEXT(*c), c);
    95         if (rc != EOK)
    96                 return rc;
    97         if (!c)
    98                 return EOK;
    99         return pci_config_space_read_8(sess, PCI_CAP_ID(*c), id);
    100 }
    10154
    10255/** PCI device communication interface. */
Note: See TracChangeset for help on using the changeset viewer.