comparison gsm-fw/gpf/osl/os_mis_fl.c @ 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 dac495b0d222
children
comparison
equal deleted inserted replaced
479:fe9e620c89ff 480:334a3381f569
65 static unsigned count; 65 static unsigned count;
66 static unsigned data_len; 66 static unsigned data_len;
67 static unsigned dar_wrap_around; 67 static unsigned dar_wrap_around;
68 static unsigned dar_buffer_count; 68 static unsigned dar_buffer_count;
69 static unsigned dar_wrap_around_detected; 69 static unsigned dar_wrap_around_detected;
70
71 LONG
72 os_read_dar_ffs_data(USHORT entry, char *buffer, USHORT len)
73 {
74 /* dummy for now */
75 return(OS_ERROR);
76 }
77
78 LONG
79 os_dar_set_filter(void)
80 {
81 if (dar)
82 dar->diagnose_swe_filter(dar->gpf_use_id, dar->warning);
83 return(OS_OK);
84 }
85
86 LONG
87 os_dar_register(const void *dar_properties)
88 {
89 if (dar_properties) {
90 os_dar.properties = (T_GPF_DAR_PROPERTIES *) dar_properties;
91 os_dar.magic_nr = DAR_INITIALIZED;
92 dar = (T_GPF_DAR_PROPERTIES *) dar_properties;
93 }
94 return(OS_OK);
95 }
96
97 void
98 os_dar_init(void)
99 {
100 if (os_dar.magic_nr != DAR_INITIALIZED)
101 dar = 0;
102 }
103
104 void
105 os_SystemError(OS_HANDLE Caller, USHORT cause, char *buffer)
106 {
107 /*
108 * The implementation of this function in the binary blob
109 * which we are reversing is very complex. I am leaving it
110 * as an empty stub for now. - Space Falcon
111 */
112 }
113
114 GLOBAL LONG
115 os_ObjectInformation(OS_HANDLE Caller, USHORT Id, USHORT Handle, USHORT len,
116 void *Buffer)
117 {
118 switch (Id) {
119 case OS_OBJTASK:
120 return os_TaskInformation(Handle, Buffer);
121 case OS_OBJQUEUE:
122 return os_QueueInformation(Handle, Buffer);
123 case OS_OBJPARTITIONGROUP:
124 return os_PartitionInformation(Handle, Buffer);
125 case OS_OBJMEMORYPOOL:
126 return os_MemoryInformation(Handle, Buffer);
127 case OS_OBJTIMER:
128 return os_TimerInformation(Handle, Buffer);
129 case OS_OBJSEMAPHORE:
130 return os_SemaphoreInformation(Handle, Buffer);
131 default:
132 return(OS_ERROR);
133 }
134 }
135
136 GLOBAL LONG
137 os_Initialize(void)
138 {
139 if (os_SemInit() == OS_ERROR)
140 return(OS_ERROR);
141 if (os_ProInit() == OS_ERROR)
142 return(OS_ERROR);
143 if (os_ComInit() == OS_ERROR)
144 return(OS_ERROR);
145 if (os_MemInit() == OS_ERROR)
146 return(OS_ERROR);
147 if (os_TimInit() == OS_ERROR)
148 return(OS_ERROR);
149 if (os_isr_init() == OS_ERROR)
150 return(OS_ERROR);
151 #if 0
152 if (os_EvGrpInit() == OS_ERROR)
153 return(OS_ERROR);
154 #endif
155 /*
156 * The original code zeroes out the first 32-bit word of
157 * os_mis_Protect here. We don't really need to do that,
158 * as it is a zeroed-on-boot bss var.
159 */
160 os_dar_init(); /* inlined in the original */
161 return(OS_OK);
162 }