1 #include <linux/kernel.h>
2 #include <linux/module.h>
7 #include <asm/pgtable.h>
11 static int (*olpc_ofw_cif)(
int *);
55 ofw_args[0] = (
int)name;
60 for (i = 0; i <
nr_args; i++, p++)
65 ret = olpc_ofw_cif(ofw_args);
66 spin_unlock_irqrestore(&ofw_lock, flags);
69 for (i = 0; i < nr_res; i++, p++)
70 *((
int *)res[i]) = *
p;
79 return olpc_ofw_cif !=
NULL;
84 #define OFW_MIN 0xff000000
87 #define OFW_BOUND (1<<20)
100 if ((
unsigned long)olpc_ofw_cif <
OFW_MIN) {
101 printk(
KERN_ERR "OFW detected, but cif has invalid address 0x%lx - disabling.\n",
102 (
unsigned long)olpc_ofw_cif);
109 printk(
KERN_INFO "OFW detected in memory, cif @ 0x%lx (reserving top %ldMB)\n",
110 (
unsigned long)olpc_ofw_cif, (-start) >> 20);
116 return olpc_ofw_cif !=
NULL;