Changeset 250717cc in mainline for ns/ns.c


Ignore:
Timestamp:
2006-05-16T09:30:42Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ec153a0
Parents:
51d6f80
Message:

Add services.h to codify service numbers.
Assign codes for PCI, keyboard and frame buffer services.

Rename ipc_answer() to ipc_answer_fast() and add the basic
slower variant and call it ipc_answer(). Add some doxygen comments.

Remove unused bits from the libpci library.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ns/ns.c

    r51d6f80 r250717cc  
    7272} hashed_service_t;
    7373
    74 /*
    75 irq_cmd_t msim_cmds[1] = {
    76         { CMD_MEM_READ_1, (void *)0xB0000000, 0 }
    77 };
    78 
    79 irq_code_t msim_kbd = {
    80         1,
    81         msim_cmds
    82 };
    83 */
    84 /*
    85 irq_cmd_t i8042_cmds[1] = {
    86         { CMD_PORT_READ_1, (void *)0x60, 0 }
    87 };
    88 
    89 irq_code_t i8042_kbd = {
    90         1,
    91         i8042_cmds
    92 };
    93 */
    94 
    95 
    9674int static ping_phone;
    9775
     
    11088                return ENOMEM;
    11189        }
    112        
    113        
    114 //      ipc_register_irq(2, &msim_kbd);
    115 //      ipc_register_irq(1, &i8042_kbd);
     90               
    11691        while (1) {
    11792                callid = ipc_wait_for_call(&call, 0);
    118                 printf("NS: Call in_phone_hash=%lX...", call.in_phone_hash);
     93//              printf("NS: Call in_phone_hash=%lX...", call.in_phone_hash);
    11994                switch (IPC_GET_METHOD(call)) {
    12095                case IPC_M_AS_SEND:
    12196                        as = (char *)IPC_GET_ARG2(call);
    12297                        printf("Received as: %P, size:%d\n", as, IPC_GET_ARG3(call));
    123                         retval = ipc_answer(callid, 0,(sysarg_t)(1024*1024), 0);
     98                        retval = ipc_answer_fast(callid, 0,(sysarg_t)(1024*1024), 0);
    12499                        if (!retval) {
    125100                                printf("Reading shared memory...");
     
    171146                }
    172147                if (! (callid & IPC_CALLID_NOTIFICATION)) {
    173                         printf("Answering.\n");
    174                         ipc_answer(callid, retval, arg1, arg2);
     148//                      printf("Answering.\n");
     149                        ipc_answer_fast(callid, retval, arg1, arg2);
    175150                }
    176151        }
     
    228203        hlp = hash_table_find(&ns_hash_table, keys);
    229204        if (!hlp) {
    230                 printf("Service %d not registered.\n", service);
     205//              printf("Service %d not registered.\n", service);
    231206                return ENOENT;
    232207        }
Note: See TracChangeset for help on using the changeset viewer.