Lines Matching refs:mem_end

134 				  unsigned long *mem_end)  in bootx_dt_add_prop()  argument
149 dt_push_token(OF_DT_PROP, mem_end); in bootx_dt_add_prop()
150 dt_push_token(size, mem_end); in bootx_dt_add_prop()
151 dt_push_token(soff, mem_end); in bootx_dt_add_prop()
155 memcpy((void *)*mem_end, data, size); in bootx_dt_add_prop()
156 *mem_end = _ALIGN_UP(*mem_end + size, 4); in bootx_dt_add_prop()
161 unsigned long *mem_end) in bootx_add_chosen_props() argument
165 bootx_dt_add_prop("linux,bootx", NULL, 0, mem_end); in bootx_add_chosen_props()
170 bootx_dt_add_prop("bootargs", args, strlen(args) + 1, mem_end); in bootx_add_chosen_props()
174 bootx_dt_add_prop("linux,initrd-start", &val, 4, mem_end); in bootx_add_chosen_props()
176 bootx_dt_add_prop("linux,initrd-end", &val, 4, mem_end); in bootx_add_chosen_props()
180 strlen(bootx_disp_path) + 1, mem_end); in bootx_add_chosen_props()
184 unsigned long *mem_end, in bootx_add_display_props() argument
191 bootx_dt_add_prop("linux,boot-display", NULL, 0, mem_end); in bootx_add_display_props()
192 bootx_dt_add_prop("linux,opened", NULL, 0, mem_end); in bootx_add_display_props()
194 bootx_dt_add_prop("linux,bootx-noscreen", NULL, 0, mem_end); in bootx_add_display_props()
197 bootx_dt_add_prop("linux,bootx-depth", &tmp, 4, mem_end); in bootx_add_display_props()
199 bootx_dt_add_prop("linux,bootx-width", &tmp, 4, mem_end); in bootx_add_display_props()
201 bootx_dt_add_prop("linux,bootx-height", &tmp, 4, mem_end); in bootx_add_display_props()
203 bootx_dt_add_prop("linux,bootx-linebytes", &tmp, 4, mem_end); in bootx_add_display_props()
209 bootx_dt_add_prop("linux,bootx-addr", &tmp, 4, mem_end); in bootx_add_display_props()
212 static void __init bootx_dt_add_string(char *s, unsigned long *mem_end) in bootx_dt_add_string() argument
215 memcpy((void *)*mem_end, s, l); in bootx_dt_add_string()
216 bootx_dt_strend = *mem_end = *mem_end + l; in bootx_dt_add_string()
221 unsigned long *mem_end) in bootx_scan_dt_build_strings() argument
238 bootx_dt_add_string("linux,bootx", mem_end); in bootx_scan_dt_build_strings()
239 bootx_dt_add_string("linux,stdout-path", mem_end); in bootx_scan_dt_build_strings()
240 bootx_dt_add_string("linux,initrd-start", mem_end); in bootx_scan_dt_build_strings()
241 bootx_dt_add_string("linux,initrd-end", mem_end); in bootx_scan_dt_build_strings()
242 bootx_dt_add_string("bootargs", mem_end); in bootx_scan_dt_build_strings()
247 bootx_dt_add_string("linux,boot-display", mem_end); in bootx_scan_dt_build_strings()
248 bootx_dt_add_string("linux,opened", mem_end); in bootx_scan_dt_build_strings()
263 bootx_dt_add_string(namep, mem_end); in bootx_scan_dt_build_strings()
272 bootx_scan_dt_build_strings(base, *cpp, mem_end); in bootx_scan_dt_build_strings()
279 unsigned long *mem_end) in bootx_scan_dt_build_struct() argument
286 dt_push_token(OF_DT_BEGIN_NODE, mem_end); in bootx_scan_dt_build_struct()
300 memcpy((void *)*mem_end, namep, l + 1); in bootx_scan_dt_build_struct()
301 namep = (char *)*mem_end; in bootx_scan_dt_build_struct()
309 *mem_end = _ALIGN_UP((unsigned long)lp + 1, 4); in bootx_scan_dt_build_struct()
327 pp->length, mem_end); in bootx_scan_dt_build_struct()
333 bootx_add_chosen_props(base, mem_end); in bootx_scan_dt_build_struct()
335 bootx_add_display_props(base, mem_end, 0); in bootx_scan_dt_build_struct()
338 bootx_add_display_props(base, mem_end, 1); in bootx_scan_dt_build_struct()
344 bootx_scan_dt_build_struct(base, *cpp, mem_end); in bootx_scan_dt_build_struct()
348 dt_push_token(OF_DT_END_NODE, mem_end); in bootx_scan_dt_build_struct()
354 unsigned long mem_start, mem_end; in bootx_flatten_dt() local
362 mem_start = mem_end = _ALIGN_UP(((unsigned long)bi) + start, 4); in bootx_flatten_dt()
365 mem_end += sizeof(struct boot_param_header); in bootx_flatten_dt()
366 rsvmap = (u64 *)(_ALIGN_UP(mem_end, 8)); in bootx_flatten_dt()
368 mem_end = ((unsigned long)rsvmap) + 8 * sizeof(u64); in bootx_flatten_dt()
374 DBG("Building string array at: %x\n", mem_end); in bootx_flatten_dt()
376 bootx_dt_strbase = mem_end; in bootx_flatten_dt()
377 mem_end += 4; in bootx_flatten_dt()
378 bootx_dt_strend = mem_end; in bootx_flatten_dt()
379 bootx_scan_dt_build_strings(base, 4, &mem_end); in bootx_flatten_dt()
381 bootx_dt_add_string("linux,bootx-noscreen", &mem_end); in bootx_flatten_dt()
382 bootx_dt_add_string("linux,bootx-depth", &mem_end); in bootx_flatten_dt()
383 bootx_dt_add_string("linux,bootx-width", &mem_end); in bootx_flatten_dt()
384 bootx_dt_add_string("linux,bootx-height", &mem_end); in bootx_flatten_dt()
385 bootx_dt_add_string("linux,bootx-linebytes", &mem_end); in bootx_flatten_dt()
386 bootx_dt_add_string("linux,bootx-addr", &mem_end); in bootx_flatten_dt()
392 mem_end = _ALIGN(mem_end, 16); in bootx_flatten_dt()
393 DBG("Building device tree structure at: %x\n", mem_end); in bootx_flatten_dt()
394 hdr->off_dt_struct = mem_end - mem_start; in bootx_flatten_dt()
395 bootx_scan_dt_build_struct(base, 4, &mem_end); in bootx_flatten_dt()
396 dt_push_token(OF_DT_END, &mem_end); in bootx_flatten_dt()
401 hdr->totalsize = mem_end - mem_start; in bootx_flatten_dt()
410 mem_end = _ALIGN(mem_end, PAGE_SIZE); in bootx_flatten_dt()
411 DBG("End of boot params: %x\n", mem_end); in bootx_flatten_dt()
413 rsvmap[1] = mem_end; in bootx_flatten_dt()