On Sun, 22 Dec 2002 17:44:55 +0100 (CET), Daniela Engert wrote:
>While the first one resembles the BIOS PCI functions I like the second
>approach more.
Will use the LastMatchID method then.
A problem will occur of course, if a device is detached during that process e.g. if I
have 3 devices from
Vendor A, enumeration processes 2, goes to the 3rd one, uses the ID of the 2nd and the
2nd one is removed
in exactly that moment, this would mean that the enumeration would fail. This would
also happen when using
an index, but would be even worse in that case, because I wouldn't have a chance of
finding out *that* such
problem occured.
On the other side, hot-plug devices should not get enumerated in that way, so its the
responsibility of the
programmer.
>>Getting the full detection area from Ring-3 (application!) will get somewhat tricky.
>The current method is
>>opening gconfig$ and reading till EOF. Now, that the detection area is not linear
>anymore, I will have to
>>transfer single base-blocks only and remember the last Base-Block position (aka
>Base-Block Index) that got
>>read out, so if a device detach occurs during read-out, the data won't get mangled
>up. The read-out
>>detection area will be linear again that way and built up like the original one.
>You'll have to keep the read state per open file handle!
Of course, but remembering the exact location within a HWDeviceID-Base or Sub-Block is
impossible,
because if the HWDeviceID gets invalid, this would mean that the caller gets an
inconsistent detection area
(due design). That's why I will transfer base and sub-block areas one by one, so
dynamic changes are even
possible during readout.
The total sub-block area limit is 64k per device, so this would work out. If I require
the caller to read 64k
everytime, one base or sub-block area would fit in at least everytime. (64k in that
case is way enough,
because the detection sub-blocks only contain e.g. device resource proposals or
device-names and normal
PCI devices have around 400 bytes at most).
cu, Kiewitz
-----------
To unsubscribe yourself from this list, send the following message
to [EMAIL PROTECTED]
unsubscribe acpi-os2
end