Changeset 9940ce0 in mainline for uspace/drv/char/ski-con/ski-con.c


Ignore:
Timestamp:
2017-11-26T01:03:40Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5f4c41b2
Parents:
96258fc
Message:

Move sending side of Ski driver out of output server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/ski-con/ski-con.c

    r96258fc r9940ce0  
    4343
    4444#define SKI_GETCHAR             21
     45#define SKI_PUTCHAR             31
    4546
    4647#define POLL_INTERVAL           10000
     
    5758        .write = ski_con_write
    5859};
     60
     61static void ski_con_putchar(ski_con_t *con, char ch); /* XXX */
    5962
    6063/** Add ski console device. */
     
    8891                goto error;
    8992        }
     93
     94        ddf_fun_add_to_category(fun, "console");
    9095
    9196        bound = true;
     
    177182}
    178183
     184
     185/** Display character on ski debug console
     186 *
     187 * Use SSC (Simulator System Call) to
     188 * display character on debug console.
     189 *
     190 * @param c Character to be printed.
     191 *
     192 */
    179193static void ski_con_putchar(ski_con_t *con, char ch)
    180194{
    181        
     195#ifdef UARCH_ia64
     196        asm volatile (
     197                "mov r15 = %0\n"
     198                "mov r32 = %1\n"   /* r32 is in0 */
     199                "break 0x80000\n"  /* modifies r8 */
     200                :
     201                : "i" (SKI_PUTCHAR), "r" (ch)
     202                : "r15", "in0", "r8"
     203        );
     204#else
     205        (void) ch;
     206#endif
     207        if (ch == '\n')
     208                ski_con_putchar(con, '\r');
    182209}
    183210
Note: See TracChangeset for help on using the changeset viewer.