Changes between Version 1 and Version 2 of txt_device_api


Ignore:
Timestamp:
Jan 22, 2020, 12:08:46 AM (4 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • txt_device_api

    v1 v2  
    55== __A) General principles__ ==
    66
    7 The TXT device allows the kernel to access a text terminal peripheral. It is a multi-channel device, and there is one chdev per terminal, and per direction (TX/RX). The TXT0 (channel 0) is the kernel terminal.
     7The TXT device allows the kernel to access a text terminal peripheral. It is a multi-channel device, and there is one chdev per terminal, and per direction (TX/RX).
    88
    9 The "user" API, contains the functions used  the user-level system calls, and by the kernel itself for debug. It defines three operation types :  '''TXT_READ''', '''TXT_WRITE''', and '''TXT_SYNC_WRITE'''. This API is detailed in section C below.
     9The TXT0 (channel 0) is the kernel terminal, and is only used to display debug or log messages.
    1010
    11 * The '''asynchronous''' READ and WRITE operations are not directly executed by the client thread. The READ and WRITE requests are registered in the waiting queue rooted in the TXT chdev descriptor. These requests are actually handled by a dedicated server thread running in the cluster containing the chdev descriptor, that call the ''txt_driver_cmd()'' function.
    12 A WRITE operation (TX direction) moves N characters from a kernel buffer to the TXT terminal. A READ operation moves one single character from the TXT terminal to a kernel buffer.
     11The "user" API, contains the functions used  the user-level system calls, and by the kernel itself. It defines three operation types :  '''TXT_READ''', '''TXT_WRITE''', and '''TXT_SYNC_WRITE'''. This API is detailed in section C below.
     12
     13* The '''asynchronous''' TXT_READ and TXT_WRITE operations are not directly executed by the client thread. The requests are registered in the waiting queue rooted in the TXT chdev descriptor. These requests are actually handled by a dedicated server thread running in the cluster containing the chdev descriptor, that call the ''txt_driver_cmd()'' function.
     14A TXT_WRITE operation (TX direction) moves N characters from a kernel buffer to the TXT terminal. A TXT_READ operation moves one single character from the TXT terminal to a kernel buffer.
    1315
    1416* The '''synchronous''' SYNC_WRITE operation is used by the kernel to display debug messages on the TXT0. It does not use the waiting queue, and it does not use the server thread. The client thread calls directly the ''txt_driver_aux()'' function, without using the the txt_command_t structure to communicate with the driver.
    1517
    16 Most TXT device implementation use two (hardware or software) FIFOs for asynchronous READ and WRITE operations. These FIFOs are not controlled by the kernel, but are controlled by the ''txt_driver_cmd()'' and ''txt_cxd_isr()''. When they are used by the driver, the TXT_TX_IRQ and TXT_RX_IRQ are routed to the core executing the corresponding TXT server thread. (ISR stand for Interrupt Service Routine).
     18Most TXT device implementations use two (hardware or software) FIFOs for asynchronous READ and WRITE operations. These FIFOs are not controlled by the kernel, but are controlled by the ''txt_driver_cmd()'' and ''txt_cxd_isr()''. When they are used by the driver, the TXT_TX_IRQ and TXT_RX_IRQ are routed to the core executing the corresponding TXT server thread. (ISR stand for Interrupt Service Routine).
    1719
    1820To access the various drivers, the TXT device defines a lower-level "driver" API, that is detailed in section D below.