aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/pineview/memmap.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-01-20 13:31:09 +0100
committerAngel Pons <th3fanbus@gmail.com>2021-01-30 23:12:32 +0000
commit1318ab475ddcae5fdd8f41b66c4d7034c8b3d396 (patch)
tree7c55e861f5f04f058402f449975d7b4938d3e755 /src/northbridge/intel/pineview/memmap.c
parentb274ec73ab608384c925876d5a3bcf0396dcc3d5 (diff)
nb/intel/pineview: Define and use MMCONF_BUS_NUMBER
Note that bootblock.c originally wrote a reserved bit of the PCIEXBAR register. The `length` bitfield was set to 0, so assume 256 busses. Change-Id: Ie967747b4bf559b5aedc67cbcd35bca51f5a692e Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49760 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel/pineview/memmap.c')
-rw-r--r--src/northbridge/intel/pineview/memmap.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/northbridge/intel/pineview/memmap.c b/src/northbridge/intel/pineview/memmap.c
index bebe3a5b69..58342795b2 100644
--- a/src/northbridge/intel/pineview/memmap.c
+++ b/src/northbridge/intel/pineview/memmap.c
@@ -15,43 +15,6 @@
#include <cpu/intel/smm_reloc.h>
#include <stdint.h>
-int decode_pcie_bar(u32 *const base, u32 *const len)
-{
- *base = 0;
- *len = 0;
-
- const struct {
- u16 num_buses;
- u32 addr_mask;
- } busmask[] = {
- {256, 0xf0000000},
- {128, 0xf8000000},
- {64, 0xfc000000},
- {0, 0},
- };
-
- const u32 pciexbar_reg = pci_read_config32(HOST_BRIDGE, PCIEXBAR);
-
- /* MMCFG not supported or not enabled */
- if (!(pciexbar_reg & (1 << 0))) {
- printk(BIOS_WARNING, "WARNING: MMCONF not set\n");
- return 0;
- }
-
- const u32 index = (pciexbar_reg >> 1) & 3;
- const u32 pciexbar = pciexbar_reg & busmask[index].addr_mask;
- const int max_buses = busmask[index].num_buses;
-
- if (!pciexbar) {
- printk(BIOS_WARNING, "WARNING: pciexbar invalid\n");
- return 0;
- }
-
- *base = pciexbar;
- *len = max_buses * MiB;
- return 1;
-}
-
/** Decodes used Graphics Mode Select (GMS) to kilobytes. */
u32 decode_igd_memory_size(const u32 gms)
{