# HG changeset patch # User Michael Spacefalcon # Date 1404012443 0 # Node ID 334a3381f569f1eabdc68f859c3bac1906f4d649 # Parent fe9e620c89ff31697500869be0748db860bddc4f os_mis_fl.c: easy functions reconstructed, hard ones stubbed out diff -r fe9e620c89ff -r 334a3381f569 gsm-fw/gpf/osl/os_mis_fl.c --- a/gsm-fw/gpf/osl/os_mis_fl.c Sun Jun 29 01:26:52 2014 +0000 +++ b/gsm-fw/gpf/osl/os_mis_fl.c Sun Jun 29 03:27:23 2014 +0000 @@ -67,3 +67,96 @@ static unsigned dar_wrap_around; static unsigned dar_buffer_count; static unsigned dar_wrap_around_detected; + +LONG +os_read_dar_ffs_data(USHORT entry, char *buffer, USHORT len) +{ + /* dummy for now */ + return(OS_ERROR); +} + +LONG +os_dar_set_filter(void) +{ + if (dar) + dar->diagnose_swe_filter(dar->gpf_use_id, dar->warning); + return(OS_OK); +} + +LONG +os_dar_register(const void *dar_properties) +{ + if (dar_properties) { + os_dar.properties = (T_GPF_DAR_PROPERTIES *) dar_properties; + os_dar.magic_nr = DAR_INITIALIZED; + dar = (T_GPF_DAR_PROPERTIES *) dar_properties; + } + return(OS_OK); +} + +void +os_dar_init(void) +{ + if (os_dar.magic_nr != DAR_INITIALIZED) + dar = 0; +} + +void +os_SystemError(OS_HANDLE Caller, USHORT cause, char *buffer) +{ + /* + * The implementation of this function in the binary blob + * which we are reversing is very complex. I am leaving it + * as an empty stub for now. - Space Falcon + */ +} + +GLOBAL LONG +os_ObjectInformation(OS_HANDLE Caller, USHORT Id, USHORT Handle, USHORT len, + void *Buffer) +{ + switch (Id) { + case OS_OBJTASK: + return os_TaskInformation(Handle, Buffer); + case OS_OBJQUEUE: + return os_QueueInformation(Handle, Buffer); + case OS_OBJPARTITIONGROUP: + return os_PartitionInformation(Handle, Buffer); + case OS_OBJMEMORYPOOL: + return os_MemoryInformation(Handle, Buffer); + case OS_OBJTIMER: + return os_TimerInformation(Handle, Buffer); + case OS_OBJSEMAPHORE: + return os_SemaphoreInformation(Handle, Buffer); + default: + return(OS_ERROR); + } +} + +GLOBAL LONG +os_Initialize(void) +{ + if (os_SemInit() == OS_ERROR) + return(OS_ERROR); + if (os_ProInit() == OS_ERROR) + return(OS_ERROR); + if (os_ComInit() == OS_ERROR) + return(OS_ERROR); + if (os_MemInit() == OS_ERROR) + return(OS_ERROR); + if (os_TimInit() == OS_ERROR) + return(OS_ERROR); + if (os_isr_init() == OS_ERROR) + return(OS_ERROR); +#if 0 + if (os_EvGrpInit() == OS_ERROR) + return(OS_ERROR); +#endif + /* + * The original code zeroes out the first 32-bit word of + * os_mis_Protect here. We don't really need to do that, + * as it is a zeroed-on-boot bss var. + */ + os_dar_init(); /* inlined in the original */ + return(OS_OK); +}