On 06/07/17 15:36, Markus Armbruster wrote: >>>> I see two ways to continue: >>>> 1. A new kind of pci-bridge should be created with a "special" >>>> secondary bus that has less slots. (harder to implement) >>>> 2. Add the limitation of the number of slots to the PCIBus class, >>>> (simpler to implement, but since is not a widely used case maybe >>>> is not the best way to go. >>> >>> I suspect (2) would be trivial. I like trivial. >> >> I also like trivial, what might not be trivial is to convince Michael >> a base PCIBus class needs a property that limits the number of slots. >> But since the device registration code is generic, we may need that >> property anyway. >> >> Taking the idea a little farther, instead of limiting the slots number, >> we can have a slot-available flag for each slot. In this way we can >> cover more future requirements like "slot #5 is not never used". > > That's strictly more general, and should still be trivial.
Indeed, having a bitmask is exactly what I suggested at the end of my last email. I've quickly put something together which I'll send along shortly... ATB, Mark.