Usha P has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40363 )
Change subject: soc/intel/common/systemagent: Add new PCIEXBAR register LENGTH offset values ......................................................................
soc/intel/common/systemagent: Add new PCIEXBAR register LENGTH offset values
Add PCIEXBAR register LENGTH offset values to accommodate new SoC implementation.
Changes: 1. The major delta is 0x60:PCIEXBAR register LENGTH offset definition has been changed for latest SoC.
2. Common code takes care of setting the right value for pciex length.
TEST=Able to build CNL, SKL, APL platforms.
Change-Id: I75619be7614f58c96670ef86485d49d4da06ad91 Signed-off-by: Usha P usha.p@intel.com --- M src/soc/intel/common/block/systemagent/Kconfig M src/soc/intel/common/block/systemagent/systemagent_def.h M src/soc/intel/common/block/systemagent/systemagent_early.c 3 files changed, 44 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/40363/1
diff --git a/src/soc/intel/common/block/systemagent/Kconfig b/src/soc/intel/common/block/systemagent/Kconfig index 6d88cbc..db0cdbd 100644 --- a/src/soc/intel/common/block/systemagent/Kconfig +++ b/src/soc/intel/common/block/systemagent/Kconfig @@ -11,12 +11,28 @@
config SA_PCIEX_LENGTH_MIB hex - default 0x10000000 if (PCIEX_LENGTH_256MB) - default 0x8000000 if (PCIEX_LENGTH_128MB) - default 0x4000000 if (PCIEX_LENGTH_64MB) - default 0x10000000 + default 0x1000 if (PCIEX_LENGTH_4096MB) + default 0x800 if (PCIEX_LENGTH_2048MB) + default 0x400 if (PCIEX_LENGTH_1024MB) + default 0x200 if (PCIEX_LENGTH_512MB) + default 0x100 if (PCIEX_LENGTH_256MB) + default 0x80 if (PCIEX_LENGTH_128MB) + default 0x40 if (PCIEX_LENGTH_64MB) + default 0x100 help - This option allows you to select length of PCIEX region. + This option allows you to select length of PCIEX region in MiB. + +config PCIEX_LENGTH_4096MB + bool + +config PCIEX_LENGTH_2048MB + bool + +config PCIEX_LENGTH_1024MB + bool + +config PCIEX_LENGTH_512MB + bool
config PCIEX_LENGTH_256MB bool diff --git a/src/soc/intel/common/block/systemagent/systemagent_def.h b/src/soc/intel/common/block/systemagent/systemagent_def.h index 03f4de4..91595c2 100644 --- a/src/soc/intel/common/block/systemagent/systemagent_def.h +++ b/src/soc/intel/common/block/systemagent/systemagent_def.h @@ -19,6 +19,10 @@ #define DPR_PRS (1 << 1) #define DPR_SIZE_MASK 0xff0
+#define PCIEXBAR_LENGTH_4096MB 6 +#define PCIEXBAR_LENGTH_2048MB 5 +#define PCIEXBAR_LENGTH_1024MB 4 +#define PCIEXBAR_LENGTH_512MB 3 #define PCIEXBAR_LENGTH_64MB 2 #define PCIEXBAR_LENGTH_128MB 1 #define PCIEXBAR_LENGTH_256MB 0 diff --git a/src/soc/intel/common/block/systemagent/systemagent_early.c b/src/soc/intel/common/block/systemagent/systemagent_early.c index 79a6628..ff806ac 100644 --- a/src/soc/intel/common/block/systemagent/systemagent_early.c +++ b/src/soc/intel/common/block/systemagent/systemagent_early.c @@ -28,13 +28,29 @@
/* Get PCI Express Region Length */ switch (CONFIG_SA_PCIEX_LENGTH_MIB) { - case 256 * MiB: + /* + * Length of PCIEXBAR region would be more than 256MB if + * PCIEXBAR.LENGTH width is 3. + */ + case 4096: + pciexbar_length = PCIEXBAR_LENGTH_4096MB; + break; + case 2048: + pciexbar_length = PCIEXBAR_LENGTH_2048MB; + break; + case 1024: + pciexbar_length = PCIEXBAR_LENGTH_1024MB; + break; + case 512: + pciexbar_length = PCIEXBAR_LENGTH_512MB; + break; + case 256: pciexbar_length = PCIEXBAR_LENGTH_256MB; break; - case 128 * MiB: + case 128: pciexbar_length = PCIEXBAR_LENGTH_128MB; break; - case 64 * MiB: + case 64: pciexbar_length = PCIEXBAR_LENGTH_64MB; break; default: