Changes between Initial Version and Version 1 of kernel_miscelaneous


Ignore:
Timestamp:
Dec 7, 2014, 8:41:50 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_miscelaneous

    v1 v1  
     1= GIET-VM / Miscelaneous common kernel functions =
     2
     3[[PageOutline]]
     4
     5The [source:soft/giet_vm/giet_common/utils.c utils.c] and [source:soft/giet_vm/giet_common/utils.h utils.h] files define various kernel functions that can be used by both the kernel code and the boot code.
     6
     7=== void '''_exit'''(void) ===
     8This function is called in case of kernel error.
     9The processor try to displays an error message on TTY0, and suicide (enter infinite loop)...
     10
     11=== void '''_random_wait'''( unsigned int value ) ===
     12This function implements a pseudo-random delay.
     13The 5 LSB bits of the '''value''' argument (number between 0 and 31) define the average delay value: 2 * (2**(value[4:0]
     14
     15=== void '''_break'''( char* str ) ===
     16This function can be used for interactive kernel debug. It displays the '''str''' string on TTY0,
     17and waits until a character typed on TTY0.
     18
     19=== unsigned int '''_strncmp'''( const char*  s1, const char*  s2,  unsigned int n );
     20This function compares the '''n''' first characters of the two '''s1''' and '''s2''' strings.
     21Returns 0 if all characters are identical. returns 1 otherwise.
     22
     23=== char* '''_strcpy'''( char* dest,  char* source ) ===
     24This function copies the '''source''' string to the '''dest''' string, and returns a pointer on the '''dest''' string.
     25
     26=== void '''_dcache_buf_invalidate'''( unsigned int buf_vbase,  unsigned int buf_size ) ===
     27This function invalidates all cache lines contained in the L1 data cache that overlap the buffer defined by
     28the '''buf_vbase''' and '''buf_size''' arguments.
     29