Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17696
-gerrit
commit 0ce9b27e0d1bedb2bca2c40df10f473570bd3924 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Fri Dec 2 14:38:13 2016 +0200
MMCONF_SUPPORT_DEFAULT: Drop redundant logging
Resource is actually stored even before read_resources, but that's where we currently log this resource.
For Intel, use PCI config register offset as the resource index, while AMD side uses MSR address.
Change-Id: I6eeef1883c5d1ee5bbcebd1731c0e356af3fd781 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/northbridge/amd/agesa/family10/northbridge.c | 5 ----- src/northbridge/amd/agesa/family12/northbridge.c | 6 +----- src/northbridge/amd/agesa/family14/northbridge.c | 6 ------ src/northbridge/amd/agesa/family15/northbridge.c | 6 ------ src/northbridge/amd/agesa/family15rl/northbridge.c | 6 ------ src/northbridge/amd/agesa/family15tn/northbridge.c | 6 ------ src/northbridge/amd/agesa/family16kb/northbridge.c | 6 ------ src/northbridge/amd/amdfam10/northbridge.c | 4 ---- src/northbridge/amd/pi/00630F01/northbridge.c | 6 ------ src/northbridge/amd/pi/00660F01/northbridge.c | 4 ---- src/northbridge/amd/pi/00670F00/northbridge.c | 4 ---- src/northbridge/amd/pi/00730F01/northbridge.c | 4 ---- src/northbridge/intel/fsp_sandybridge/northbridge.c | 19 ++----------------- src/northbridge/intel/i3100/northbridge.c | 15 ++------------- src/northbridge/intel/i945/northbridge.c | 19 ++----------------- src/northbridge/intel/sandybridge/northbridge.c | 19 ++----------------- src/soc/intel/sch/northbridge.c | 15 +-------------- 17 files changed, 10 insertions(+), 140 deletions(-)
diff --git a/src/northbridge/amd/agesa/family10/northbridge.c b/src/northbridge/amd/agesa/family10/northbridge.c index 7408e50..fb4914d 100644 --- a/src/northbridge/amd/agesa/family10/northbridge.c +++ b/src/northbridge/amd/agesa/family10/northbridge.c @@ -537,11 +537,6 @@ static void amdfam10_set_resources(device_t dev) assign_resources(bus); } } - - res = find_resource(dev, 0xc0010058); - if (res) { - report_resource_stored(dev, res, " <mmconfig>"); - } }
static void mcf0_control_init(struct device *dev) diff --git a/src/northbridge/amd/agesa/family12/northbridge.c b/src/northbridge/amd/agesa/family12/northbridge.c index 5ef7a90..f0fe4e8 100644 --- a/src/northbridge/amd/agesa/family12/northbridge.c +++ b/src/northbridge/amd/agesa/family12/northbridge.c @@ -662,13 +662,9 @@ static void cpu_bus_read_resources(device_t dev)
static void cpu_bus_set_resources(device_t dev) { - struct resource *resource = find_resource(dev, 0xc0010058); - printk(BIOS_DEBUG, "\nFam12h - northbridge.c - %s - Start.\n",__func__); - if (resource) { - report_resource_stored(dev, resource, " <mmconfig>"); - } pci_dev_set_resources(dev); + printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s - End.\n",__func__); }
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c index 08d1c49..c41f68a 100644 --- a/src/northbridge/amd/agesa/family14/northbridge.c +++ b/src/northbridge/amd/agesa/family14/northbridge.c @@ -412,12 +412,6 @@ static void nb_set_resources(device_t dev) assign_resources(bus); } } - - /* Print the MMCONF region if it has been reserved. */ - res = find_resource(dev, 0xc0010058); - if (res) { - report_resource_stored(dev, res, " <mmconfig>"); - } }
/* Domain/Root Complex related code */ diff --git a/src/northbridge/amd/agesa/family15/northbridge.c b/src/northbridge/amd/agesa/family15/northbridge.c index c5e2921..e7f47f4 100644 --- a/src/northbridge/amd/agesa/family15/northbridge.c +++ b/src/northbridge/amd/agesa/family15/northbridge.c @@ -429,12 +429,6 @@ static void nb_set_resources(device_t dev) assign_resources(bus); } } - - /* Print the MMCONF region if it has been reserved. */ - res = find_resource(dev, 0xc0010058); - if (res) { - report_resource_stored(dev, res, " <mmconfig>"); - } }
static void scan_chains(device_t dev) diff --git a/src/northbridge/amd/agesa/family15rl/northbridge.c b/src/northbridge/amd/agesa/family15rl/northbridge.c index 2417933..506d7c8 100644 --- a/src/northbridge/amd/agesa/family15rl/northbridge.c +++ b/src/northbridge/amd/agesa/family15rl/northbridge.c @@ -429,12 +429,6 @@ static void set_resources(struct device *dev) assign_resources(bus); } } - - /* Print the MMCONF region if it has been reserved. */ - res = find_resource(dev, 0xc0010058); - if (res) { - report_resource_stored(dev, res, " <mmconfig>"); - } }
static unsigned long acpi_fill_hest(acpi_hest_t *hest) diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c index 7862e60..38c92e8 100644 --- a/src/northbridge/amd/agesa/family15tn/northbridge.c +++ b/src/northbridge/amd/agesa/family15tn/northbridge.c @@ -428,12 +428,6 @@ static void nb_set_resources(device_t dev) assign_resources(bus); } } - - /* Print the MMCONF region if it has been reserved. */ - res = find_resource(dev, 0xc0010058); - if (res) { - report_resource_stored(dev, res, " <mmconfig>"); - } }
diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c index 23057a9..b9de2e3 100644 --- a/src/northbridge/amd/agesa/family16kb/northbridge.c +++ b/src/northbridge/amd/agesa/family16kb/northbridge.c @@ -428,12 +428,6 @@ static void set_resources(device_t dev) assign_resources(bus); } } - - /* Print the MMCONF region if it has been reserved. */ - res = find_resource(dev, 0xc0010058); - if (res) { - report_resource_stored(dev, res, " <mmconfig>"); - } }
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c index 4284e1e..d82e1df 100644 --- a/src/northbridge/amd/amdfam10/northbridge.c +++ b/src/northbridge/amd/amdfam10/northbridge.c @@ -1957,10 +1957,6 @@ static void cpu_bus_init(device_t dev)
static void cpu_bus_set_resources(struct device *dev) { - struct resource *resource = find_resource(dev, 0xc0010058); - if (resource) { - report_resource_stored(dev, resource, " <mmconfig>"); - } pci_dev_set_resources(dev); }
diff --git a/src/northbridge/amd/pi/00630F01/northbridge.c b/src/northbridge/amd/pi/00630F01/northbridge.c index 1695808..d8ad807 100644 --- a/src/northbridge/amd/pi/00630F01/northbridge.c +++ b/src/northbridge/amd/pi/00630F01/northbridge.c @@ -431,12 +431,6 @@ static void set_resources(device_t dev) assign_resources(bus); } } - - /* Print the MMCONF region if it has been reserved. */ - res = find_resource(dev, 0xc0010058); - if (res) { - report_resource_stored(dev, res, " <mmconfig>"); - } }
static unsigned long acpi_fill_hest(acpi_hest_t *hest) diff --git a/src/northbridge/amd/pi/00660F01/northbridge.c b/src/northbridge/amd/pi/00660F01/northbridge.c index 9f6ae1f..97c8179 100644 --- a/src/northbridge/amd/pi/00660F01/northbridge.c +++ b/src/northbridge/amd/pi/00660F01/northbridge.c @@ -1094,10 +1094,6 @@ static void cpu_bus_read_resources(device_t dev)
static void cpu_bus_set_resources(device_t dev) { - struct resource *resource = find_resource(dev, 0xc0010058); - if (resource) { - report_resource_stored(dev, resource, " <mmconfig>"); - } pci_dev_set_resources(dev); }
diff --git a/src/northbridge/amd/pi/00670F00/northbridge.c b/src/northbridge/amd/pi/00670F00/northbridge.c index 521a32c..5eae902 100644 --- a/src/northbridge/amd/pi/00670F00/northbridge.c +++ b/src/northbridge/amd/pi/00670F00/northbridge.c @@ -1095,10 +1095,6 @@ static void cpu_bus_read_resources(device_t dev)
static void cpu_bus_set_resources(device_t dev) { - struct resource *resource = find_resource(dev, 0xc0010058); - if (resource) { - report_resource_stored(dev, resource, " <mmconfig>"); - } pci_dev_set_resources(dev); }
diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c index d97d875..1654b8a 100644 --- a/src/northbridge/amd/pi/00730F01/northbridge.c +++ b/src/northbridge/amd/pi/00730F01/northbridge.c @@ -1114,10 +1114,6 @@ static void cpu_bus_read_resources(device_t dev)
static void cpu_bus_set_resources(device_t dev) { - struct resource *resource = find_resource(dev, 0xc0010058); - if (resource) { - report_resource_stored(dev, resource, " <mmconfig>"); - } pci_dev_set_resources(dev); }
diff --git a/src/northbridge/intel/fsp_sandybridge/northbridge.c b/src/northbridge/intel/fsp_sandybridge/northbridge.c index 877d85f..8c146f1 100644 --- a/src/northbridge/intel/fsp_sandybridge/northbridge.c +++ b/src/northbridge/intel/fsp_sandybridge/northbridge.c @@ -245,28 +245,13 @@ static void mc_read_resources(device_t dev)
pci_dev_read_resources(dev);
- /* We use 0xcf as an unused index for our PCIe bar so that we find it again */ buses = get_pcie_bar(&pcie_config_base); if (buses) { - struct resource *resource = new_resource(dev, 0xcf); + struct resource *resource = new_resource(dev, PCIEXBAR); mmconf_resource_init(resource, 0, pcie_config_base, buses); } }
-static void mc_set_resources(device_t dev) -{ - struct resource *resource; - - /* Report the PCIe BAR */ - resource = find_resource(dev, 0xcf); - if (resource) { - report_resource_stored(dev, resource, "<mmconfig>"); - } - - /* And call the normal set_resources */ - pci_dev_set_resources(dev); -} - static void intel_set_subsystem(device_t dev, unsigned vendor, unsigned device) { if (!vendor || !device) { @@ -320,7 +305,7 @@ static struct pci_operations intel_pci_ops = {
static struct device_operations mc_ops = { .read_resources = mc_read_resources, - .set_resources = mc_set_resources, + .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = northbridge_init, .scan_bus = 0, diff --git a/src/northbridge/intel/i3100/northbridge.c b/src/northbridge/intel/i3100/northbridge.c index 65107de..42064ab 100644 --- a/src/northbridge/intel/i3100/northbridge.c +++ b/src/northbridge/intel/i3100/northbridge.c @@ -138,18 +138,7 @@ static void mc_read_resources(device_t dev) { pci_dev_read_resources(dev);
- mmconf_resource32(dev, 0xcf); -} - -static void mc_set_resources(device_t dev) -{ - struct resource *resource; - - resource = find_resource(dev, 0xcf); - if (resource) { - report_resource_stored(dev, resource, "<mmconfig>"); - } - pci_dev_set_resources(dev); + mmconf_resource32(dev, EXPECBASE); }
static void intel_set_subsystem(device_t dev, unsigned vendor, unsigned device) @@ -188,7 +177,7 @@ static struct pci_operations intel_pci_ops = {
static struct device_operations mc_ops = { .read_resources = mc_read_resources, - .set_resources = mc_set_resources, + .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = 0, .scan_bus = 0, diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c index 26d89d0..118df7d 100644 --- a/src/northbridge/intel/i945/northbridge.c +++ b/src/northbridge/intel/i945/northbridge.c @@ -160,22 +160,7 @@ static void mc_read_resources(device_t dev)
pci_dev_read_resources(dev);
- /* We use 0xcf as an unused index for our PCIe bar so that we find it again */ - mmconf_resource32(dev, 0xcf); -} - -static void mc_set_resources(device_t dev) -{ - struct resource *resource; - - /* Report the PCIe BAR */ - resource = find_resource(dev, 0xcf); - if (resource) { - report_resource_stored(dev, resource, "<mmconfig>"); - } - - /* And call the normal set_resources */ - pci_dev_set_resources(dev); + mmconf_resource32(dev, PCIEXBAR); }
static void intel_set_subsystem(device_t dev, unsigned vendor, unsigned device) @@ -215,7 +200,7 @@ static struct pci_operations intel_pci_ops = {
static struct device_operations mc_ops = { .read_resources = mc_read_resources, - .set_resources = mc_set_resources, + .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .acpi_fill_ssdt_generator = generate_cpu_entries, #if CONFIG_HAVE_ACPI_RESUME diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c index a86672b..e34628a 100644 --- a/src/northbridge/intel/sandybridge/northbridge.c +++ b/src/northbridge/intel/sandybridge/northbridge.c @@ -265,28 +265,13 @@ static void mc_read_resources(device_t dev)
pci_dev_read_resources(dev);
- /* We use 0xcf as an unused index for our PCIe bar so that we find it again */ buses = get_pcie_bar(&pcie_config_base); if (buses) { - struct resource *resource = new_resource(dev, 0xcf); + struct resource *resource = new_resource(dev, PCIEXBAR); mmconf_resource_init(resource, 0, pcie_config_base, buses); } }
-static void mc_set_resources(device_t dev) -{ - struct resource *resource; - - /* Report the PCIe BAR */ - resource = find_resource(dev, 0xcf); - if (resource) { - report_resource_stored(dev, resource, "<mmconfig>"); - } - - /* And call the normal set_resources */ - pci_dev_set_resources(dev); -} - static void intel_set_subsystem(device_t dev, unsigned vendor, unsigned device) { if (!vendor || !device) { @@ -475,7 +460,7 @@ static struct pci_operations intel_pci_ops = {
static struct device_operations mc_ops = { .read_resources = mc_read_resources, - .set_resources = mc_set_resources, + .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = northbridge_init, .scan_bus = 0, diff --git a/src/soc/intel/sch/northbridge.c b/src/soc/intel/sch/northbridge.c index 07b17c0..e4d77f8 100644 --- a/src/soc/intel/sch/northbridge.c +++ b/src/soc/intel/sch/northbridge.c @@ -201,19 +201,6 @@ static void mc_read_resources(device_t dev) } }
-static void mc_set_resources(device_t dev) -{ - struct resource *resource; - - /* Report the PCIe BAR. */ - resource = find_resource(dev, 0xcf); - if (resource) - report_resource_stored(dev, resource, "<mmconfig>"); - - /* And call the normal set_resources. */ - pci_dev_set_resources(dev); -} - static void intel_set_subsystem(device_t dev, unsigned vendor, unsigned device) { if (!vendor || !device) { @@ -231,7 +218,7 @@ static struct pci_operations intel_pci_ops = {
static struct device_operations mc_ops = { .read_resources = mc_read_resources, - .set_resources = mc_set_resources, + .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .acpi_fill_ssdt_generator = generate_cpu_entries, .scan_bus = 0,