Changeset 848e880f in mainline


Ignore:
Timestamp:
2018-06-10T19:30:53Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fe96085
Parents:
121ee4fd
Message:

Let pio_enable_resource return physical address

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/pci/pciintel/pci.c

    r121ee4fd r848e880f  
    739739                if (pio_enable_resource(&bus->pio_win,
    740740                    &hw_resources.resources[0], (void **) &bus->conf_space,
    741                     NULL)) {
     741                    NULL, NULL)) {
    742742                        ddf_msg(LVL_ERROR,
    743743                            "Failed to map configuration space.");
     
    760760                if (pio_enable_resource(&bus->pio_win,
    761761                    &hw_resources.resources[0], (void **) &bus->conf_addr_reg,
    762                     NULL)) {
     762                    NULL, NULL)) {
    763763                        ddf_msg(LVL_ERROR,
    764764                            "Failed to enable configuration ports.");
     
    768768                if (pio_enable_resource(&bus->pio_win,
    769769                    &hw_resources.resources[1], (void **) &bus->conf_data_reg,
    770                     NULL)) {
     770                    NULL, NULL)) {
    771771                        ddf_msg(LVL_ERROR,
    772772                            "Failed to enable configuration ports.");
  • uspace/lib/c/generic/ddi.c

    r121ee4fd r848e880f  
    224224 * @param res        Resources specifying the I/O range wrt. to the PIO window.
    225225 * @param[out] virt  Virtual address for application's PIO operations.
     226 * @param[out] phys  If non-NULL, physical address of the resource
    226227 * @param[out] size  If non-NULL, size of the enabled resource.
    227228 *
     
    231232 */
    232233errno_t pio_enable_resource(pio_window_t *win, hw_resource_t *res, void **virt,
    233     size_t *size)
     234    uintptr_t *phys, size_t *size)
    234235{
    235236        uintptr_t addr;
     
    259260        }
    260261
     262        if (phys)
     263                *phys = addr;
    261264        if (size)
    262265                *size = sz;
  • uspace/lib/c/include/ddi.h

    r121ee4fd r848e880f  
    6666extern errno_t pio_enable_range(addr_range_t *, void **);
    6767extern errno_t pio_enable_resource(pio_window_t *, hw_resource_t *, void **,
    68     size_t *);
     68    uintptr_t *, size_t *);
    6969extern errno_t pio_enable(void *, size_t, void **);
    7070extern errno_t pio_disable(void *, size_t);
  • uspace/lib/virtio/virtio-pci.c

    r121ee4fd r848e880f  
    151151                hw_resource_t *res = &hw_res.resources[j];
    152152                rc = pio_enable_resource(&pio_window, res,
    153                     &vdev->bar[i].mapped_base, &vdev->bar[i].mapped_size);
     153                    &vdev->bar[i].mapped_base, &vdev->bar[i].phys_base,
     154                    &vdev->bar[i].mapped_size);
    154155                if (rc == EOK)
    155156                        vdev->bar[i].mapped = true;
  • uspace/lib/virtio/virtio-pci.h

    r121ee4fd r848e880f  
    152152        struct {
    153153                bool mapped;
     154                uintptr_t phys_base;
    154155                void *mapped_base;
    155156                size_t mapped_size;
Note: See TracChangeset for help on using the changeset viewer.