Changeset e064102 in mainline


Ignore:
Timestamp:
2019-03-31T19:24:35Z (5 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.

Location:
kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/mach/msim/msim.c

    rf27e21d re064102  
    8181{
    8282#ifdef CONFIG_MSIM_PRN
    83         outdev_t *dsrlndev = dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS);
     83        outdev_t *dsrlndev = dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS,
     84            KSEG12PA(MSIM_KBD_ADDRESS));
    8485        if (dsrlndev)
    8586                stdout_wire(dsrlndev);
  • kernel/genarch/include/genarch/drivers/dsrln/dsrlnout.h

    rf27e21d re064102  
    3939
    4040#include <typedefs.h>
     41#include <stdint.h>
    4142#include <console/chardev.h>
    4243
    43 extern outdev_t *dsrlnout_init(ioport8_t *);
     44extern outdev_t *dsrlnout_init(ioport8_t *, uintptr_t);
    4445
    4546#endif
  • 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.