13 #include <linux/kernel.h>
14 #include <linux/types.h>
15 #include <asm/setup.h>
23 struct tag *
tag = (
struct tag *) 0x08003000;
32 tag->
u.
core.flags = 1;
34 tag->
u.
core.rootdev = 0;
38 nr_banks=(
unsigned int) buffer[0];
39 for (j=0;j<nr_banks;j++){
44 for (i=0;i<(
unsigned int) buffer[0];i++){
45 if (buffer[2*i+1]<m) {
54 tag->
u.
mem.size = buffer[2*k+2];
55 tag->
u.
mem.start = buffer[2*k+1];
57 size += buffer[2*k+2];
59 buffer[2*k+1]=0xffffffff;
66 c=(
unsigned char *)(&buffer[34]);
68 while (*c) tag->
u.
cmdline.cmdline[j++]=*c++;
97 unsigned int i = *p++ << 8;
106 unsigned int args[8];
121 args[0]=(
unsigned int)service;
124 args[3]=(
unsigned int)name;
126 if (openfirmware(args) == -1)
134 unsigned int args[8];
149 args[0] = (
unsigned int)service;
152 args[3] = (
unsigned int)handle;
153 args[4] = (
unsigned int)prop;
155 if (openfirmware(args) == -1)
163 unsigned int args[8];
175 args[0] = (
unsigned int)service;
178 args[3] = (
unsigned int)handle;
179 args[4] = (
unsigned int)prop;
180 args[5] = (
unsigned int)buf;
183 if (openfirmware(args) == -1)
213 for (i=0; i<=mem_len/4; i++) pointer[i]=
of_decode_int((
const unsigned char *)&buffer[i]);
238 if (mem_len > 128) mem_len=128;
239 for (i=0; i<=mem_len/4; i++) pointer[i+33]=buffer[i];
259 * ((
unsigned char *) &pointer[32]) = ((
unsigned char *) buffer)[mem_len-2];