annotate gsm-fw/gpf/osl/os_mem_ir.c @ 436:adfc04008d75

OSL: os_mem_ir.c started
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 22 Jun 2014 20:39:01 +0000
parents
children 1d78af921a5a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
436
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * This C module is a reconstruction based on the disassembly of
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * os_mem.obj in frame_na7_db_ir.lib from the Leonardo package.
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 */
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 /* set of included headers from COFF symtab: */
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 #include <stdio.h>
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 #include <string.h>
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 #include "gpfconf.h" /* FreeCalypso addition */
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 #include "../../nucleus/nucleus.h"
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 #include "typedefs.h"
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 #include "os.h"
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 #include "gdi.h"
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 #include "os_types.h"
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 #include "os_glob.h"
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 extern T_OS_PART_GRP_TABLE_ENTRY PartGrpTable[];
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 extern T_OS_POOL_BORDER PoolBorder[];
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 GLOBAL LONG
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 os_is_valid_partition(T_VOID_STRUCT *Buffer)
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 {
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 int i;
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 for (i = 0; i <= MaxPoolGroups; i++) {
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 if (PoolBorder[i].End == 0)
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 return(OS_ERROR);
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 if ((char *)Buffer < PoolBorder[i].Start)
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 continue;
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 if ((char *)Buffer >= PoolBorder[i].End)
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 continue;
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 return(OS_OK);
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 }
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 return(OS_ERROR);
adfc04008d75 OSL: os_mem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 }