void platform_init(unsigned long r3, unsigned long r4, unsigned long r5) { u32 heapsize = 0x8000000 - (u32)_end; /* 128M */ simple_alloc_init(_end, heapsize, 32, 64); fdt_init(_dtb_start); serial_console_init(); }
void platform_init(void) { unsigned long end_of_ram = 0x8000000; unsigned long avail_ram = end_of_ram - (unsigned long)_end; simple_alloc_init(_end, avail_ram, 32, 64); ebony_init((u8 *)OPENBIOS_MAC_BASE, (u8 *)(OPENBIOS_MAC_BASE + OPENBIOS_MAC_OFFSET)); }
void platform_init(void) { unsigned long end_of_ram = 0x8000000; unsigned long avail_ram = end_of_ram - (unsigned long)_end; simple_alloc_init(_end, avail_ram, 32, 64); read_pibs_mac(); bamboo_init((u8 *)&pibs_mac0, (u8 *)&pibs_mac1); }
void cuboot_init(unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, unsigned long end_of_ram) { unsigned long avail_ram = end_of_ram - (unsigned long)_end; loader_info.initrd_addr = r4; loader_info.initrd_size = r4 ? r5 - r4 : 0; loader_info.cmdline = (char *)r6; loader_info.cmdline_len = r7 - r6; simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64); }
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5) { u32 heapsize = 24*1024*1024 - (u32)_end; simple_alloc_init(_end, heapsize, 32, 64); fdt_init(_dtb_start); if (!ug_grab_io_base() && ug_is_adapter_present()) console_ops.write = ug_console_write; platform_ops.fixups = platform_fixups; save_lowmem_stub(); }
#include <stdarg.h> #include <stddef.h> #include "types.h" #include "elf.h" #include "string.h" #include "stdio.h" #include "page.h" #include "ops.h" #include "reg.h" #include "io.h" #include "dcr.h" #include "4xx.h" #include "44x.h" #include "libfdt.h" BSS_STACK(4096); static void iss_4xx_fixups(void) { ibm4xx_sdram_fixup_memsize(); } #define SPRN_PIR 0x11E /* Processor Indentification Register */ void platform_init(void) { unsigned long end_of_ram = 0x08000000; unsigned long avail_ram = end_of_ram - (unsigned long)_end; u32 pir_reg; simple_alloc_init(_end, avail_ram, 128, 64); platform_ops.fixups = iss_4xx_fixups; platform_ops.exit = ibm44x_dbcr_reset; pir_reg = mfspr(SPRN_PIR); fdt_set_boot_cpuid_phys(_dtb_start, pir_reg); fdt_init(_dtb_start); serial_console_init(); }
void epapr_platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { epapr_magic = r6; ima_size = r7; fdt_addr = r3; /* FIXME: we should process reserve entries */ simple_alloc_init(_end, ima_size - (unsigned long)_end, 32, 64); fdt_init((void *)fdt_addr); serial_console_init(); platform_ops.fixups = platform_fixups; }
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { mem_size = 64 * 1024 * 1024; simple_alloc_init(_end, mem_size - (u32)_end - 1024*1024, 32, 64); fdt_init(_dtb_start); serial_console_init(); printf("\n\r-- TL-WDR4900 v1 boot wrapper --\n\r"); process_boot_dtb((void *) r3); platform_ops.fixups = platform_fixups; }
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize; unsigned long avail_ram = end_of_ram - (unsigned long)_end; memcpy(&bd, (bd_t *)r3, sizeof(bd)); loader_info.initrd_addr = r4; loader_info.initrd_size = r4 ? r5 - r4 : 0; loader_info.cmdline = (char *)r6; loader_info.cmdline_len = r7 - r6; simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64); ft_init(_dtb_start, _dtb_end - _dtb_start, 32); serial_console_init(); platform_ops.fixups = platform_fixups; }
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { table = (char *)r3; planetcore_prepare_table(table); if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size)) return; mem_size *= 1024 * 1024; simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64); fdt_init(_dtb_start); planetcore_set_stdout_path(table); serial_console_init(); platform_ops.fixups = platform_fixups; }
void platform_init(unsigned long null_check) { const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ void *chosen; unsigned long ft_addr; u64 rm_size; unsigned long val; console_ops.write = ps3_console_write; platform_ops.exit = ps3_exit; printf("\n-- PS3 bootwrapper --\n"); simple_alloc_init(_end, heapsize, 32, 64); fdt_init(_dtb_start); chosen = finddevice("/chosen"); ps3_repository_read_rm_size(&rm_size); dt_fixup_memory(0, rm_size); if (_initrd_end > _initrd_start) { setprop_val(chosen, "linux,initrd-start", (u32)(_initrd_start)); setprop_val(chosen, "linux,initrd-end", (u32)(_initrd_end)); } prep_cmdline(chosen); ft_addr = dt_ops.finalize(); ps3_copy_vectors(); printf(" flat tree at 0x%lx\n\r", ft_addr); val = *(unsigned long *)0; if (val != null_check) printf("null check failed: %lx != %lx\n\r", val, null_check); ((kernel_entry_t)0)(ft_addr, 0, NULL); ps3_exit(); }
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { memcpy(&bd, (char *)r3, sizeof(bd)); if (bd.bi_tag != 0x42444944) return; simple_alloc_init(_end, bd.bi_memstart + bd.bi_memsize - (unsigned long)_end, 32, 64); fdt_init(_dtb_start); serial_console_init(); platform_ops.fixups = platform_fixups; loader_info.cmdline = (char *)bd.bi_cmdline; loader_info.cmdline_len = strlen((char *)bd.bi_cmdline); }
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { const u32 *na, *ns, *reg, *timebase; u64 memsize64; int node, size, i; void *the_dtb = _dtb_start; /* See if we were passed a DTB in the regs. If so, use that instead */ if (fdt_check_header((void *)r3) == 0) the_dtb = (void *)r3; /* Make sure FDT blob is sane */ if (fdt_check_header(the_dtb) != 0) fatal("Invalid device tree blob\n"); /* Find the #address-cells and #size-cells properties */ node = fdt_path_offset(the_dtb, "/"); if (node < 0) fatal("Cannot find root node\n"); na = fdt_getprop(the_dtb, node, "#address-cells", &size); if (!na || (size != 4)) fatal("Cannot find #address-cells property"); ns = fdt_getprop(the_dtb, node, "#size-cells", &size); if (!ns || (size != 4)) fatal("Cannot find #size-cells property"); /* Find the memory range */ node = fdt_node_offset_by_prop_value(the_dtb, -1, "device_type", "memory", sizeof("memory")); if (node < 0) fatal("Cannot find memory node\n"); reg = fdt_getprop(the_dtb, node, "reg", &size); if (size < (*na+*ns) * sizeof(u32)) fatal("cannot get memory range\n"); /* Only interested in memory based at 0 */ for (i = 0; i < *na; i++) if (*reg++ != 0) fatal("Memory range is not based at address 0\n"); /* get the memsize and trucate it to under 4G on 32 bit machines */ memsize64 = 0; for (i = 0; i < *ns; i++) memsize64 = (memsize64 << 32) | *reg++; if (sizeof(void *) == 4 && memsize64 >= 0x100000000ULL) memsize64 = 0xffffffff; /* finally, setup the timebase */ node = fdt_node_offset_by_prop_value(the_dtb, -1, "device_type", "cpu", sizeof("cpu")); if (!node) fatal("Cannot find cpu node\n"); timebase = fdt_getprop(the_dtb, node, "timebase-frequency", &size); if (timebase && (size == 4)) timebase_period_ns = 1000000000 / *timebase; /* Now we have the memory size; initialize the heap */ simple_alloc_init(_end, memsize64 - (unsigned long)_end, 32, 64); /* prepare the device tree and find the console */ fdt_init(the_dtb); if (platform_specific_init) platform_specific_init(); serial_console_init(); }
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { const u32 *na, *ns, *reg, *timebase; u64 memsize64; int node, size, i; /* */ if (fdt_check_header(_dtb_start) != 0) fatal("Invalid device tree blob\n"); /* */ node = fdt_path_offset(_dtb_start, "/"); if (node < 0) fatal("Cannot find root node\n"); na = fdt_getprop(_dtb_start, node, "#address-cells", &size); if (!na || (size != 4)) fatal("Cannot find #address-cells property"); ns = fdt_getprop(_dtb_start, node, "#size-cells", &size); if (!ns || (size != 4)) fatal("Cannot find #size-cells property"); /* */ node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type", "memory", sizeof("memory")); if (node < 0) fatal("Cannot find memory node\n"); reg = fdt_getprop(_dtb_start, node, "reg", &size); if (size < (*na+*ns) * sizeof(u32)) fatal("cannot get memory range\n"); /* */ for (i = 0; i < *na; i++) if (*reg++ != 0) fatal("Memory range is not based at address 0\n"); /* */ memsize64 = 0; for (i = 0; i < *ns; i++) memsize64 = (memsize64 << 32) | *reg++; if (sizeof(void *) == 4 && memsize64 >= 0x100000000ULL) memsize64 = 0xffffffff; /* */ node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type", "cpu", sizeof("cpu")); if (!node) fatal("Cannot find cpu node\n"); timebase = fdt_getprop(_dtb_start, node, "timebase-frequency", &size); if (timebase && (size == 4)) timebase_period_ns = 1000000000 / *timebase; /* */ simple_alloc_init(_end, memsize64 - (unsigned long)_end, 32, 64); /* */ fdt_init(_dtb_start); if (platform_specific_init) platform_specific_init(); serial_console_init(); }