OpenMP Runtime
Defines | Functions | Variables
omp_init.c File Reference

Implements function hooks to initialize the runtime during boot. More...

#include <setjmp.h>
#include <stdlib.h>
#include "tomp_util.h"
#include "tomp_log.h"
#include "tomp_parallel.h"
#include "tomp_qmss.h"
#include "omp.h"
#include "tomp_init.h"
#include <ti/csl/csl_msmc.h>
#include <ti/csl/csl_msmcAux.h>
#include <ti/csl/csl_emif4fAux.h>
Include dependency graph for omp_init.c:

Defines

#define L2SRAM_START_ADDR   (0x00800000)
#define CACHE_DISABLE   (0x0)
 MAR register bits to enable caching/prefetch/write-through.
#define CACHE_PC   (0x1)
#define CACHE_WTE   (0x2)
#define CACHE_PFX   (0x8)

Functions

static void switchL2SpToGlobal (void)
 Switches SP (in L2) from local to global address.
static void tomp_setMAR (unsigned int start, unsigned int length, unsigned int val)
 Setup MAR registers corresponding to the memory range provided.
void __TI_omp_configure (void)
 Default OpenMP Runtime configuration function.
far int _args_main ()
void __TI_switch_sp (int new_sp, void *fn)
void __TI_omp_terminate (void)
 Terminate the OpenMP runtime.
void tomp_entry_func (void)
void __TI_omp_start (void)
void tomp_OmpStartCommon (tomp_EntryFunc fn)
int __TI_omp_initialize (void)
 Initializes the OMP runtime.
bool tomp_ompInitCommon (void)
 Initialization steps shared in RTSC and bare-metal modes.
void tomp_switchL2SpToGlobal (void)
 If OpenMP thread stacks are in L2SRAM, switch SP to global address, update MAR bit to disable caching of this range and wb-invalidate L1.
void __TI_omp_configure_caches (void)
void __TI_omp_enable_caching (unsigned int start, unsigned int length)
void __TI_omp_disable_caching (unsigned int start, unsigned int length)
void __TI_setMPAX (unsigned int mpax_id, unsigned int base_addr, unsigned long long replacement_addr, unsigned int seg_size_encoding)
 Configure an MPAX register.
void __TI_omp_config_thread_stack (char from_heap, unsigned int size)
 Configure location of Thread Stacks.
void __TI_omp_config_cores (unsigned char master_core_idx, unsigned char num_cores)
 Configure number of cores available to OpenMP runtime and the index of the master core.
void __TI_omp_config_hw_queues (char init_qmss, int hw_queue_base_idx, int first_desc_idx_in_linking_ram, int first_memory_region_idx)
 Configure location of hardware queues used by Open Event Machine.
void __TI_omp_config_hw_semaphores (unsigned char hw_sem_base_idx)
 Configure hardware semaphores available to OpenMP runtime.
void __TI_omp_config_clock_freq_in_mhz (unsigned int clock_freq)
 Configure the device core frequency.

Variables

cregister volatile unsigned int DNUM
tomp_CoreConfig tomp_gvCoreConfig
 Configuration structure.

Detailed Description

Implements function hooks to initialize the runtime during boot.

Functions implemented: __TI_omp_initialize __TI_omp_start


Function Documentation

int __TI_omp_initialize ( void  )

Initializes the OMP runtime.

Invoked after cinit. see .c

Here is the call graph for this function:

void __TI_omp_terminate ( void  )

Terminate the OpenMP runtime.

Executed only be the master core. Pushes exit events to the worker exit queues to terminate execution on workers. Also does cleanup on the master

static void switchL2SpToGlobal ( void  ) [static]

Switches SP (in L2) from local to global address.

The global address allows other cores to access a given core's L2. This enables local variables on the stack to be shared, a requirement for OpenMP

Here is the caller graph for this function:

void tomp_setMAR ( unsigned int  start,
unsigned int  length,
unsigned int  val 
) [static]

Setup MAR registers corresponding to the memory range provided.

Parameters:
startstart of the address range
lengthlength of the address range
valvalue to write to the MAR register(s)

Here is the caller graph for this function:

 All Classes Files Functions Variables Typedefs Enumerations Defines