Changeset f2bbe8c in mainline


Ignore:
Timestamp:
2012-02-12T22:57:16Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
472d813
Parents:
e777847
Message:
  • Enforce PIO ranges no matter whether the address is in memory or in a

separate I/O space.

  • Be more exact when checking whether the accessed PIO register fits within one PIO range.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/irq.c

    re777847 rf2bbe8c  
    122122        for (i = 0; i < cmdcount; i++) {
    123123                uintptr_t addr;
     124                size_t size;
    124125
    125126                /* Process only commands that use an address. */
    126127                switch (cmds[i].cmd) {
    127128                case CMD_PIO_READ_8:
     129                case CMD_PIO_WRITE_8:
     130                case CMD_PIO_WRITE_A_8:
     131                        size = 1;
     132                        break;
    128133                case CMD_PIO_READ_16:
     134                case CMD_PIO_WRITE_16:
     135                case CMD_PIO_WRITE_A_16:
     136                        size = 2;
     137                        break;
    129138                case CMD_PIO_READ_32:
    130                 case CMD_PIO_WRITE_8:
    131                 case CMD_PIO_WRITE_16:
    132139                case CMD_PIO_WRITE_32:
    133                 case CMD_PIO_WRITE_A_8:
    134                 case CMD_PIO_WRITE_A_16:
    135140                case CMD_PIO_WRITE_A_32:
     141                        size = 4;
    136142                        break;
    137143                default:
     
    142148                addr = (uintptr_t) cmds[i].addr;
    143149               
    144                 /* Process only memory mapped PIO addresses. */
    145                 if ((void *) addr < IO_SPACE_BOUNDARY)
    146                         continue;
    147 
    148150                for (j = 0; j < rangecount; j++) {
    149151
    150152                        /* Find the matching range. */
    151                         if (!iswithin(pbase[j], ranges[j].size, addr, 1))
     153                        if (!iswithin(pbase[j], ranges[j].size, addr, size))
    152154                                continue;
    153155
Note: See TracChangeset for help on using the changeset viewer.