MMCONF and PCIe BAR is a concept which has many different names in our tree. It's almost impossible to find all code concerning MMCONFIG when there are some hardcoded values and three different names for it.
MMCONF_BASE_ADDRESS, EXT_CONF_BASE_ADDRESS and DEFAULT_PCIEXBAR have the same purpose. There are various places in the tree where that stuff is hardcoded as 0xe0000000 or 0xf0000000 or 0xf4000000. Try grepping for them. Bring antacid for your stomach.
Of course, that leads to bugs which are difficult to track down.
We need exactly one variable for the base address and another one for the size of that area.
Ideas about the name?
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
MMCONF_BASE_ADDRESS, EXT_CONF_BASE_ADDRESS and DEFAULT_PCIEXBAR have the same purpose.
We need exactly one variable for the base address and another one for the size of that area.
Yes.
Ideas about the name?
Counter-question. Does this apply to anything but PCI Express? HT? If it really is only PCI Express, then I like DEFAULT_PCIE_BAR or maybe DEFAULT_PCIE_BAR_BASE and _SIZE. If not only PCI Express then DEFAULT_EXT_BAR_BASE and _SIZE seems better.
//Peter
On 14.05.2009 04:05, Peter Stuge wrote:
Carl-Daniel Hailfinger wrote:
MMCONF_BASE_ADDRESS, EXT_CONF_BASE_ADDRESS and DEFAULT_PCIEXBAR have the same purpose.
We need exactly one variable for the base address and another one for the size of that area.
Yes.
Ideas about the name?
Counter-question. Does this apply to anything but PCI Express? HT? If it really is only PCI Express, then I like DEFAULT_PCIE_BAR or maybe DEFAULT_PCIE_BAR_BASE and _SIZE. If not only PCI Express then DEFAULT_EXT_BAR_BASE and _SIZE seems better.
AFAIK it applies to every PCI addressable device behind the bridge with the MMCONFIG feature. On Fam10, this means all devices visible in PCI config space, regardless of which bus they are on.
I do like your DEFAULT_EXT_BAR_{BASE,SIZE} suggestion. May I suggest a small change to include PCI somewhere in the name? The meaning of the variable should be at least somewhat obvious.
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
Does this apply to anything but PCI Express? HT?
AFAIK it applies to every PCI addressable device behind the bridge with the MMCONFIG feature.
I do like your DEFAULT_EXT_BAR_{BASE,SIZE} suggestion. May I suggest a small change to include PCI somewhere in the name? The meaning of the variable should be at least somewhat obvious.
Either it is specific for PCI Express or it isn't. If not, PCIE shouldn't be in the name.
If MMCONFIG is the term that applies, then better use that instead:
MMCONFIG_BAR_BASE and _SIZE
//Peter
On Wed, May 13, 2009 at 10:26 PM, Peter Stuge peter@stuge.se wrote:
If MMCONFIG is the term that applies, then better use that instead:
MMCONFIG_BAR_BASE and _SIZE
One note, "BAR" might be a little bit confusing. "BAR" has a pretty strong tie to an actual register in a PCI config header. I think the variables you are describing are really just "the address and size where MMCONFIG is located", not necessarily an actual register.
MMCONFIG_BASE and MMCONFIG_SIZE
seem pretty clear and simple
Tom Sylla wrote:
MMCONFIG_BAR_BASE and _SIZE
One note, "BAR" might be a little bit confusing. "BAR" has a pretty strong tie to an actual register in a PCI config header.
Yes.
I think the variables you are describing are really just "the address and size where MMCONFIG is located", not necessarily an actual register.
Aha!
MMCONFIG_BASE and MMCONFIG_SIZE
seem pretty clear and simple
Makes perfect sense. I want that.
//Peter
On 14.05.2009 16:03, Peter Stuge wrote:
Tom Sylla wrote:
MMCONFIG_BASE and MMCONFIG_SIZE
seem pretty clear and simple
Makes perfect sense. I want that.
Fully agreed.
Tom, thanks for coming up with that name.
Regards, Carl-Daniel