annotate gsm-fw/gpf/osl/os_mis_fl.c @ 478:dac495b0d222

os_mis_fl.c: global and static data reconstructed
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sat, 28 Jun 2014 06:06:15 +0000
parents 2f79ddc12bb0
children 334a3381f569
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
477
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * This C module is a reconstruction based on the disassembly of
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * os_mis.obj in frame_na7_db_fl.lib from the Leonardo package.
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 */
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 /* set of included headers from COFF symtab, slightly reordered: */
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 #include <stddef.h>
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 #include <stdio.h>
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 #include <string.h>
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 #include "../../riviera/rv/general.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 #include "../../riviera/rv/rv_general.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 #include "../../riviera/rvf/rvf_api.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 #include "../../services/ffs/ffs.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 #include "gpfconf.h" /* FreeCalypso addition */
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 #include "../../nucleus/nucleus.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 #include "typedefs.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 #include "os.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 #include "gdi.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 #include "os_types.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 #include "os_glob.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 #include "header.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 #include "vsi.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 #include "drvconf.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 #include "../tst_pei/tstdriver.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 #include "dar_func.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #include "tools.h"
2f79ddc12bb0 OSL reconstruction: os_mis_fl.c: got the set of included headers, passes gcc
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27
478
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
28 typedef unsigned char u_char;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
29
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
30 char *NU_State[13] = {
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
31 "NU_READY",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
32 "",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
33 "NU_SLEEP_SUSPEND",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
34 "",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
35 "",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
36 "NU_QUEUE_SUSPEND",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
37 "NU_SEMAPHORE_SUSPEND",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
38 "",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
39 "NU_PARTITION_SUSPEND",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
40 "NU_MEMORY_SUSPEND",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
41 "",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
42 "NU_FINISHED",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
43 "NU_TERMINATED",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
44 };
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
45
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
46 char *msg_type[4] = {
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
47 "",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
48 "PRIMITIVE",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
49 "SIGNAL",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
50 "TIMEOUT",
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
51 };
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
52
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
53 char *warning = "SYSTEM WARNING: ";
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
54
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
55 T_GPF_DAR_PROPERTIES *dar;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
56 T_GPF_DAR_STRUCT os_dar;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
57 NU_PROTECT os_mis_Protect;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
58 u_char SystemErrorBuffer[256];
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
59 u_char DARErrorBuffer[256];
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
60
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
61 static u_char state;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
62 static int fd;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
63 static unsigned bytes_read;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
64 static u_char *msg;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
65 static unsigned count;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
66 static unsigned data_len;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
67 static unsigned dar_wrap_around;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
68 static unsigned dar_buffer_count;
dac495b0d222 os_mis_fl.c: global and static data reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 477
diff changeset
69 static unsigned dar_wrap_around_detected;