[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: BIOS Bus Master Option



From: Lame Brooks-G14738 <Brooks_Lame@mcg.mot.com>
> for that hardware.  It is the responsibility of the PCI device's driver to
> enable bus mastering on the device because only the device driver can ensure
> that the device is properly initialized.

This "rule" was made up well after PCI systems were released,
to fix some PC DOS soft reset problem. (ie. no driver
shutdown API call, no ability to turn the PCI card
master bits off on soft reset, and no ability to reset
the PCI bus).

Pity it then messes up the systems that have (non-PCI-compliant)
"non-mastering" PCI slots (and there were a lot of them out there !).

If the BIOS/OS (which is the agent that is meant to be
allocating the system hardware resources) doesn't turn
the mastering on, how does a card/driver know it is
valid in that system to turn it on for that slot ?

[In practice now of course, if the BIOS doesn't turn
 mastering on, and the driver needs it, it has to
 turn it on itself. In non-mastering slots of course,
 the card now mysteriously doesn't work, whereas
 previously the driver could report that mastering
 hadn't been enabled.]

> Some early device driver authors
> assumed that the BIOS would enable the bus mastering bit, but this is really
> a no-no unless the BIOS installs a routine for interacting with that device
> and actually initializes the device's busmastering interface for use with
> that routine.

I understood that the issue was not normal driver operation (no
sane PCI chip is going to do any bus mastering operation before
its driver is running, so turning the mastering bit on after
reset is perfectly safe), but during soft reset, where an OS
(for some reason) can't reset the PCI bus, can't turn the mastering
bits off in the control registers, and doesn't have an API call
to its drivers to tell them to shut down gracefully.

Graeme Gill.