Ignore:
Timestamp:
2019-03-31T19:24:35Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
124bc22, d6dc9a12
Parents:
f27e21d
Message:

dsrlnout_init() needs to get physical address too

The IO address we are passing into dsrlnout_init() should not be a
kernel-identity virtual address, because the device memory should not be
cacheable. Therefore, the function cannot use KA2PA to translate it
back to physical address when creating the parea.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/drivers/dsrln/dsrlnout.c

    rf27e21d re064102  
    6868};
    6969
    70 outdev_t *dsrlnout_init(ioport8_t *base)
     70outdev_t *dsrlnout_init(ioport8_t *base, uintptr_t base_phys)
    7171{
    7272        outdev_t *dsrlndev = malloc(sizeof(outdev_t));
     
    8585        instance->base = base;
    8686        ddi_parea_init(&instance->parea);
    87         instance->parea.pbase = KA2PA(base);
     87        instance->parea.pbase = base_phys;
    8888        instance->parea.frames = 1;
    8989        instance->parea.unpriv = false;
Note: See TracChangeset for help on using the changeset viewer.