changeset 480:334a3381f569

os_mis_fl.c: easy functions reconstructed, hard ones stubbed out
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 29 Jun 2014 03:27:23 +0000
parents fe9e620c89ff
children 5639b4fa8672
files gsm-fw/gpf/osl/os_mis_fl.c
diffstat 1 files changed, 93 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
+}