type
stringclasses
5 values
content
stringlengths
9
163k
includes
#include <stdio.h>
includes
#include <stdlib.h>
includes
#include <string.h>
includes
#include <jni.h>
includes
#include <android/log.h>
defines
#define printf symbianPrintf
defines
#define fprintf symbianFprintf
functions
void logCatInfo(const char *format, ...) { va_list ap; va_start(ap, format); __android_log_vprint(ANDROID_LOG_INFO , "TFCTRL", format, ap); va_end(ap); }
functions
void logCatError(const char *format, ...) { va_list ap; va_start(ap, format); __android_log_vprint(ANDROID_LOG_ERROR , "TFCTRL", format, ap); va_end(ap); }
functions
void print_usage(void) { fprintf(stderr, "Usage: tfctrl <command>\n"); fprintf(stderr, " Supported commands are:\n"); fprintf(stderr, " > list: list all the implementation properties, the services and the list of their properties\n"); exit(2); }
functions
void execute_list(void) { TEEC_Result nError; TEEC_Context sContext; TEEC_Session sSession; TEEC_Operation sOperation; TEEC_ImplementationInfo sDescription; const TEEC_UUID service_manager_uuid = SERVICE_MANAGER_UUID; fprintf(stderr, "Trusted Logic TFCTRL\n\n"); /* Create the...
functions
void execute_download(char *pFileName) { FILE *pFile; int nResult; long nFileSize; void *buffer; size_t nReadSize; TEEC_Result nError; TEEC_Context sContext; TEEC_Session sSession; TEEC_Operation sOperation; const TEEC_UUID service_manager_uuid = SERVICE_MANAGER_UUID; ...
functions
void execute_remove(char *pUUID) { TEEC_Result nError; TEEC_UUID sServiceUUID; int sValue[10]; TEEC_Context sContext; TEEC_Session sSession; TEEC_Operation sOperation; const TEEC_UUID service_manager_uuid = SERVICE_MANAGER_UUID; fprintf(stderr, "Trusted Logic TFCTRL\n\n"); ...
functions
JNICALL Java_com_trustedlogic_android_tfctrl_TFCTRL_ListServices (JNIEnv *env, jobject thiz, jstring device, jstring external_storage) { jboolean iscopy; char* c_data=NULL; const char * device_name=(*env)->GetStringUTFChars(env, device, &iscopy); const char * storage=(*env)->GetStringUTFChars(env, exte...
includes
#include <kbase/src/common/mali_kbase.h>
includes
#include <linux/sync.h>
includes
#include <linux/syscalls.h>
defines
#define KBASE_CACHE_ALIGNMENT_MASK ((1<<CONFIG_ARM_L1_CACHE_SHIFT)-1)
defines
#define KBASE_FENCE_TIMEOUT 1000
defines
#define DUMP_CHUNK 256
functions
int kbase_dump_cpu_gpu_time(kbase_jd_atom *katom) { kbase_va_region *reg; phys_addr_t addr; u64 pfn; u32 offset; char *page; struct timespec ts; base_dump_cpu_gpu_counters data; u64 system_time; u64 cycle_counter; mali_addr64 jc = katom->jc; kbase_context *kctx = katom->kctx; int pm_active_err;...
functions
void complete_soft_job(kbase_jd_atom *katom) { kbase_context *kctx = katom->kctx; mutex_lock(&kctx->jctx.lock); list_del(&katom->dep_item[0]); kbase_finish_soft_job(katom); if (jd_done_nolock(katom)) kbasep_js_try_schedule_head_ctx(kctx->kbdev); mutex_unlock(&kctx->jctx.lock); }
functions
base_jd_event_code kbase_fence_trigger(kbase_jd_atom *katom, int result) { struct sync_pt *pt; struct sync_timeline *timeline; if (!list_is_singular(&katom->fence->pt_list_head)) { /* Not exactly one item in the list - so it didn't (directly) come from us */ return BASE_JD_EVENT_JOB_CANCELLED; }
functions
void kbase_fence_wait_worker(struct work_struct *data) { kbase_jd_atom *katom; kbase_context *kctx; katom = container_of(data, kbase_jd_atom, work); kctx = katom->kctx; #ifdef SLSI_FENCE_INTEGRATION #ifdef KBASE_FENCE_TIMEOUT_FAKE_SIGNAL mutex_lock(&katom->fence_mt); if (katom->fence && katom->fence->s...
functions
void kbase_fence_wait_callback(struct sync_fence *fence, struct sync_fence_waiter *waiter) { kbase_jd_atom *katom = container_of(waiter, kbase_jd_atom, sync_waiter); kbase_context *kctx; KBASE_DEBUG_ASSERT(NULL != katom); kctx = katom->kctx; KBASE_DEBUG_ASSERT(NULL != kctx); /* Propagate the fence ...
functions
int kbase_fence_wait(kbase_jd_atom *katom) { int ret; KBASE_DEBUG_ASSERT(NULL != katom); KBASE_DEBUG_ASSERT(NULL != katom->kctx); sync_fence_waiter_init(&katom->sync_waiter, kbase_fence_wait_callback); #ifdef SLSI_FENCE_INTEGRATION mutex_lock(&katom->fence_mt); ret = sync_fence_wait_async(katom->fence...
functions
else if (ret < 0) { goto cancel_atom; }
functions
void kbase_fence_cancel_wait(kbase_jd_atom *katom) { #ifdef SLSI_FENCE_INTEGRATION mutex_lock(&katom->fence_mt); if (!katom->fence) { mutex_unlock(&katom->fence_mt); return; }
functions
int kbase_process_soft_job(kbase_jd_atom *katom) { switch (katom->core_req) { case BASE_JD_REQ_SOFT_DUMP_CPU_GPU_TIME: return kbase_dump_cpu_gpu_time(katom); #ifdef CONFIG_SYNC case BASE_JD_REQ_SOFT_FENCE_TRIGGER: #ifdef SLSI_FENCE_INTEGRATION mutex_lock(&katom->fence_mt); #endif KBASE_DEBUG_ASSERT(k...
functions
void kbase_cancel_soft_job(kbase_jd_atom *katom) { switch (katom->core_req) { #ifdef CONFIG_SYNC case BASE_JD_REQ_SOFT_FENCE_WAIT: kbase_fence_cancel_wait(katom); break; #endif default: /* This soft-job doesn't support cancellation! */ KBASE_DEBUG_ASSERT(0); }
functions
mali_error kbase_prepare_soft_job(kbase_jd_atom *katom) { switch (katom->core_req) { case BASE_JD_REQ_SOFT_DUMP_CPU_GPU_TIME: { if(0 != (katom->jc & KBASE_CACHE_ALIGNMENT_MASK)) return MALI_ERROR_FUNCTION_FAILED; }
functions
void kbase_finish_soft_job(kbase_jd_atom *katom) { switch (katom->core_req) { case BASE_JD_REQ_SOFT_DUMP_CPU_GPU_TIME: /* Nothing to do */ break; #ifdef CONFIG_SYNC case BASE_JD_REQ_SOFT_FENCE_TRIGGER: if (katom->fence) { /* The fence has not yet been signalled, so we do it now */ kbase_fence_t...
functions
void kbase_resume_suspended_soft_jobs(kbase_device *kbdev) { LIST_HEAD(local_suspended_soft_jobs); kbase_jd_atom *tmp_iter; kbase_jd_atom *katom_iter; kbasep_js_device_data *js_devdata; mali_bool resched = MALI_FALSE; KBASE_DEBUG_ASSERT(kbdev); js_devdata = &kbdev->js_data; /* Move out the entire l...
functions
void kbase_sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) { int status; if (pt == NULL) return; status = pt->status; seq_printf(s, " %s%spt %s", fence ? pt->parent->name : "", fence ? "_" : "", kbase_sync_status_str(status)); if (pt->status) { struct timeval tv...
functions
else if (pt->parent->ops->print_pt) { seq_printf(s, ": "); pt->parent->ops->print_pt(s, pt); }
functions
void kbase_fence_print(struct seq_file *s, struct sync_fence *fence) { struct list_head *pos; unsigned long flags; seq_printf(s, "[%p] %s: %s\n", fence, fence->name, kbase_sync_status_str(fence->status)); list_for_each(pos, &fence->pt_list_head) { struct sync_pt *pt = container_of(pos, struct ...
functions
void kbase_fence_dump(struct sync_fence *fence) { int i; struct seq_file s = { .buf = kbase_sync_dump_buf, .size = sizeof(kbase_sync_dump_buf) - 1, }
functions
void kbase_fence_timeout(unsigned long data) { kbase_jd_atom *katom = (kbase_jd_atom *)data; KBASE_DEBUG_ASSERT(NULL != katom); if (katom == NULL || katom->fence == NULL) return; if (katom->fence->status != 0) { kbase_fence_del_timer(katom); return; }
functions
void kbase_fence_timer_init(kbase_jd_atom *katom) { const u32 timeout = msecs_to_jiffies(KBASE_FENCE_TIMEOUT); KBASE_DEBUG_ASSERT(NULL != katom); if (katom == NULL) return; init_timer(&katom->fence_timer); katom->fence_timer.function = kbase_fence_timeout; katom->fence_timer.data = (unsigned long)ka...
functions
void kbase_fence_del_timer(kbase_jd_atom *katom) { KBASE_DEBUG_ASSERT(NULL != katom); if (katom == NULL) return; if (katom->fence_timer.function == kbase_fence_timeout) del_timer(&katom->fence_timer); katom->fence_timer.function = NULL; return; }
functions
int hdclient(Conv *c) { char *realm, *passwd, *user, *f[4], *s, resp[MD5dlen*2+1]; int ret; Key *k; ret = -1; s = nil; c->state = "keylookup"; k = keyfetch(c, "%A", c->attr); if(k == nil) goto out; user = strfindattr(k->attr, "user"); realm = strfindattr(k->attr, "realm"); passwd = strfindattr(k->attr...
functions
void strtolower(char *s) { while(*s){ *s = tolower((uchar)*s); s++; }
functions
void digest(char *user, char *realm, char *passwd, char *nonce, char *method, char *uri, char *dig) { uchar b[MD5dlen]; char ha1[MD5dlen*2+1]; char ha2[MD5dlen*2+1]; DigestState *s; /* * H(A1) = MD5(uid + ":" + realm ":" + passwd) */ s = md5((uchar*)user, strlen(user), nil, nil); md5((uchar*)":", 1, nil,...
includes
#include <linux/mm.h>
includes
#include <linux/module.h>
includes
#include <linux/nmi.h>
includes
#include <linux/init.h>
includes
#include <linux/uaccess.h>
includes
#include <linux/highmem.h>
includes
#include <asm/mmu_context.h>
includes
#include <linux/interrupt.h>
includes
#include <linux/capability.h>
includes
#include <linux/completion.h>
includes
#include <linux/kernel_stat.h>
includes
#include <linux/debug_locks.h>
includes
#include <linux/perf_event.h>
includes
#include <linux/security.h>
includes
#include <linux/notifier.h>
includes
#include <linux/profile.h>
includes
#include <linux/freezer.h>
includes
#include <linux/vmalloc.h>
includes
#include <linux/blkdev.h>
includes
#include <linux/delay.h>
includes
#include <linux/pid_namespace.h>
includes
#include <linux/smp.h>
includes
#include <linux/threads.h>
includes
#include <linux/timer.h>
includes
#include <linux/rcupdate.h>
includes
#include <linux/cpu.h>
includes
#include <linux/cpuset.h>
includes
#include <linux/percpu.h>
includes
#include <linux/proc_fs.h>
includes
#include <linux/seq_file.h>
includes
#include <linux/sysctl.h>
includes
#include <linux/syscalls.h>
includes
#include <linux/times.h>
includes
#include <linux/tsacct_kern.h>
includes
#include <linux/kprobes.h>
includes
#include <linux/delayacct.h>
includes
#include <linux/unistd.h>
includes
#include <linux/pagemap.h>
includes
#include <linux/hrtimer.h>
includes
#include <linux/tick.h>
includes
#include <linux/debugfs.h>
includes
#include <linux/ctype.h>
includes
#include <linux/ftrace.h>
includes
#include <linux/slab.h>
includes
#include <linux/init_task.h>
includes
#include <linux/binfmts.h>
includes
#include <asm/switch_to.h>
includes
#include <asm/tlb.h>
includes
#include <asm/irq_regs.h>
includes
#include <asm/mutex.h>
includes
#include <asm/paravirt.h>
includes
#include <trace/events/sched.h>
defines
#define CREATE_TRACE_POINTS
defines
#define SCHED_FEAT(name, enabled) \
defines
#define SCHED_FEAT(name, enabled) \
defines
#define jump_label_key__true STATIC_KEY_INIT_TRUE
defines
#define jump_label_key__false STATIC_KEY_INIT_FALSE