1 /* pci_sun4v.c: SUN4V specific PCI controller support.
3 * Copyright (C) 2006 David S. Miller (davem@davemloft.net)
6 #include <linux/kernel.h>
7 #include <linux/types.h>
9 #include <linux/init.h>
10 #include <linux/slab.h>
11 #include <linux/interrupt.h>
12 #include <linux/percpu.h>
15 #include <asm/iommu.h>
18 #include <asm/pstate.h>
19 #include <asm/oplib.h>
20 #include <asm/hypervisor.h>
23 #include "iommu_common.h"
25 #include "pci_sun4v.h"
27 #define PGLIST_NENTS 2048
30 u64 pglist[PGLIST_NENTS];
33 static DEFINE_PER_CPU(struct sun4v_pglist, iommu_pglists);
35 static long pci_arena_alloc(struct pci_iommu_arena *arena, unsigned long npages)
37 unsigned long n, i, start, end, limit;
45 n = find_next_zero_bit(arena->map, limit, start);
47 if (unlikely(end >= limit)) {
48 if (likely(pass < 1)) {
54 /* Scanned the whole thing, give up. */
59 for (i = n; i < end; i++) {
60 if (test_bit(i, arena->map)) {
66 for (i = n; i < end; i++)
67 __set_bit(i, arena->map);
74 static void pci_arena_free(struct pci_iommu_arena *arena, unsigned long base, unsigned long npages)
78 for (i = base; i < (base + npages); i++)
79 __clear_bit(i, arena->map);
82 static void *pci_4v_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp)
84 struct pcidev_cookie *pcp;
85 struct pci_iommu *iommu;
86 unsigned long devhandle, flags, order, first_page, npages, n;
92 size = IO_PAGE_ALIGN(size);
93 order = get_order(size);
94 if (order >= MAX_ORDER)
97 npages = size >> IO_PAGE_SHIFT;
98 if (npages > PGLIST_NENTS)
101 first_page = __get_free_pages(GFP_ATOMIC, order);
102 if (first_page == 0UL)
104 memset((char *)first_page, 0, PAGE_SIZE << order);
107 devhandle = pcp->pbm->devhandle;
108 iommu = pcp->pbm->iommu;
110 spin_lock_irqsave(&iommu->lock, flags);
111 entry = pci_arena_alloc(&iommu->arena, npages);
112 spin_unlock_irqrestore(&iommu->lock, flags);
114 if (unlikely(entry < 0L)) {
115 free_pages(first_page, order);
119 *dma_addrp = (iommu->page_table_map_base +
120 (entry << IO_PAGE_SHIFT));
121 ret = (void *) first_page;
122 first_page = __pa(first_page);
126 pglist = &__get_cpu_var(iommu_pglists).pglist[0];
127 for (n = 0; n < npages; n++)
128 pglist[n] = first_page + (n * PAGE_SIZE);
133 num = pci_sun4v_iommu_map(devhandle, HV_PCI_TSBID(0, entry),
135 (HV_PCI_MAP_ATTR_READ |
136 HV_PCI_MAP_ATTR_WRITE),
141 } while (npages != 0);
148 static void pci_4v_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_t dvma)
150 struct pcidev_cookie *pcp;
151 struct pci_iommu *iommu;
152 unsigned long flags, order, npages, entry, devhandle;
154 npages = IO_PAGE_ALIGN(size) >> IO_PAGE_SHIFT;
156 iommu = pcp->pbm->iommu;
157 devhandle = pcp->pbm->devhandle;
158 entry = ((dvma - iommu->page_table_map_base) >> IO_PAGE_SHIFT);
160 spin_lock_irqsave(&iommu->lock, flags);
162 pci_arena_free(&iommu->arena, entry, npages);
167 num = pci_sun4v_iommu_demap(devhandle, HV_PCI_TSBID(0, entry),
171 } while (npages != 0);
173 spin_unlock_irqrestore(&iommu->lock, flags);
175 order = get_order(size);
177 free_pages((unsigned long)cpu, order);
180 static dma_addr_t pci_4v_map_single(struct pci_dev *pdev, void *ptr, size_t sz, int direction)
182 struct pcidev_cookie *pcp;
183 struct pci_iommu *iommu;
184 unsigned long flags, npages, oaddr;
185 unsigned long i, base_paddr, devhandle;
193 iommu = pcp->pbm->iommu;
194 devhandle = pcp->pbm->devhandle;
196 if (unlikely(direction == PCI_DMA_NONE))
199 oaddr = (unsigned long)ptr;
200 npages = IO_PAGE_ALIGN(oaddr + sz) - (oaddr & IO_PAGE_MASK);
201 npages >>= IO_PAGE_SHIFT;
202 if (unlikely(npages > PGLIST_NENTS))
205 spin_lock_irqsave(&iommu->lock, flags);
206 entry = pci_arena_alloc(&iommu->arena, npages);
207 spin_unlock_irqrestore(&iommu->lock, flags);
209 if (unlikely(entry < 0L))
212 bus_addr = (iommu->page_table_map_base +
213 (entry << IO_PAGE_SHIFT));
214 ret = bus_addr | (oaddr & ~IO_PAGE_MASK);
215 base_paddr = __pa(oaddr & IO_PAGE_MASK);
216 prot = HV_PCI_MAP_ATTR_READ;
217 if (direction != PCI_DMA_TODEVICE)
218 prot |= HV_PCI_MAP_ATTR_WRITE;
222 pglist = &__get_cpu_var(iommu_pglists).pglist[0];
223 for (i = 0; i < npages; i++, base_paddr += IO_PAGE_SIZE)
224 pglist[i] = base_paddr;
229 num = pci_sun4v_iommu_map(devhandle, HV_PCI_TSBID(0, entry),
235 } while (npages != 0);
242 if (printk_ratelimit())
244 return PCI_DMA_ERROR_CODE;
247 static void pci_4v_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int direction)
249 struct pcidev_cookie *pcp;
250 struct pci_iommu *iommu;
251 unsigned long flags, npages, devhandle;
254 if (unlikely(direction == PCI_DMA_NONE)) {
255 if (printk_ratelimit())
261 iommu = pcp->pbm->iommu;
262 devhandle = pcp->pbm->devhandle;
264 npages = IO_PAGE_ALIGN(bus_addr + sz) - (bus_addr & IO_PAGE_MASK);
265 npages >>= IO_PAGE_SHIFT;
266 bus_addr &= IO_PAGE_MASK;
268 spin_lock_irqsave(&iommu->lock, flags);
270 entry = (bus_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT;
271 pci_arena_free(&iommu->arena, entry, npages);
276 num = pci_sun4v_iommu_demap(devhandle, HV_PCI_TSBID(0, entry),
280 } while (npages != 0);
282 spin_unlock_irqrestore(&iommu->lock, flags);
285 #define SG_ENT_PHYS_ADDRESS(SG) \
286 (__pa(page_address((SG)->page)) + (SG)->offset)
288 static inline void fill_sg(long entry, unsigned long devhandle,
289 struct scatterlist *sg,
290 int nused, int nelems, unsigned long prot)
292 struct scatterlist *dma_sg = sg;
293 struct scatterlist *sg_end = sg + nelems;
294 int i, cpu, pglist_ent;
298 pglist = &__get_cpu_var(iommu_pglists).pglist[0];
300 for (i = 0; i < nused; i++) {
301 unsigned long pteval = ~0UL;
304 dma_npages = ((dma_sg->dma_address & (IO_PAGE_SIZE - 1UL)) +
306 ((IO_PAGE_SIZE - 1UL))) >> IO_PAGE_SHIFT;
308 unsigned long offset;
311 /* If we are here, we know we have at least one
312 * more page to map. So walk forward until we
313 * hit a page crossing, and begin creating new
314 * mappings from that spot.
319 tmp = SG_ENT_PHYS_ADDRESS(sg);
321 if (((tmp ^ pteval) >> IO_PAGE_SHIFT) != 0UL) {
322 pteval = tmp & IO_PAGE_MASK;
323 offset = tmp & (IO_PAGE_SIZE - 1UL);
326 if (((tmp ^ (tmp + len - 1UL)) >> IO_PAGE_SHIFT) != 0UL) {
327 pteval = (tmp + IO_PAGE_SIZE) & IO_PAGE_MASK;
329 len -= (IO_PAGE_SIZE - (tmp & (IO_PAGE_SIZE - 1UL)));
335 pteval = (pteval & IOPTE_PAGE);
337 pglist[pglist_ent++] = pteval;
338 pteval += IO_PAGE_SIZE;
339 len -= (IO_PAGE_SIZE - offset);
344 pteval = (pteval & IOPTE_PAGE) + len;
347 /* Skip over any tail mappings we've fully mapped,
348 * adjusting pteval along the way. Stop when we
349 * detect a page crossing event.
351 while (sg < sg_end &&
352 (pteval << (64 - IO_PAGE_SHIFT)) != 0UL &&
353 (pteval == SG_ENT_PHYS_ADDRESS(sg)) &&
355 (SG_ENT_PHYS_ADDRESS(sg) + sg->length - 1UL)) >> IO_PAGE_SHIFT) == 0UL) {
356 pteval += sg->length;
359 if ((pteval << (64 - IO_PAGE_SHIFT)) == 0UL)
361 } while (dma_npages != 0);
365 BUG_ON(pglist_ent == 0);
370 num = pci_sun4v_iommu_demap(devhandle, HV_PCI_TSBID(0, entry),
374 } while (pglist_ent != 0);
379 static int pci_4v_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction)
381 struct pcidev_cookie *pcp;
382 struct pci_iommu *iommu;
383 unsigned long flags, npages, prot, devhandle;
385 struct scatterlist *sgtmp;
389 /* Fast path single entry scatterlists. */
391 sglist->dma_address =
392 pci_4v_map_single(pdev,
393 (page_address(sglist->page) + sglist->offset),
394 sglist->length, direction);
395 if (unlikely(sglist->dma_address == PCI_DMA_ERROR_CODE))
397 sglist->dma_length = sglist->length;
402 iommu = pcp->pbm->iommu;
403 devhandle = pcp->pbm->devhandle;
405 if (unlikely(direction == PCI_DMA_NONE))
408 /* Step 1: Prepare scatter list. */
409 npages = prepare_sg(sglist, nelems);
410 if (unlikely(npages > PGLIST_NENTS))
413 /* Step 2: Allocate a cluster and context, if necessary. */
414 spin_lock_irqsave(&iommu->lock, flags);
415 entry = pci_arena_alloc(&iommu->arena, npages);
416 spin_unlock_irqrestore(&iommu->lock, flags);
418 if (unlikely(entry < 0L))
421 dma_base = iommu->page_table_map_base +
422 (entry << IO_PAGE_SHIFT);
424 /* Step 3: Normalize DMA addresses. */
428 while (used && sgtmp->dma_length) {
429 sgtmp->dma_address += dma_base;
433 used = nelems - used;
435 /* Step 4: Create the mappings. */
436 prot = HV_PCI_MAP_ATTR_READ;
437 if (direction != PCI_DMA_TODEVICE)
438 prot |= HV_PCI_MAP_ATTR_WRITE;
440 fill_sg(entry, devhandle, sglist, used, nelems, prot);
445 if (printk_ratelimit())
450 static void pci_4v_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction)
452 struct pcidev_cookie *pcp;
453 struct pci_iommu *iommu;
454 unsigned long flags, i, npages, devhandle;
458 if (unlikely(direction == PCI_DMA_NONE)) {
459 if (printk_ratelimit())
464 iommu = pcp->pbm->iommu;
465 devhandle = pcp->pbm->devhandle;
467 bus_addr = sglist->dma_address & IO_PAGE_MASK;
469 for (i = 1; i < nelems; i++)
470 if (sglist[i].dma_length == 0)
473 npages = (IO_PAGE_ALIGN(sglist[i].dma_address + sglist[i].dma_length) -
474 bus_addr) >> IO_PAGE_SHIFT;
476 entry = ((bus_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT);
478 spin_lock_irqsave(&iommu->lock, flags);
480 pci_arena_free(&iommu->arena, entry, npages);
485 num = pci_sun4v_iommu_demap(devhandle, HV_PCI_TSBID(0, entry),
489 } while (npages != 0);
491 spin_unlock_irqrestore(&iommu->lock, flags);
494 static void pci_4v_dma_sync_single_for_cpu(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int direction)
496 /* Nothing to do... */
499 static void pci_4v_dma_sync_sg_for_cpu(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction)
501 /* Nothing to do... */
504 struct pci_iommu_ops pci_sun4v_iommu_ops = {
505 .alloc_consistent = pci_4v_alloc_consistent,
506 .free_consistent = pci_4v_free_consistent,
507 .map_single = pci_4v_map_single,
508 .unmap_single = pci_4v_unmap_single,
509 .map_sg = pci_4v_map_sg,
510 .unmap_sg = pci_4v_unmap_sg,
511 .dma_sync_single_for_cpu = pci_4v_dma_sync_single_for_cpu,
512 .dma_sync_sg_for_cpu = pci_4v_dma_sync_sg_for_cpu,
515 /* SUN4V PCI configuration space accessors. */
517 static int pci_sun4v_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
518 int where, int size, u32 *value)
520 struct pci_pbm_info *pbm = bus_dev->sysdata;
521 unsigned long devhandle = pbm->devhandle;
522 unsigned int bus = bus_dev->number;
523 unsigned int device = PCI_SLOT(devfn);
524 unsigned int func = PCI_FUNC(devfn);
527 ret = pci_sun4v_config_get(devhandle,
528 HV_PCI_DEVICE_BUILD(bus, device, func),
535 *value = ret & 0xffff;
538 *value = ret & 0xffffffff;
543 return PCIBIOS_SUCCESSFUL;
546 static int pci_sun4v_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
547 int where, int size, u32 value)
549 struct pci_pbm_info *pbm = bus_dev->sysdata;
550 unsigned long devhandle = pbm->devhandle;
551 unsigned int bus = bus_dev->number;
552 unsigned int device = PCI_SLOT(devfn);
553 unsigned int func = PCI_FUNC(devfn);
556 ret = pci_sun4v_config_put(devhandle,
557 HV_PCI_DEVICE_BUILD(bus, device, func),
560 return PCIBIOS_SUCCESSFUL;
563 static struct pci_ops pci_sun4v_ops = {
564 .read = pci_sun4v_read_pci_cfg,
565 .write = pci_sun4v_write_pci_cfg,
569 static void pci_sun4v_scan_bus(struct pci_controller_info *p)
571 /* XXX Implement me! XXX */
574 static unsigned int pci_sun4v_irq_build(struct pci_pbm_info *pbm,
575 struct pci_dev *pdev,
578 /* XXX Implement me! XXX */
582 /* XXX correct? XXX */
583 static void pci_sun4v_base_address_update(struct pci_dev *pdev, int resource)
585 struct pcidev_cookie *pcp = pdev->sysdata;
586 struct pci_pbm_info *pbm = pcp->pbm;
587 struct resource *res, *root;
589 int where, size, is_64bit;
591 res = &pdev->resource[resource];
593 where = PCI_BASE_ADDRESS_0 + (resource * 4);
594 } else if (resource == PCI_ROM_RESOURCE) {
595 where = pdev->rom_base_reg;
597 /* Somebody might have asked allocation of a non-standard resource */
602 if (res->flags & IORESOURCE_IO)
603 root = &pbm->io_space;
605 root = &pbm->mem_space;
606 if ((res->flags & PCI_BASE_ADDRESS_MEM_TYPE_MASK)
607 == PCI_BASE_ADDRESS_MEM_TYPE_64)
611 size = res->end - res->start;
612 pci_read_config_dword(pdev, where, ®);
613 reg = ((reg & size) |
614 (((u32)(res->start - root->start)) & ~size));
615 if (resource == PCI_ROM_RESOURCE) {
616 reg |= PCI_ROM_ADDRESS_ENABLE;
617 res->flags |= IORESOURCE_ROM_ENABLE;
619 pci_write_config_dword(pdev, where, reg);
621 /* This knows that the upper 32-bits of the address
622 * must be zero. Our PCI common layer enforces this.
625 pci_write_config_dword(pdev, where + 4, 0);
628 /* XXX correct? XXX */
629 static void pci_sun4v_resource_adjust(struct pci_dev *pdev,
630 struct resource *res,
631 struct resource *root)
633 res->start += root->start;
634 res->end += root->start;
637 /* Use ranges property to determine where PCI MEM, I/O, and Config
638 * space are for this PCI bus module.
640 static void pci_sun4v_determine_mem_io_space(struct pci_pbm_info *pbm)
642 int i, saw_cfg, saw_mem, saw_io;
644 saw_cfg = saw_mem = saw_io = 0;
645 for (i = 0; i < pbm->num_pbm_ranges; i++) {
646 struct linux_prom_pci_ranges *pr = &pbm->pbm_ranges[i];
650 type = (pr->child_phys_hi >> 24) & 0x3;
651 a = (((unsigned long)pr->parent_phys_hi << 32UL) |
652 ((unsigned long)pr->parent_phys_lo << 0UL));
656 /* PCI config space, 16MB */
657 pbm->config_space = a;
662 /* 16-bit IO space, 16MB */
663 pbm->io_space.start = a;
664 pbm->io_space.end = a + ((16UL*1024UL*1024UL) - 1UL);
665 pbm->io_space.flags = IORESOURCE_IO;
670 /* 32-bit MEM space, 2GB */
671 pbm->mem_space.start = a;
672 pbm->mem_space.end = a + (0x80000000UL - 1UL);
673 pbm->mem_space.flags = IORESOURCE_MEM;
682 if (!saw_cfg || !saw_io || !saw_mem) {
683 prom_printf("%s: Fatal error, missing %s PBM range.\n",
692 printk("%s: PCI CFG[%lx] IO[%lx] MEM[%lx]\n",
696 pbm->mem_space.start);
699 static void pbm_register_toplevel_resources(struct pci_controller_info *p,
700 struct pci_pbm_info *pbm)
702 pbm->io_space.name = pbm->mem_space.name = pbm->name;
704 request_resource(&ioport_resource, &pbm->io_space);
705 request_resource(&iomem_resource, &pbm->mem_space);
706 pci_register_legacy_regions(&pbm->io_space,
710 static void probe_existing_entries(struct pci_pbm_info *pbm,
711 struct pci_iommu *iommu)
713 struct pci_iommu_arena *arena = &iommu->arena;
714 unsigned long i, devhandle;
716 devhandle = pbm->devhandle;
717 for (i = 0; i < arena->limit; i++) {
718 unsigned long ret, io_attrs, ra;
720 ret = pci_sun4v_iommu_getmap(devhandle,
724 __set_bit(i, arena->map);
728 static void pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
730 struct pci_iommu *iommu = pbm->iommu;
731 unsigned long num_tsb_entries, sz;
732 u32 vdma[2], dma_mask, dma_offset;
735 err = prom_getproperty(pbm->prom_node, "virtual-dma",
736 (char *)&vdma[0], sizeof(vdma));
737 if (err == 0 || err == -1) {
738 /* No property, use default values. */
739 vdma[0] = 0x80000000;
740 vdma[1] = 0x80000000;
746 dma_mask |= 0x1fffffff;
751 dma_mask |= 0x3fffffff;
756 dma_mask |= 0x7fffffff;
761 prom_printf("PCI-SUN4V: strange virtual-dma size.\n");
765 num_tsb_entries = tsbsize / sizeof(iopte_t);
767 dma_offset = vdma[0];
769 /* Setup initial software IOMMU state. */
770 spin_lock_init(&iommu->lock);
771 iommu->ctx_lowest_free = 1;
772 iommu->page_table_map_base = dma_offset;
773 iommu->dma_addr_mask = dma_mask;
775 /* Allocate and initialize the free area map. */
776 sz = num_tsb_entries / 8;
777 sz = (sz + 7UL) & ~7UL;
778 iommu->arena.map = kmalloc(sz, GFP_KERNEL);
779 if (!iommu->arena.map) {
780 prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n");
783 memset(iommu->arena.map, 0, sz);
784 iommu->arena.limit = num_tsb_entries;
786 probe_existing_entries(pbm, iommu);
789 static void pci_sun4v_pbm_init(struct pci_controller_info *p, int prom_node)
791 struct pci_pbm_info *pbm;
792 struct linux_prom64_registers regs;
793 unsigned int busrange[2];
800 pbm->prom_node = prom_node;
801 pbm->pci_first_slot = 1;
803 prom_getproperty(prom_node, "reg", (char *)®s, sizeof(regs));
804 pbm->devhandle = (regs.phys_addr >> 32UL) & 0x0fffffff;
806 sprintf(pbm->name, "SUN4V-PCI%d PBM%c",
807 p->index, (pbm == &p->pbm_A ? 'A' : 'B'));
809 printk("%s: devhandle[%x]\n", pbm->name, pbm->devhandle);
811 prom_getstring(prom_node, "name",
812 pbm->prom_name, sizeof(pbm->prom_name));
814 err = prom_getproperty(prom_node, "ranges",
815 (char *) pbm->pbm_ranges,
816 sizeof(pbm->pbm_ranges));
817 if (err == 0 || err == -1) {
818 prom_printf("%s: Fatal error, no ranges property.\n",
823 pbm->num_pbm_ranges =
824 (err / sizeof(struct linux_prom_pci_ranges));
826 pci_sun4v_determine_mem_io_space(pbm);
827 pbm_register_toplevel_resources(p, pbm);
829 err = prom_getproperty(prom_node, "interrupt-map",
830 (char *)pbm->pbm_intmap,
831 sizeof(pbm->pbm_intmap));
833 pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap));
834 err = prom_getproperty(prom_node, "interrupt-map-mask",
835 (char *)&pbm->pbm_intmask,
836 sizeof(pbm->pbm_intmask));
838 prom_printf("%s: Fatal error, no "
839 "interrupt-map-mask.\n", pbm->name);
843 pbm->num_pbm_intmap = 0;
844 memset(&pbm->pbm_intmask, 0, sizeof(pbm->pbm_intmask));
847 err = prom_getproperty(prom_node, "bus-range",
848 (char *)&busrange[0],
850 if (err == 0 || err == -1) {
851 prom_printf("%s: Fatal error, no bus-range.\n", pbm->name);
854 pbm->pci_first_busno = busrange[0];
855 pbm->pci_last_busno = busrange[1];
857 pci_sun4v_iommu_init(pbm);
860 void sun4v_pci_init(int node, char *model_name)
862 struct pci_controller_info *p;
863 struct pci_iommu *iommu;
865 p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC);
867 prom_printf("SUN4V_PCI: Fatal memory allocation error.\n");
870 memset(p, 0, sizeof(*p));
872 iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC);
874 prom_printf("SCHIZO: Fatal memory allocation error.\n");
877 memset(iommu, 0, sizeof(*iommu));
878 p->pbm_A.iommu = iommu;
880 iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC);
882 prom_printf("SCHIZO: Fatal memory allocation error.\n");
885 memset(iommu, 0, sizeof(*iommu));
886 p->pbm_B.iommu = iommu;
888 p->next = pci_controller_root;
889 pci_controller_root = p;
891 p->index = pci_num_controllers++;
892 p->pbms_same_domain = 0;
894 p->scan_bus = pci_sun4v_scan_bus;
895 p->irq_build = pci_sun4v_irq_build;
896 p->base_address_update = pci_sun4v_base_address_update;
897 p->resource_adjust = pci_sun4v_resource_adjust;
898 p->pci_ops = &pci_sun4v_ops;
900 /* Like PSYCHO and SCHIZO we have a 2GB aligned area
903 pci_memspace_mask = 0x7fffffffUL;
905 pci_sun4v_pbm_init(p, node);
907 prom_printf("sun4v_pci_init: Implement me.\n");