# HG changeset patch
# User Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
# Date 1403469541 0
# Node ID adfc04008d75ab0cb2e6cd7f095767d7ea10b674
# Parent  c6e1c813e7f0ad1df464c99fa4962a552ddae36c
OSL: os_mem_ir.c started

diff -r c6e1c813e7f0 -r adfc04008d75 gsm-fw/gpf/osl/Makefile
--- a/gsm-fw/gpf/osl/Makefile	Sun Jun 22 01:40:59 2014 +0000
+++ b/gsm-fw/gpf/osl/Makefile	Sun Jun 22 20:39:01 2014 +0000
@@ -3,7 +3,7 @@
 IOPTS=	-DRUN_INT_RAM
 XOPTS=	-DRUN_FLASH -mthumb
 
-IOBJS=	os_com_ir.o os_pro_ir.o
+IOBJS=	os_com_ir.o os_mem_ir.o os_pro_ir.o
 XOBJS=	os_com_fl.o os_drv.o os_isr.o os_mem_fl.o os_pro_fl.o
 
 all:	${IOBJS} ${XOBJS}
diff -r c6e1c813e7f0 -r adfc04008d75 gsm-fw/gpf/osl/os_mem_ir.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/gpf/osl/os_mem_ir.c	Sun Jun 22 20:39:01 2014 +0000
@@ -0,0 +1,35 @@
+/*
+ * This C module is a reconstruction based on the disassembly of
+ * os_mem.obj in frame_na7_db_ir.lib from the Leonardo package.
+ */
+
+/* set of included headers from COFF symtab: */
+#include <stdio.h>
+#include <string.h>
+#include "gpfconf.h"	/* FreeCalypso addition */
+#include "../../nucleus/nucleus.h"
+#include "typedefs.h"
+#include "os.h"
+#include "gdi.h"
+#include "os_types.h"
+#include "os_glob.h"
+
+extern T_OS_PART_GRP_TABLE_ENTRY PartGrpTable[];
+extern T_OS_POOL_BORDER PoolBorder[];
+
+GLOBAL LONG
+os_is_valid_partition(T_VOID_STRUCT *Buffer)
+{
+	int i;
+
+	for (i = 0; i <= MaxPoolGroups; i++) {
+		if (PoolBorder[i].End == 0)
+			return(OS_ERROR);
+		if ((char *)Buffer < PoolBorder[i].Start)
+			continue;
+		if ((char *)Buffer >= PoolBorder[i].End)
+			continue;
+		return(OS_OK);
+	}
+	return(OS_ERROR);
+}