Lines Matching refs:mem_end

131 				  unsigned long *mem_end)  in bootx_dt_add_prop()  argument
146 dt_push_token(OF_DT_PROP, mem_end); in bootx_dt_add_prop()
147 dt_push_token(size, mem_end); in bootx_dt_add_prop()
148 dt_push_token(soff, mem_end); in bootx_dt_add_prop()
152 memcpy((void *)*mem_end, data, size); in bootx_dt_add_prop()
153 *mem_end = ALIGN(*mem_end + size, 4); in bootx_dt_add_prop()
158 unsigned long *mem_end) in bootx_add_chosen_props() argument
162 bootx_dt_add_prop("linux,bootx", NULL, 0, mem_end); in bootx_add_chosen_props()
167 bootx_dt_add_prop("bootargs", args, strlen(args) + 1, mem_end); in bootx_add_chosen_props()
171 bootx_dt_add_prop("linux,initrd-start", &val, 4, mem_end); in bootx_add_chosen_props()
173 bootx_dt_add_prop("linux,initrd-end", &val, 4, mem_end); in bootx_add_chosen_props()
177 strlen(bootx_disp_path) + 1, mem_end); in bootx_add_chosen_props()
181 unsigned long *mem_end, in bootx_add_display_props() argument
188 bootx_dt_add_prop("linux,boot-display", NULL, 0, mem_end); in bootx_add_display_props()
189 bootx_dt_add_prop("linux,opened", NULL, 0, mem_end); in bootx_add_display_props()
191 bootx_dt_add_prop("linux,bootx-noscreen", NULL, 0, mem_end); in bootx_add_display_props()
194 bootx_dt_add_prop("linux,bootx-depth", &tmp, 4, mem_end); in bootx_add_display_props()
196 bootx_dt_add_prop("linux,bootx-width", &tmp, 4, mem_end); in bootx_add_display_props()
198 bootx_dt_add_prop("linux,bootx-height", &tmp, 4, mem_end); in bootx_add_display_props()
200 bootx_dt_add_prop("linux,bootx-linebytes", &tmp, 4, mem_end); in bootx_add_display_props()
206 bootx_dt_add_prop("linux,bootx-addr", &tmp, 4, mem_end); in bootx_add_display_props()
209 static void __init bootx_dt_add_string(char *s, unsigned long *mem_end) in bootx_dt_add_string() argument
212 memcpy((void *)*mem_end, s, l); in bootx_dt_add_string()
213 bootx_dt_strend = *mem_end = *mem_end + l; in bootx_dt_add_string()
218 unsigned long *mem_end) in bootx_scan_dt_build_strings() argument
235 bootx_dt_add_string("linux,bootx", mem_end); in bootx_scan_dt_build_strings()
236 bootx_dt_add_string("linux,stdout-path", mem_end); in bootx_scan_dt_build_strings()
237 bootx_dt_add_string("linux,initrd-start", mem_end); in bootx_scan_dt_build_strings()
238 bootx_dt_add_string("linux,initrd-end", mem_end); in bootx_scan_dt_build_strings()
239 bootx_dt_add_string("bootargs", mem_end); in bootx_scan_dt_build_strings()
244 bootx_dt_add_string("linux,boot-display", mem_end); in bootx_scan_dt_build_strings()
245 bootx_dt_add_string("linux,opened", mem_end); in bootx_scan_dt_build_strings()
260 bootx_dt_add_string(namep, mem_end); in bootx_scan_dt_build_strings()
269 bootx_scan_dt_build_strings(base, *cpp, mem_end); in bootx_scan_dt_build_strings()
276 unsigned long *mem_end) in bootx_scan_dt_build_struct() argument
283 dt_push_token(OF_DT_BEGIN_NODE, mem_end); in bootx_scan_dt_build_struct()
297 memcpy((void *)*mem_end, namep, l + 1); in bootx_scan_dt_build_struct()
298 namep = (char *)*mem_end; in bootx_scan_dt_build_struct()
306 *mem_end = ALIGN((unsigned long)lp + 1, 4); in bootx_scan_dt_build_struct()
324 pp->length, mem_end); in bootx_scan_dt_build_struct()
330 bootx_add_chosen_props(base, mem_end); in bootx_scan_dt_build_struct()
332 bootx_add_display_props(base, mem_end, 0); in bootx_scan_dt_build_struct()
335 bootx_add_display_props(base, mem_end, 1); in bootx_scan_dt_build_struct()
341 bootx_scan_dt_build_struct(base, *cpp, mem_end); in bootx_scan_dt_build_struct()
345 dt_push_token(OF_DT_END_NODE, mem_end); in bootx_scan_dt_build_struct()
351 unsigned long mem_start, mem_end; in bootx_flatten_dt() local
359 mem_start = mem_end = ALIGN(((unsigned long)bi) + start, 4); in bootx_flatten_dt()
362 mem_end += sizeof(struct boot_param_header); in bootx_flatten_dt()
363 rsvmap = (u64 *)(ALIGN(mem_end, 8)); in bootx_flatten_dt()
365 mem_end = ((unsigned long)rsvmap) + 8 * sizeof(u64); in bootx_flatten_dt()
371 DBG("Building string array at: %x\n", mem_end); in bootx_flatten_dt()
373 bootx_dt_strbase = mem_end; in bootx_flatten_dt()
374 mem_end += 4; in bootx_flatten_dt()
375 bootx_dt_strend = mem_end; in bootx_flatten_dt()
376 bootx_scan_dt_build_strings(base, 4, &mem_end); in bootx_flatten_dt()
378 bootx_dt_add_string("linux,bootx-noscreen", &mem_end); in bootx_flatten_dt()
379 bootx_dt_add_string("linux,bootx-depth", &mem_end); in bootx_flatten_dt()
380 bootx_dt_add_string("linux,bootx-width", &mem_end); in bootx_flatten_dt()
381 bootx_dt_add_string("linux,bootx-height", &mem_end); in bootx_flatten_dt()
382 bootx_dt_add_string("linux,bootx-linebytes", &mem_end); in bootx_flatten_dt()
383 bootx_dt_add_string("linux,bootx-addr", &mem_end); in bootx_flatten_dt()
389 mem_end = ALIGN(mem_end, 16); in bootx_flatten_dt()
390 DBG("Building device tree structure at: %x\n", mem_end); in bootx_flatten_dt()
391 hdr->off_dt_struct = mem_end - mem_start; in bootx_flatten_dt()
392 bootx_scan_dt_build_struct(base, 4, &mem_end); in bootx_flatten_dt()
393 dt_push_token(OF_DT_END, &mem_end); in bootx_flatten_dt()
398 hdr->totalsize = mem_end - mem_start; in bootx_flatten_dt()
407 mem_end = ALIGN(mem_end, PAGE_SIZE); in bootx_flatten_dt()
408 DBG("End of boot params: %x\n", mem_end); in bootx_flatten_dt()
410 rsvmap[1] = mem_end; in bootx_flatten_dt()