[SeaBIOS] seabios: acpi: add _RMV control method for PCI devices
Marcelo Tosatti
mtosatti at redhat.com
Wed Dec 8 22:23:41 CET 2010
On Wed, Dec 08, 2010 at 09:58:35PM +0200, Gleb Natapov wrote:
> On Wed, Dec 08, 2010 at 04:01:18PM -0200, Marcelo Tosatti wrote:
> > On Wed, Dec 08, 2010 at 07:34:42PM +0200, Gleb Natapov wrote:
> > > On Wed, Dec 08, 2010 at 03:08:59PM -0200, Marcelo Tosatti wrote:
> > > > Use _RMV method to indicate whether device can be removed.
> > > >
> > > But Windows still shows device as removable in the gui and allows to
> > > remove it, correct?
> >
> > No. From "Designing Hardware for Surprise Removal under Windows XP"
> > document:
> >
> > "An ACPI BIOS can override the Removable capability by using the _RMV
> > method ..."
> >
> Cool. I wonder how it co-exists with _EJ0 method for the same device.
The Linux driver, at least, will use the _EJ0 method of the first device
object. I guess Windows does the same.
> > > > +#define gen_pci_device(name, nr) \
> > > > + Device(SL##name) { \
> > > > + Name (_ADR, nr##0000) \
> > > > + Method (_RMV) { \
> > > > + If (And(\_SB.PCI0.PCRM, ShiftLeft(1, nr))) { \
> > > > + Return (0x1) \
> > > > + } \
> > > > + Return (0x0) \
> > > > + } \
> > > > + Name (_SUN, name) \
> > > > + }
> > > Why not add this to hotplug_slot() macro?
> >
> > Because its ignored if declared in the device object thats a child
> > of SB.PCI0 (hotplug_slot).
> Any idea why?
>
> --
> Gleb.
Because _EJ0 overrides _RMV when deciding removability, inside a
device object (just checked). So the above "if declared in a child of
SB.PCI0..." is wrong.
More information about the SeaBIOS
mailing list