source: soft/giet_vm/giet_libs/libsrl/srl_args.h

Last change on this file was 258, checked in by alain, 11 years ago

This is a major release, including a deep restructuration of code.
The main evolutions are

  • use of the Tsar preloader to load the GIET boot-loader from disk
  • introduction of a FAT32 file system library,
  • use of this fat32 library by the boot-loader to load the map.bin data structure, and the various .elf files
  • reorganisation of drivers (one file per peripheral).
  • introduction of drivers for new peripherals: vci_chbuf_dma and vci_multi_ahci.
  • introduction of a new physical memory allocator in the boot code.

This release has been tested on the tsar_generic_iob architecture,
for the two following mappings: 4c_1p_iob_four.xml and 4c_1p_iob_sort.xml

  • Property svn:executable set to *
File size: 3.2 KB
Line 
1#ifndef SRL_ARGS_H
2#define SRL_ARGS_H
3
4
5
6#define SRL_GET_MWMR(port)      (srl_mwmr_t)     APP_GET_ARG(port, VOBJ_TYPE_MWMR)
7#define SRL_GET_BARRIER(port)   (srl_barrier_t)  APP_GET_ARG(port, VOBJ_TYPE_BARRIER)
8#define SRL_GET_LOCK(port)                       APP_GET_ARG(port, VOBJ_TYPE_LOCK)
9#define SRL_GET_MEMSPACE(port)  (srl_memspace_t) APP_GET_ARG(port, VOBJ_TYPE_MEMSPACE)
10
11
12# define SRL_GET_VBASE(task_name, port, type)                                                      \
13({                                                                                                 \
14    unsigned int  vbase;                                                                           \
15    if (giet_vobj_get_vbase(APP_NAME , args->port, type, &vbase))                                  \
16    {                                                                                              \
17        srl_log_printf(NONE, "\n[ERROR] in "#task_name" task :\n");                                \
18        srl_log_printf(NONE, "          undefined port <"#port"> for channel \"%s\": %x\n",        \
19                                                                args->port, vbase);                \
20        srl_log_printf(TRACE, "*** &"#port" = %x\n\n", vbase);                                     \
21        srl_exit();                                                                                \
22    }                                                                                              \
23    else                                                                                           \
24        srl_log_printf(TRACE, "%s:%d: arg of %s for %s, from %s; &"#port" = %x\n\n",               \
25                            __FILE__, __LINE__, APP_NAME, #task_name, #port, vbase);               \
26    vbase;                                                                                         \
27})
28
29
30#define SRL_GET_CONST(port)                                                                        \
31({                                                                                                 \
32    unsigned int vbase;                                                                            \
33    if (giet_vobj_get_vbase(APP_NAME, args->port, VOBJ_TYPE_CONST, &vbase)) {                      \
34        srl_log_printf(NONE, "\n[ERROR] in some task :\n");                                        \
35        srl_log_printf(NONE, "          undefined port <"#port"> for channel \"%s\": %x\n",        \
36                                                                args->port, vbase);                \
37        srl_log_printf(TRACE, "*** &"#port" = %x\n\n", vbase);                                     \
38        srl_exit();                                                                                \
39    }                                                                                              \
40    else                                                                                           \
41        srl_log_printf(TRACE, "%s:%d: arg of %s, from %s; &"#port" = %x\n\n",                      \
42                            __FILE__, __LINE__, APP_NAME, #port, vbase);                           \
43    *(int *) vbase;                                                                                \
44})
45
46
47#endif
Note: See TracBrowser for help on using the repository browser.