Deleted Added
full compact
82c82
< __FBSDID("$FreeBSD: head/sys/powerpc/booke/machdep.c 209613 2010-06-30 18:03:42Z jhb $");
---
> __FBSDID("$FreeBSD: head/sys/powerpc/booke/machdep.c 209908 2010-07-11 21:08:29Z raj $");
133d132
< #include <machine/bootinfo.h>
139c138,140
< #include <powerpc/mpc85xx/ocpbus.h>
---
> #include <dev/fdt/fdt_common.h>
> #include <dev/ofw/openfirm.h>
>
172,173d172
< struct bootinfo *bootinfo;
<
188d186
< void print_bootinfo(void);
262,295d259
< print_bootinfo(void)
< {
< struct bi_mem_region *mr;
< struct bi_eth_addr *eth;
< int i, j;
<
< debugf("bootinfo:\n");
< if (bootinfo == NULL) {
< debugf(" no bootinfo, null ptr\n");
< return;
< }
<
< debugf(" version = 0x%08x\n", bootinfo->bi_version);
< debugf(" ccsrbar = 0x%08x\n", bootinfo->bi_bar_base);
< debugf(" cpu_clk = 0x%08x\n", bootinfo->bi_cpu_clk);
< debugf(" bus_clk = 0x%08x\n", bootinfo->bi_bus_clk);
<
< debugf(" mem regions:\n");
< mr = (struct bi_mem_region *)bootinfo->bi_data;
< for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++)
< debugf(" #%d, base = 0x%08x, size = 0x%08x\n", i,
< mr->mem_base, mr->mem_size);
<
< debugf(" eth addresses:\n");
< eth = (struct bi_eth_addr *)mr;
< for (i = 0; i < bootinfo->bi_eth_addr_no; i++, eth++) {
< debugf(" #%d, addr = ", i);
< for (j = 0; j < 6; j++)
< debugf("%02x ", eth->mac_addr[j]);
< debugf("\n");
< }
< }
<
< void
309,331d272
< struct bi_mem_region *
< bootinfo_mr(void)
< {
<
< return ((struct bi_mem_region *)bootinfo->bi_data);
< }
<
< struct bi_eth_addr *
< bootinfo_eth(void)
< {
< struct bi_mem_region *mr;
< struct bi_eth_addr *eth;
< int i;
<
< /* Advance to the eth section */
< mr = bootinfo_mr();
< for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++)
< ;
<
< eth = (struct bi_eth_addr *)mr;
< return (eth);
< }
<
337c278
< vm_offset_t end;
---
> vm_offset_t dtbp, end;
342a284
> dtbp = (vm_offset_t)NULL;
345,346c287
< * Parse metadata and fetch parameters. This must be done as the first
< * step as we need bootinfo data to at least init the console
---
> * Parse metadata and fetch parameters.
352,354d292
< bootinfo = (struct bootinfo *)preload_search_info(kmdp,
< MODINFO_METADATA | MODINFOMD_BOOTINFO);
<
356a295
> dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
365,366c304
< * We should scream but how? - without CCSR bar (in bootinfo)
< * cannot even output anything...
---
> * We should scream but how? Cannot even output anything...
375c313
< while(1);
---
> while (1);
377a316,326
> if (OF_install(OFW_FDT, 0) == FALSE)
> while (1);
>
> if (OF_init((void *)dtbp) != 0)
> while (1);
>
> if (fdt_immr_addr() != 0)
> while (1);
>
> OF_interpret("perform-fixup", 0);
>
379c328
< tlb1_init(bootinfo->bi_bar_base);
---
> tlb1_init(fdt_immr_pa);
420c369,370
< print_bootinfo();
---
> debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp);
>