Lines Matching +full:string +full:- +full:array +full:- +full:property

13 #include <linux/string.h>
40 /* Is boot-info compatible ? */
42 ((bi)->compatible_version <= BOOT_INFO_VERSION)
43 #define BOOT_INFO_IS_V2_COMPATIBLE(bi) ((bi)->version >= 2)
44 #define BOOT_INFO_IS_V4_COMPATIBLE(bi) ((bi)->version >= 4)
58 btext_drawtext(p, q - p); in bootx_printf()
96 u32 *ppp = &np->properties; in bootx_early_getprop()
102 if (strcmp((char *)((unsigned long)pp->name + base), in bootx_early_getprop()
104 return (void *)((unsigned long)pp->value + base); in bootx_early_getprop()
106 ppp = &pp->next; in bootx_early_getprop()
126 return s - os; in bootx_dt_find_string()
139 bootx_printf("WARNING: Can't find string index for <%s>\n", in bootx_dt_add_prop()
144 bootx_printf("WARNING: ignoring large property "); in bootx_dt_add_prop()
152 /* push property content */ in bootx_dt_add_prop()
166 if (bootx_info->kernelParamsOffset) { in bootx_add_chosen_props()
168 bootx_info->kernelParamsOffset; in bootx_add_chosen_props()
171 if (bootx_info->ramDisk) { in bootx_add_chosen_props()
172 val = ((unsigned long)bootx_info) + bootx_info->ramDisk; in bootx_add_chosen_props()
173 bootx_dt_add_prop("linux,initrd-start", &val, 4, mem_end); in bootx_add_chosen_props()
174 val += bootx_info->ramDiskSize; in bootx_add_chosen_props()
175 bootx_dt_add_prop("linux,initrd-end", &val, 4, mem_end); in bootx_add_chosen_props()
178 bootx_dt_add_prop("linux,stdout-path", bootx_disp_path, in bootx_add_chosen_props()
190 bootx_dt_add_prop("linux,boot-display", NULL, 0, mem_end); in bootx_add_display_props()
193 bootx_dt_add_prop("linux,bootx-noscreen", NULL, 0, mem_end); in bootx_add_display_props()
195 tmp = bi->dispDeviceDepth; in bootx_add_display_props()
196 bootx_dt_add_prop("linux,bootx-depth", &tmp, 4, mem_end); in bootx_add_display_props()
197 tmp = bi->dispDeviceRect[2] - bi->dispDeviceRect[0]; in bootx_add_display_props()
198 bootx_dt_add_prop("linux,bootx-width", &tmp, 4, mem_end); in bootx_add_display_props()
199 tmp = bi->dispDeviceRect[3] - bi->dispDeviceRect[1]; in bootx_add_display_props()
200 bootx_dt_add_prop("linux,bootx-height", &tmp, 4, mem_end); in bootx_add_display_props()
201 tmp = bi->dispDeviceRowBytes; in bootx_add_display_props()
202 bootx_dt_add_prop("linux,bootx-linebytes", &tmp, 4, mem_end); in bootx_add_display_props()
203 tmp = (u32)bi->dispDeviceBase; in bootx_add_display_props()
205 tmp = (u32)bi->logicalDisplayBase; in bootx_add_display_props()
206 tmp += bi->dispDeviceRect[1] * bi->dispDeviceRowBytes; in bootx_add_display_props()
207 tmp += bi->dispDeviceRect[0] * ((bi->dispDeviceDepth + 7) / 8); in bootx_add_display_props()
208 bootx_dt_add_prop("linux,bootx-addr", &tmp, 4, mem_end); in bootx_add_display_props()
223 u32 *cpp, *ppp = &np->properties; in bootx_scan_dt_build_strings()
228 namep = np->full_name ? (char *)(base + np->full_name) : NULL; in bootx_scan_dt_build_strings()
238 bootx_dt_add_string("linux,stdout-path", mem_end); in bootx_scan_dt_build_strings()
239 bootx_dt_add_string("linux,initrd-start", mem_end); in bootx_scan_dt_build_strings()
240 bootx_dt_add_string("linux,initrd-end", mem_end); in bootx_scan_dt_build_strings()
244 if (node == bootx_info->dispDeviceRegEntryOffset) { in bootx_scan_dt_build_strings()
246 bootx_dt_add_string("linux,boot-display", mem_end); in bootx_scan_dt_build_strings()
251 /* get and store all property names */ in bootx_scan_dt_build_strings()
256 namep = pp->name ? (char *)(base + pp->name) : NULL; in bootx_scan_dt_build_strings()
259 /* get/create string entry */ in bootx_scan_dt_build_strings()
264 ppp = &pp->next; in bootx_scan_dt_build_strings()
268 cpp = &np->child; in bootx_scan_dt_build_strings()
272 cpp = &np->sibling; in bootx_scan_dt_build_strings()
281 u32 *cpp, *ppp = &np->properties; in bootx_scan_dt_build_struct()
288 namep = np->full_name ? (char *)(base + np->full_name) : NULL; in bootx_scan_dt_build_struct()
315 namep = pp->name ? (char *)(base + pp->name) : NULL; in bootx_scan_dt_build_struct()
323 /* push property head */ in bootx_scan_dt_build_struct()
325 pp->value ? (void *)(base + pp->value): NULL, in bootx_scan_dt_build_struct()
326 pp->length, mem_end); in bootx_scan_dt_build_struct()
328 ppp = &pp->next; in bootx_scan_dt_build_struct()
333 if (bootx_info->dispDeviceRegEntryOffset == 0) in bootx_scan_dt_build_struct()
336 else if (node == bootx_info->dispDeviceRegEntryOffset) in bootx_scan_dt_build_struct()
340 cpp = &np->child; in bootx_scan_dt_build_struct()
344 cpp = &np->sibling; in bootx_scan_dt_build_struct()
366 hdr->off_mem_rsvmap = ((unsigned long)rsvmap) - mem_start; in bootx_flatten_dt()
370 base = ((unsigned long)bi) + bi->deviceTreeOffset; in bootx_flatten_dt()
372 /* Build string array */ in bootx_flatten_dt()
373 DBG("Building string array at: %x\n", mem_end); in bootx_flatten_dt()
380 bootx_dt_add_string("linux,bootx-noscreen", &mem_end); in bootx_flatten_dt()
381 bootx_dt_add_string("linux,bootx-depth", &mem_end); in bootx_flatten_dt()
382 bootx_dt_add_string("linux,bootx-width", &mem_end); in bootx_flatten_dt()
383 bootx_dt_add_string("linux,bootx-height", &mem_end); in bootx_flatten_dt()
384 bootx_dt_add_string("linux,bootx-linebytes", &mem_end); in bootx_flatten_dt()
385 bootx_dt_add_string("linux,bootx-addr", &mem_end); in bootx_flatten_dt()
387 hdr->off_dt_strings = bootx_dt_strbase - mem_start; in bootx_flatten_dt()
388 hdr->dt_strings_size = bootx_dt_strend - bootx_dt_strbase; in bootx_flatten_dt()
393 hdr->off_dt_struct = mem_end - mem_start; in bootx_flatten_dt()
398 hdr->boot_cpuid_phys = 0; in bootx_flatten_dt()
399 hdr->magic = OF_DT_HEADER; in bootx_flatten_dt()
400 hdr->totalsize = mem_end - mem_start; in bootx_flatten_dt()
401 hdr->version = OF_DT_VERSION; in bootx_flatten_dt()
403 hdr->last_comp_version = 0x10; in bootx_flatten_dt()
413 if (bootx_info->ramDisk) { in bootx_flatten_dt()
414 rsvmap[2] = ((unsigned long)bootx_info) + bootx_info->ramDisk; in bootx_flatten_dt()
415 rsvmap[3] = rsvmap[2] + bootx_info->ramDiskSize; in bootx_flatten_dt()
435 bootx_printf("\nframe buffer at : 0x%x", bi->dispDeviceBase); in btext_welcome()
436 bootx_printf(" (phys), 0x%x", bi->logicalDisplayBase); in btext_welcome()
455 bootx_printf("bi->deviceTreeOffset : 0x%x\n", in btext_welcome()
456 bi->deviceTreeOffset); in btext_welcome()
457 bootx_printf("bi->deviceTreeSize : 0x%x\n", in btext_welcome()
458 bi->deviceTreeSize); in btext_welcome()
485 bi->logicalDisplayBase = bi->dispDeviceBase; in bootx_init()
487 /* Fixup depth 16 -> 15 as that's what MacOS calls 16bpp */ in bootx_init()
488 if (bi->dispDeviceDepth == 16) in bootx_init()
489 bi->dispDeviceDepth = 15; in bootx_init()
493 ptr = (unsigned long)bi->logicalDisplayBase; in bootx_init()
494 ptr += bi->dispDeviceRect[1] * bi->dispDeviceRowBytes; in bootx_init()
495 ptr += bi->dispDeviceRect[0] * ((bi->dispDeviceDepth + 7) / 8); in bootx_init()
496 btext_setup_display(bi->dispDeviceRect[2] - bi->dispDeviceRect[0], in bootx_init()
497 bi->dispDeviceRect[3] - bi->dispDeviceRect[1], in bootx_init()
498 bi->dispDeviceDepth, bi->dispDeviceRowBytes, in bootx_init()
499 (unsigned long)bi->logicalDisplayBase); in bootx_init()
505 * Test if boot-info is compatible. Done only in config in bootx_init()
510 * I'll try to keep enough of boot-info compatible in the in bootx_init()
514 bootx_printf(" !!! WARNING - Incompatible version" in bootx_init()
519 if (bi->architecture != BOOT_ARCH_PCI) { in bootx_init()
520 bootx_printf(" !!! WARNING - Usupported machine" in bootx_init()
533 if (bi->version < 4) { in bootx_init()
537 model = (char *) bootx_early_getprop(r4 + bi->deviceTreeOffset, in bootx_init()
550 if (bi->version < 5) { in bootx_init()
551 space = bi->deviceTreeOffset + bi->deviceTreeSize; in bootx_init()
552 if (bi->ramDisk >= space) in bootx_init()
553 space = bi->ramDisk + bi->ramDiskSize; in bootx_init()
555 space = bi->totalParamsSize; in bootx_init()
562 if (bi->version < 4) { in bootx_init()
567 * are in the hash table - the aim is to try to avoid in bootx_init()
575 /* Ok, now we need to generate a flattened device-tree to pass in bootx_init()
591 reloc_got2(-offset); in bootx_init()