14 #include <linux/kernel.h>
19 #include <asm/machdep.h>
21 static unsigned int nvram_size;
23 static ssize_t opal_nvram_size(
void)
33 if (*index >= nvram_size)
36 if ((off + count) > nvram_size)
37 count = nvram_size - off;
45 static ssize_t opal_nvram_write(
char *buf,
size_t count, loff_t *index)
50 if (*index >= nvram_size)
53 if ((off + count) > nvram_size)
54 count = nvram_size - off;
79 nvram_size = *nbytes_p;
84 ppc_md.nvram_read = opal_nvram_read;
85 ppc_md.nvram_write = opal_nvram_write;
86 ppc_md.nvram_size = opal_nvram_size;