Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Oct 1999 16:35:41 +0900
From:      YAMAMOTO Shigeru <shigeru@iij.ad.jp>
To:        current@freebsd.org
Subject:   how to allocate a resource at new-bus architecture?
Message-ID:  <19991018163541T.shigeru@iij.ad.jp>

next in thread | raw e-mail | index | archive | help

Hi, all.
I have a question about a resource allocation at a child device of PCI
device.

I'm thinking about to write a CardBud device driver.
CardBus is attached at PCI bus.
So I think CardBus is a child device of PCI device.

Before revision 1.122 of @src/sys/pci/pci.c, I can allocate a resouce when
I set rid 0 and call bus_alloc_resource().
CardBus driver is a child of PCI driver, so bus_alloc_resource(), called at
CardBus driver, call pci_alloc_resource().
When rid == 0, pci_alloc_resource() call an resource allocation method of
parent bus.

But revision 1.122 or later, pci_alloc_resource() was rewritten very simply.
pci_alloc_resource() only call resource_list_alloc() and
resource_list_alloc() returns 0 when requested resource is not registered
nor reserved.
It seems me new PCI driver assume all resources are assigned by BIOS.
But a BIOS of my notebood, VAIO 818/Phoenix BIOS, does not assign a resource
for a CardBus socket/ExCA base address register.
#of cource, I set a BIOS as 'Plug & Play O/S: No'.
I can't allocate a resource using bus_alloc_resource().

How to allocate a resource for a device which resources are not assigned by
BIOS?
What is a right way to allocate a resource in a new-bus device driver?

Thanks,
-------
YAMAMOTO Shigeru			Internet Initiative Japan Inc.
<shigeru@iij.ad.jp>			Network Engineering Div.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991018163541T.shigeru>