Subversion Repositories HelenOS

Rev

Rev 2471 | Rev 3657 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2471 Rev 2626
Line 87... Line 87...
87
            break;
87
            break;
88
        case CMD_MEM_WRITE_1:
88
        case CMD_MEM_WRITE_1:
89
            *((uint8_t *) code->cmds[i].addr) = code->cmds[i].value;
89
            *((uint8_t *) code->cmds[i].addr) = code->cmds[i].value;
90
            break;
90
            break;
91
        case CMD_MEM_WRITE_2:
91
        case CMD_MEM_WRITE_2:
92
            *((uint16_t *) code->cmds[i].addr) = code->cmds[i].value;
92
            *((uint16_t *) code->cmds[i].addr) =
-
 
93
                code->cmds[i].value;
93
            break;
94
            break;
94
        case CMD_MEM_WRITE_4:
95
        case CMD_MEM_WRITE_4:
95
            *((uint32_t *) code->cmds[i].addr) = code->cmds[i].value;
96
            *((uint32_t *) code->cmds[i].addr) =
-
 
97
                code->cmds[i].value;
96
            break;
98
            break;
97
        case CMD_MEM_WRITE_8:
99
        case CMD_MEM_WRITE_8:
98
            *((uint64_t *) code->cmds[i].addr) = code->cmds[i].value;
100
            *((uint64_t *) code->cmds[i].addr) =
-
 
101
                code->cmds[i].value;
99
            break;
102
            break;
100
#if defined(ia32) || defined(amd64)
103
#if defined(ia32) || defined(amd64)
101
        case CMD_PORT_READ_1:
104
        case CMD_PORT_READ_1:
102
            dstval = inb((long) code->cmds[i].addr);
105
            dstval = inb((long) code->cmds[i].addr);
103
            break;
106
            break;
Line 116... Line 119...
116
            break;
119
            break;
117
#endif
120
#endif
118
        default:
121
        default:
119
            break;
122
            break;
120
        }
123
        }
121
        if (code->cmds[i].dstarg && code->cmds[i].dstarg < 4) {
124
        if (code->cmds[i].dstarg && code->cmds[i].dstarg <
-
 
125
            IPC_CALL_LEN) {
122
            call->data.args[code->cmds[i].dstarg] = dstval;
126
            call->data.args[code->cmds[i].dstarg] = dstval;
123
        }
127
        }
124
    }
128
    }
125
}
129
}
126
 
130
 
Line 280... Line 284...
280
 *
284
 *
281
 * @param irq       IRQ structure.
285
 * @param irq       IRQ structure.
282
 * @param a1        Driver-specific payload argument.
286
 * @param a1        Driver-specific payload argument.
283
 * @param a2        Driver-specific payload argument.
287
 * @param a2        Driver-specific payload argument.
284
 * @param a3        Driver-specific payload argument.
288
 * @param a3        Driver-specific payload argument.
-
 
289
 * @param a4        Driver-specific payload argument.
-
 
290
 * @param a5        Driver-specific payload argument.
285
 */
291
 */
286
void ipc_irq_send_msg(irq_t *irq, unative_t a1, unative_t a2, unative_t a3)
292
void ipc_irq_send_msg(irq_t *irq, unative_t a1, unative_t a2, unative_t a3,
-
 
293
    unative_t a4, unative_t a5)
287
{
294
{
288
    call_t *call;
295
    call_t *call;
289
 
296
 
290
    spinlock_lock(&irq->lock);
297
    spinlock_lock(&irq->lock);
291
 
298
 
Line 298... Line 305...
298
        call->flags |= IPC_CALL_NOTIF;
305
        call->flags |= IPC_CALL_NOTIF;
299
        IPC_SET_METHOD(call->data, irq->notif_cfg.method);
306
        IPC_SET_METHOD(call->data, irq->notif_cfg.method);
300
        IPC_SET_ARG1(call->data, a1);
307
        IPC_SET_ARG1(call->data, a1);
301
        IPC_SET_ARG2(call->data, a2);
308
        IPC_SET_ARG2(call->data, a2);
302
        IPC_SET_ARG3(call->data, a3);
309
        IPC_SET_ARG3(call->data, a3);
-
 
310
        IPC_SET_ARG4(call->data, a4);
-
 
311
        IPC_SET_ARG5(call->data, a5);
303
        /* Put a counter to the message */
312
        /* Put a counter to the message */
304
        call->priv = ++irq->notif_cfg.counter;
313
        call->priv = ++irq->notif_cfg.counter;
305
       
314
       
306
        send_call(irq, call);
315
        send_call(irq, call);
307
    }
316
    }