Re: newbus ioport usage
From: M. Warner Losh (imp_at_bsdimp.com)
Date: 01/27/04
- Previous message: Nate Lawson: "Re: newbus ioport usage"
- In reply to: Nate Lawson: "Re: newbus ioport usage"
- Next in thread: Nate Lawson: "Re: newbus ioport usage"
- Reply: Nate Lawson: "Re: newbus ioport usage"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Jan 2004 20:26:28 -0700 (MST) To: nate@root.org
In message: <20040126191657.B31071@root.org>
Nate Lawson <nate@root.org> writes:
: On Mon, 26 Jan 2004, M. Warner Losh wrote:
: > In message: <20040126165523.W30461@root.org>
: > Nate Lawson <nate@root.org> writes:
: > : Ok, I'm doing the set/alloc and it works. However, one weird thing. If I
: > : allocate all ports at boot time, it succeeds. My driver goes through
: > : multiple release/allocate cycles and it all works as expected. However if
: > : I boot and attach to only one of the registers, subsequent attempts to
: > : attach the second one fail. The resources are 2 IO ports, 0x101c and
: > : 0x101d. Both are 1 byte.
: >
: > Deos devinfo -r show any cause for the problem? Maybe you aren't
: > releasing them properly? Also, why not allocate them as a block of 2?
:
: Ok, I've found what's going on. Apparently my acpi_sysresource0
: pseudo-device is claiming all resources in its _CRS method. If I don't
: boot with 0x101c and 0x101d attached, it attaches to 0x1010-0x109d. But
: if I boot attaching them, it reserves less of the range.
:
: acpi_cpu0
: I/O ports:
: 0x101c
: 0x101d
:
: acpi_sysresource0
: I/O ports:
: 0x10-0x1f
: 0x24-0x25
: 0x28-0x29
: 0x2c-0x2d
: 0x2e-0x2f
: 0x30-0x31
: 0x34-0x35
: 0x38-0x39
: 0x3c-0x3d
: 0x50-0x53
: 0x72-0x77
: 0x90-0x9f
: 0xa4-0xa5
: 0xa8-0xa9
: 0xac-0xad
: 0xb0-0xb5
: 0xb8-0xb9
: 0xbc-0xbd
: 0x101e-0x109d
: 0x1180-0x11bf
: 0x15e0-0x15ef
: 0x1600-0x167f
:
: I'm not sure of a way around this. All ASL I've seen keeps these
: registers contiguous so I could whack out a block of 8 of them, although
: that doesn't seem correct. Perhaps acpi_cpu should be able to override
: the acpi_sysresource0 allocations, maybe by asking it for the resource if
: bus_resource_alloc returns NULL. Thoughts?
Have acpi bus own the resources that acpi_sysresource0 uses. Allow
children to get at parts of that as they see fit.
Warner
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Nate Lawson: "Re: newbus ioport usage"
- In reply to: Nate Lawson: "Re: newbus ioport usage"
- Next in thread: Nate Lawson: "Re: newbus ioport usage"
- Reply: Nate Lawson: "Re: newbus ioport usage"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: newbus ioport usage
... : On Mon, 26 Jan 2004, M. Warner Losh wrote: ... :>: allocate all
ports at boot time, ... go, based on system state. ... (freebsd-arch) - Re: newbus ioport usage
... allocate all ports at boot time, ... I boot and attach to only
one of the registers, ... pseudo-device is claiming all resources in its _CRS method. ...
(freebsd-arch) - Re: newbus ioport usage
... On Mon, 26 Jan 2004, M. Warner Losh wrote: ... I can't allocate them
in one block as they come and ... AC adapter state. ... If you evaluate it at boot
and get CST1, ... (freebsd-arch) - Re: No more floppy drive
... M. Warner Losh wrote: ... correct and we need to only allocate those
ports. ... allocate 0x3f0-0x3f1 unless on a PS/2 system. ... assumes a base of 0x3f0
and that's why people report error messages like: ... (freebsd-current) - Re: Writing a driver for a card reader controller - how?
... On Thursday 24 November 2005 01:26 pm, M. Warner Losh wrote: ... > without
actually talking about the sets of registers themselves. ... smart enough to allocate
resources for a device when bus_alloc_resourceis ... called to choose available resources
when a device is not configured. ... (freebsd-hackers)