Ignore:
Timestamp:
Mar 6, 2019, 4:37:15 PM (5 years ago)
Author:
alain
Message:

Introduce three new types of vsegs (KCODE,KDATA,KDEV)
to map the kernel vsegs in the process VSL and GPT.
This now used by both the TSAR and the I86 architectures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/printk.h

    r583 r623  
    2424///////////////////////////////////////////////////////////////////////////////////
    2525// The printk.c and printk.h files define the functions used by the kernel
    26 // to display messages on a text terminal.
    27 // Two access modes are supported:
    28 // - The printk() function displays kernel messages on the kernel terminal TXT0,
    29 //   using a busy waiting policy: It calls directly the relevant TXT driver,
    30 //   after taking the TXT0 busylock for exclusive access to the TXT0 terminal.
    31 // - The user_printk() function displays messages on the calling thread private
    32 //   terminal, using a descheduling policy: it register the request in the selected
    33 //   TXT chdev waiting queue and deschedule. The calling thread is reactivated by
    34 //   the IRQ signalling completion.
    35 // Both functions use the generic TXT device to call the proper implementation
    36 // dependant TXT driver.
    37 // Finally these files define a set of conditional trace <***_dmsg> for debug.
     26// to display messages on the kernel terminal TXT0, using a busy waiting policy.
     27// It calls synchronously the TXT0 driver, without descheduling.
    3828///////////////////////////////////////////////////////////////////////////////////
    3929
     
    4434#include <stdarg.h>
    4535
    46 #include <hal_special.h> // hal_get_cycles()
     36#include <hal_special.h>
    4737
    4838/**********************************************************************************
    4939 * This function build a formatted string.
    5040 * The supported formats are defined below :
    51  *   %c : single character
    52  *   %d : signed decimal 32 bits integer
    53  *   %u : unsigned decimal 32 bits integer
    54  *   %x : hexadecimal 32 bits integer
    55  *   %l : hexadecimal 64 bits integer
     41 *   %b : exactly 2 digits hexadecimal integer (8 bits)
     42 *   %c : single ascii character (8 bits)
     43 *   %d : up to 10 digits decimal integer (32 bits)
     44 *   %u : up to 10 digits unsigned decimal (32 bits)
     45 *   %x : up to 8 digits hexadecimal integer (32 bits)
     46 *   %X : exactly 8 digits hexadecimal integer (32 bits)
     47 *   %l : up to 16 digits hexadecimal integer (64 bits)
     48 *   %L : exactly 16 digits hexadecimal integer (64 bits)
    5649 *   %s : NUL terminated character string
    5750 **********************************************************************************
     
    153146void putl( uint64_t val );
    154147
     148/**********************************************************************************
     149 * This debug function displays on the kernel TXT0 terminal the content of an
     150 * array of bytes defined by <buffer> and <size> arguments (16 bytes per line).
     151 * The <string> argument is displayed before the buffer content.
     152 * The line format is an address folowed by 16 (hexa) bytes.
     153 **********************************************************************************
     154 * @ string   : buffer name or identifier.
     155 * @ buffer   : local pointer on bytes array.
     156 * @ size     : number of bytes bytes to display.
     157 *********************************************************************************/
     158void putb( char     * string,
     159           uint8_t  * buffer,
     160           uint32_t   size );
     161
     162
    155163
    156164#endif  // _PRINTK_H
Note: See TracChangeset for help on using the changeset viewer.