| Summary: | ISA PnP resource allocator problem | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | D.Rock <D.Rock> | ||||
| Component: | kern | Assignee: | Warner Losh <imp> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 5.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: freebsd-bugs->imp I'll look into this. State Changed From-To: open->feedback Likely fixed. State Changed From-To: feedback->closed Feedback timeout (> 3 months). |
if a resource is already held by another PnP device, the code in /sys/kern/subr_rman.c automatically tries to find another region, but doesn't honour alignment requirements. The code in /sys/isa/isa_common.c (function isa_find_port()) is therefor pretty useless. This code is present in the system since FreeBSD switched to the new PnP code (about a year ago) Fix: The following code releases the region if it is not exactly the one requested, which was the original intention of the code but didn't work because of the additional "intelligence" by the resource allocator. Quick - but ugly - hack (worked for me since I discovered the bug): How-To-Repeat: I have different ISA PnP devices in my system (output from pnpinfo): I/O Range 0x100 .. 0x3ff, alignment 0x1, len 0x1 [16-bit addr] I/O Range 0x100 .. 0x3f0, alignment 0x8, len 0x8 [not 16-bit addr] For the first device the I/O port 0x100 is allocated. This port isn't available for the second device, but the code in /sys/kern/subr_rman.c automatically "finds" an area large enough at 0x101, but doesn't know the alignment constraint. Instead the second device should be allocated at 0x108-0x10f Wrong boot output: unknown10: <EEPROM> at port 0x100 on isa0 isic0: <Sedlbauer WinSpeed> at port 0x101-0x108 irq 11 on isa0 should be: unknown10: <EEPROM> at port 0x100 on isa0 isic0: <Sedlbauer WinSpeed> at port 0x108-0x10f irq 11 on isa0