comparison 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
comparison
equal deleted inserted replaced
435:c6e1c813e7f0 436:adfc04008d75
1 /*
2 * This C module is a reconstruction based on the disassembly of
3 * os_mem.obj in frame_na7_db_ir.lib from the Leonardo package.
4 */
5
6 /* set of included headers from COFF symtab: */
7 #include <stdio.h>
8 #include <string.h>
9 #include "gpfconf.h" /* FreeCalypso addition */
10 #include "../../nucleus/nucleus.h"
11 #include "typedefs.h"
12 #include "os.h"
13 #include "gdi.h"
14 #include "os_types.h"
15 #include "os_glob.h"
16
17 extern T_OS_PART_GRP_TABLE_ENTRY PartGrpTable[];
18 extern T_OS_POOL_BORDER PoolBorder[];
19
20 GLOBAL LONG
21 os_is_valid_partition(T_VOID_STRUCT *Buffer)
22 {
23 int i;
24
25 for (i = 0; i <= MaxPoolGroups; i++) {
26 if (PoolBorder[i].End == 0)
27 return(OS_ERROR);
28 if ((char *)Buffer < PoolBorder[i].Start)
29 continue;
30 if ((char *)Buffer >= PoolBorder[i].End)
31 continue;
32 return(OS_OK);
33 }
34 return(OS_ERROR);
35 }