Re: bus_alloc_resource question

From: Chuck Tuffli (chuck_tuffli_at_agilent.com)
Date: 07/27/04

  • Next message: Jake Burkholder: "Re: bus_alloc_resource question"
    Date: Tue, 27 Jul 2004 09:51:25 -0700
    To: "M. Warner Losh" <imp@bsdimp.com>, Jake Burkholder <jake@locore.ca>
    
    

    On Mon, Jul 26, 2004 at 09:54:53PM -0600, M. Warner Losh wrote:
    ...
    > Generally, one doesn't need to set the resource value. Doing so
    > usually indicates the presence of some bug in the system. Also, just

    I realize now that the original email wasn't clear. This is a bus
    driver for a new bus. Think of the physical addresses from 0xe0000000
    - 0xefffffff as being a memory mapped config space for devices. Each
    4KB segment of this region maps the configuration space for every
    possible bus, device, function number combination. I was thinking that
    each of these segments was a bus resource, but maybe that isn't the
    right approach. Any thoughts as to a better approach?

    Jake Burkholder suggested using pmap_mapdev() for small sections of
    memory, but cautioned that this uses up virtual address space. The bus
    driver could map each segment to test if a device was there and unmap
    the segments that didn't contain devices.

    -- 
    Chuck Tuffli
    Agilent Technologies, Storage Area Networking
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Jake Burkholder: "Re: bus_alloc_resource question"

    Relevant Pages

    • Re: bus_alloc_resource question
      ... one doesn't need to set the resource value. ... > driver for a new bus. ... > driver could map each segment to test if a device was there and unmap ...
      (freebsd-hackers)
    • Re: [Pcihpd-discuss] Re: ACPI problem with PCI Express Native Hot-plug driver
      ... system has two hot-pluggable PCI Express slots). ... PCI bus 0x0 Resource structure 0. ... Resource Type: Bus Number Range ... pciehp_save_config: In do loop ...
      (Linux-Kernel)
    • Re: pci_alloc_resource is broken
      ... to have multiple drivers for a given PCI function. ... a virtual bus that allows for multiple leaf drivers. ... When an ISP's FreeBSD router panics it ... the aforementioned resource leak) that I fixed in 8. ...
      (freebsd-current)
    • Re: PROBLEM: Devices behind PCI Express-to-PCI bridge not mapped
      ... Well, that would be right, because the parent of that bridge doesn't seem ... Normally on PC's we let the BIOS worry about PCI bridge resource ... otherwise x86 won't have even linked in the bus ...
      (Linux-Kernel)
    • Re: [PATCH 2.6.26] PCI: refuse to re-add a device to a bus upon pci_scan_child_bus()
      ... pci_scan_child_busstarts with iterating over all the devfn and scanning for a device with that devfn ... REGARDLESS if it is already on the pci bus list or not. ... Now I should be able to call pci_bus_assign_resources(bus) which will go over all the newly added device and assign resource to them. ... Last step I should be able to pci_bus_add_devicesthe, now, resource fixed devices. ...
      (Linux-Kernel)