Lines Matching refs:mem_end

132 				  unsigned long *mem_end)  in bootx_dt_add_prop()  argument
147 dt_push_token(OF_DT_PROP, mem_end); in bootx_dt_add_prop()
148 dt_push_token(size, mem_end); in bootx_dt_add_prop()
149 dt_push_token(soff, mem_end); in bootx_dt_add_prop()
153 memcpy((void *)*mem_end, data, size); in bootx_dt_add_prop()
154 *mem_end = ALIGN(*mem_end + size, 4); in bootx_dt_add_prop()
159 unsigned long *mem_end) in bootx_add_chosen_props() argument
163 bootx_dt_add_prop("linux,bootx", NULL, 0, mem_end); in bootx_add_chosen_props()
168 bootx_dt_add_prop("bootargs", args, strlen(args) + 1, mem_end); in bootx_add_chosen_props()
172 bootx_dt_add_prop("linux,initrd-start", &val, 4, mem_end); in bootx_add_chosen_props()
174 bootx_dt_add_prop("linux,initrd-end", &val, 4, mem_end); in bootx_add_chosen_props()
178 strlen(bootx_disp_path) + 1, mem_end); in bootx_add_chosen_props()
182 unsigned long *mem_end, in bootx_add_display_props() argument
189 bootx_dt_add_prop("linux,boot-display", NULL, 0, mem_end); in bootx_add_display_props()
190 bootx_dt_add_prop("linux,opened", NULL, 0, mem_end); in bootx_add_display_props()
192 bootx_dt_add_prop("linux,bootx-noscreen", NULL, 0, mem_end); in bootx_add_display_props()
195 bootx_dt_add_prop("linux,bootx-depth", &tmp, 4, mem_end); in bootx_add_display_props()
197 bootx_dt_add_prop("linux,bootx-width", &tmp, 4, mem_end); in bootx_add_display_props()
199 bootx_dt_add_prop("linux,bootx-height", &tmp, 4, mem_end); in bootx_add_display_props()
201 bootx_dt_add_prop("linux,bootx-linebytes", &tmp, 4, mem_end); in bootx_add_display_props()
207 bootx_dt_add_prop("linux,bootx-addr", &tmp, 4, mem_end); in bootx_add_display_props()
210 static void __init bootx_dt_add_string(char *s, unsigned long *mem_end) in bootx_dt_add_string() argument
213 memcpy((void *)*mem_end, s, l); in bootx_dt_add_string()
214 bootx_dt_strend = *mem_end = *mem_end + l; in bootx_dt_add_string()
219 unsigned long *mem_end) in bootx_scan_dt_build_strings() argument
236 bootx_dt_add_string("linux,bootx", mem_end); in bootx_scan_dt_build_strings()
237 bootx_dt_add_string("linux,stdout-path", mem_end); in bootx_scan_dt_build_strings()
238 bootx_dt_add_string("linux,initrd-start", mem_end); in bootx_scan_dt_build_strings()
239 bootx_dt_add_string("linux,initrd-end", mem_end); in bootx_scan_dt_build_strings()
240 bootx_dt_add_string("bootargs", mem_end); in bootx_scan_dt_build_strings()
245 bootx_dt_add_string("linux,boot-display", mem_end); in bootx_scan_dt_build_strings()
246 bootx_dt_add_string("linux,opened", mem_end); in bootx_scan_dt_build_strings()
261 bootx_dt_add_string(namep, mem_end); in bootx_scan_dt_build_strings()
270 bootx_scan_dt_build_strings(base, *cpp, mem_end); in bootx_scan_dt_build_strings()
277 unsigned long *mem_end) in bootx_scan_dt_build_struct() argument
284 dt_push_token(OF_DT_BEGIN_NODE, mem_end); in bootx_scan_dt_build_struct()
298 memcpy((void *)*mem_end, namep, l + 1); in bootx_scan_dt_build_struct()
299 namep = (char *)*mem_end; in bootx_scan_dt_build_struct()
307 *mem_end = ALIGN((unsigned long)lp + 1, 4); in bootx_scan_dt_build_struct()
325 pp->length, mem_end); in bootx_scan_dt_build_struct()
331 bootx_add_chosen_props(base, mem_end); in bootx_scan_dt_build_struct()
333 bootx_add_display_props(base, mem_end, 0); in bootx_scan_dt_build_struct()
336 bootx_add_display_props(base, mem_end, 1); in bootx_scan_dt_build_struct()
342 bootx_scan_dt_build_struct(base, *cpp, mem_end); in bootx_scan_dt_build_struct()
346 dt_push_token(OF_DT_END_NODE, mem_end); in bootx_scan_dt_build_struct()
352 unsigned long mem_start, mem_end; in bootx_flatten_dt() local
360 mem_start = mem_end = ALIGN(((unsigned long)bi) + start, 4); in bootx_flatten_dt()
363 mem_end += sizeof(struct boot_param_header); in bootx_flatten_dt()
364 rsvmap = (u64 *)(ALIGN(mem_end, 8)); in bootx_flatten_dt()
366 mem_end = ((unsigned long)rsvmap) + 8 * sizeof(u64); in bootx_flatten_dt()
372 DBG("Building string array at: %x\n", mem_end); in bootx_flatten_dt()
374 bootx_dt_strbase = mem_end; in bootx_flatten_dt()
375 mem_end += 4; in bootx_flatten_dt()
376 bootx_dt_strend = mem_end; in bootx_flatten_dt()
377 bootx_scan_dt_build_strings(base, 4, &mem_end); in bootx_flatten_dt()
379 bootx_dt_add_string("linux,bootx-noscreen", &mem_end); in bootx_flatten_dt()
380 bootx_dt_add_string("linux,bootx-depth", &mem_end); in bootx_flatten_dt()
381 bootx_dt_add_string("linux,bootx-width", &mem_end); in bootx_flatten_dt()
382 bootx_dt_add_string("linux,bootx-height", &mem_end); in bootx_flatten_dt()
383 bootx_dt_add_string("linux,bootx-linebytes", &mem_end); in bootx_flatten_dt()
384 bootx_dt_add_string("linux,bootx-addr", &mem_end); in bootx_flatten_dt()
390 mem_end = ALIGN(mem_end, 16); in bootx_flatten_dt()
391 DBG("Building device tree structure at: %x\n", mem_end); in bootx_flatten_dt()
392 hdr->off_dt_struct = mem_end - mem_start; in bootx_flatten_dt()
393 bootx_scan_dt_build_struct(base, 4, &mem_end); in bootx_flatten_dt()
394 dt_push_token(OF_DT_END, &mem_end); in bootx_flatten_dt()
399 hdr->totalsize = mem_end - mem_start; in bootx_flatten_dt()
408 mem_end = ALIGN(mem_end, PAGE_SIZE); in bootx_flatten_dt()
409 DBG("End of boot params: %x\n", mem_end); in bootx_flatten_dt()
411 rsvmap[1] = mem_end; in bootx_flatten_dt()