/** * driver_init - initialize driver model. * * Call the driver model init functions to initialize their * subsystems. Called early from init/main.c. */ void __init driver_init(void) { printk(KERN_INFO "%s, devtmpfs_init\n", __FILE__); printk(KERN_INFO "%s, devices_init\n", __FILE__); printk(KERN_INFO "%s, buses_init\n", __FILE__); printk(KERN_INFO "%s, classes_init\n", __FILE__); printk(KERN_INFO "%s, firmware_init\n", __FILE__); printk(KERN_INFO "%s, hypervisor_init\n", __FILE__); printk(KERN_INFO "%s, platform_bus_init\n", __FILE__); printk(KERN_INFO "%s, cpu_dev_init\n", __FILE__); printk(KERN_INFO "%s, memory_dev_init\n", __FILE__); /* These are the core pieces */ devtmpfs_init(); devices_init(); buses_init(); classes_init(); firmware_init(); hypervisor_init(); /* These are also core pieces, but must come after the * core core pieces. */ platform_bus_init(); cpu_dev_init(); memory_dev_init(); }
int main() { firmware_init(); //initialize firmware controller_run(); //run control logic return -1; //should never get here }
/** * sec_pa_service - kernel interface to access PA services * * This function is used by kernel code to call Protected Application * services. Currently is used by Aegis Validator. */ int sec_pa_service(const char *pa_name, int pa_sub, int flags, const void *params, void *results, struct sec_result *output) { int rv = ENODEV; mutex_lock(&sdev.lock); if (!sdev.ops) goto out; rv = firmware_init(NULL); if (rv < 0) goto out; rv = secenv_init(NULL, flags, output); if (rv || output->rom_rv) /* initialization failed */ goto out; rv = call_pa_service(pa_name, pa_sub, params, results, output); out: mutex_unlock(&sdev.lock); return rv; }
void __init driver_init(void) { /* These are the core pieces */ devices_init(); buses_init(); classes_init(); firmware_init(); /* These are also core pieces, but must come after the * core core pieces. */ platform_bus_init(); system_bus_init(); cpu_dev_init(); }
/** * driver_init - initialize driver model. * * Call the driver model init functions to initialize their * subsystems. Called early from init/main.c. */ void __init driver_init(void) { /* These are the core pieces */ devtmpfs_init(); devices_init(); buses_init(); classes_init(); firmware_init(); hypervisor_init(); /* These are also core pieces, but must come after the * core core pieces. */ platform_bus_init(); cpu_dev_init(); memory_dev_init(); container_dev_init(); of_core_init(); }
static int process_cmd_pa(struct sec_status *ss) { struct sec_result *output; size_t cpar, cres; int rv; pr_debug("started: %d\n", ss->cmd); output = sec_obuf_set(ss, 0); if (!output) return -ENOMEM; pr_debug("param.length: %d\n", ss->param.length); rv = firmware_init(ss->pabin); if (rv < 0) return rv; rv = pa_command_query(ss->cmd, ss->data, ss->param.length, &cpar, &cres, &sdev.fw[sdev.fwid].format); if (rv) { pr_debug("PA query failed!\n"); return rv; } pr_debug("cpar: %d, cres: %d\n", cpar, cres); rv = check_cmd_arg_length(ss->param.length, cpar); if (rv) return rv; output = sec_obuf_set(ss, cres); if (!output) return -ENOMEM; rv = call_cmd_pa(ss, cres, output); if (!rv && output->rom_rv == SEC_OK && output->pa_rv == SEC_OK) sec_obuf_add(ss->obuf, cres); return rv; }
void __init driver_init(void) { /* These are the core pieces */ devices_init(); buses_init(); classes_init(); #ifndef DDE_LINUX firmware_init(); hypervisor_init(); #endif /* These are also core pieces, but must come after the * core core pieces. */ platform_bus_init(); #ifndef DDE_LINUX system_bus_init(); cpu_dev_init(); memory_dev_init(); attribute_container_init(); #endif }
static void Init() { CLNT_STRUCT clnt; HRESULT *res = NULL; pli_setThreadName("MAIN"); pli_init(); md_open(); se_open(); DG_Init(); board_init(); firmware_init(); sendDebugMemoryAndAllocateDumpMemory(0, 0); VIDEO_INIT_DATA initData; initData.boardType = getTVE(); clnt = prepareCLNT(BLOCK_MODE | USE_INTR_BUF | SEND_VIDEO_CPU, VIDEO_SYSTEM, VERSION); VIDEO_RPC_ToAgent_VideoCreate_0(&initData, &clnt); BYTE *audioDebugFlag; unsigned long audioPhyAddr; BYTE *videoDebugFlag; unsigned long videoPhyAddr; pli_allocContinuousMemoryMesg("AudioDebugFlag", 4, (BYTE**)&audioDebugFlag, &audioPhyAddr); pli_allocContinuousMemoryMesg("VideoDebugFlag", 4, (BYTE**)&videoDebugFlag, &videoPhyAddr); #define AUDIO_DEBUG_FLAG 0x00000001 #define VIDEO_DEBUG_FLAG 0x00000001 pli_IPCWriteULONG((BYTE*)audioDebugFlag, AUDIO_DEBUG_FLAG); pli_IPCWriteULONG((BYTE*)videoDebugFlag, VIDEO_DEBUG_FLAG); clnt = prepareCLNT(NONBLOCK_MODE | USE_POLL_BUF | SEND_AUDIO_CPU, D_PROGRAM, D_VERSION); set_debug_flag_0((int*)&audioPhyAddr, &clnt); clnt = prepareCLNT(NONBLOCK_MODE | USE_POLL_BUF | SEND_VIDEO_CPU, D_PROGRAM, D_VERSION); set_debug_flag_0((int*)&videoPhyAddr, &clnt); audio_firmware_configure(); video_firmware_configure(); g_vo = new VoutUtil(); LoadTvConfig(); LoadAudioConfig(); board_codec_mute(false); board_dac_mute(false); InitHDMI(new MyHDMICallbacks()); g_hScreen = getSurfaceHandle(rect.width, rect.height, Format_32); DG_DrawRectangle(g_hScreen, 0, 0, rect.width, rect.height, RESERVED_COLOR_KEY, NULL); g_hDisplay = DG_GetDisplayHandle(); DG_DisplayArea (g_hDisplay, 0, 0, rect.width, rect.height, g_hScreen, 0, 0, Alpha_SrcMajor, 0, ColorKey_Src, RESERVED_COLOR_KEY); g_pb = new VideoPlayback(MEDIATYPE_None); g_pb->LoadMedia("file:///file_not_found.wmv"); //pli_listAllMemory(); setSpdifSampleRate(setup->GetSpdifRate()); printf("[LIBKETLAER]init done.\n"); }