Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18515
-gerrit
commit 20764cb9edc8fd3ac79a20f9766e8863a15411c2
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Mon Feb 27 20:14:21 2017 +0100
nb/x4x: Do not enable IGD when not supported
According to "Intel ® 4 Series Chipset Family datasheet" in the
description about GGC and DEVEN, CAPID0 bit48 is said to reflect the
presence of an internal graphic device. This would allow the P43 and
P45 chipset variants to work.
Change-Id: Icdaa2862f82000de6d51278098365c63b7719f7f
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/northbridge/intel/x4x/early_init.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/northbridge/intel/x4x/early_init.c b/src/northbridge/intel/x4x/early_init.c
index 7d6afc9..2a6e233 100644
--- a/src/northbridge/intel/x4x/early_init.c
+++ b/src/northbridge/intel/x4x/early_init.c
@@ -54,16 +54,19 @@ void x4x_early_init(void)
pci_write_config8(d0f0, D0F0_PAM(5), 0x33);
pci_write_config8(d0f0, D0F0_PAM(6), 0x33);
- /* Enable internal GFX */
- pci_write_config32(d0f0, D0F0_DEVEN, BOARD_DEVEN);
- /* Set preallocated IGD size from cmos */
- u8 gfxsize;
-
- if (get_option(&gfxsize, "gfx_uma_size") != CB_SUCCESS) {
- /* 6 for 64MB, default if not set in cmos */
- gfxsize = 6;
+ if (pci_read_config32(d0f0, D0F0_CAPID0 + 4) & (1 << (46 - 32))) {
+ /* Enable internal GFX */
+ pci_write_config32(d0f0, D0F0_DEVEN, BOARD_DEVEN);
+ /* Set preallocated IGD size from cmos */
+ u8 gfxsize;
+
+ if (get_option(&gfxsize, "gfx_uma_size") != CB_SUCCESS) {
+ /* 6 for 64MB, default if not set in cmos */
+ gfxsize = 6;
+ }
+ pci_write_config16(d0f0, D0F0_GGC,
+ 0x0100 | ((gfxsize + 1) << 4));
}
- pci_write_config16(d0f0, D0F0_GGC, 0x0100 | ((gfxsize + 1) << 4));
}
static void init_egress(void)
Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18515
-gerrit
commit 0176e1b98aabb8900097e212648f206ec5a9862a
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Mon Feb 27 20:14:21 2017 +0100
nb/x4x: Do not enable IGD when not supported
According to "Intel ® 4 Series Chipset Family datasheet" in the
description about GGC and DEVEN, CAPID0 bit48 is said to reflect the
presence of an internal graphic device. This would allow the P43 and
P45 chipset variants to work.
UNTESTED
Change-Id: Icdaa2862f82000de6d51278098365c63b7719f7f
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/northbridge/intel/x4x/early_init.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/northbridge/intel/x4x/early_init.c b/src/northbridge/intel/x4x/early_init.c
index 7d6afc9..af46b5b 100644
--- a/src/northbridge/intel/x4x/early_init.c
+++ b/src/northbridge/intel/x4x/early_init.c
@@ -54,16 +54,19 @@ void x4x_early_init(void)
pci_write_config8(d0f0, D0F0_PAM(5), 0x33);
pci_write_config8(d0f0, D0F0_PAM(6), 0x33);
- /* Enable internal GFX */
- pci_write_config32(d0f0, D0F0_DEVEN, BOARD_DEVEN);
- /* Set preallocated IGD size from cmos */
- u8 gfxsize;
-
- if (get_option(&gfxsize, "gfx_uma_size") != CB_SUCCESS) {
- /* 6 for 64MB, default if not set in cmos */
- gfxsize = 6;
+ if (pci_read_config32(d0f0, D0F0_CAPID0 + 4) & (1 << (48 - 32))) {
+ /* Enable internal GFX */
+ pci_write_config32(d0f0, D0F0_DEVEN, BOARD_DEVEN);
+ /* Set preallocated IGD size from cmos */
+ u8 gfxsize;
+
+ if (get_option(&gfxsize, "gfx_uma_size") != CB_SUCCESS) {
+ /* 6 for 64MB, default if not set in cmos */
+ gfxsize = 6;
+ }
+ pci_write_config16(d0f0, D0F0_GGC,
+ 0x0100 | ((gfxsize + 1) << 4));
}
- pci_write_config16(d0f0, D0F0_GGC, 0x0100 | ((gfxsize + 1) << 4));
}
static void init_egress(void)
Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18513
-gerrit
commit 7b2e14523348dae8598afa48ec2b32d3e31f9f14
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Mon Feb 27 16:27:21 2017 +0100
nb/x4x/raminit.c: Remove ME locking code
This code ought not to run if ME is disabled. It also prohibits
writing to some GMCH regs like GGC bit1.
Change-Id: Iaa8646e535e13c44c010ccd434a5af954cf7dfbc
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/northbridge/intel/x4x/raminit_ddr2.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/northbridge/intel/x4x/raminit_ddr2.c b/src/northbridge/intel/x4x/raminit_ddr2.c
index 9c414e2..51a98e7 100644
--- a/src/northbridge/intel/x4x/raminit_ddr2.c
+++ b/src/northbridge/intel/x4x/raminit_ddr2.c
@@ -2155,15 +2155,19 @@ void raminit_ddr2(struct sysinfo *s)
printk(BIOS_DEBUG, "Done power settings\n");
// ME related
- if (RANK_IS_POPULATED(s->dimms, 0, 0)
- || RANK_IS_POPULATED(s->dimms, 1, 0)) {
- MCHBAR8(0xa2f) = MCHBAR8(0xa2f) | (1 << 0);
+ /*
+ * FIXME: This locks some registers like bit1 of GGC
+ * and is only needed in case of ME being used.
+ */
+ if (ME_UMA_SIZEMB != 0) {
+ if (RANK_IS_POPULATED(s->dimms, 0, 0)
+ || RANK_IS_POPULATED(s->dimms, 1, 0))
+ MCHBAR8(0xa2f) = MCHBAR8(0xa2f) | (1 << 0);
+ if (RANK_IS_POPULATED(s->dimms, 0, 1)
+ || RANK_IS_POPULATED(s->dimms, 1, 1))
+ MCHBAR8(0xa2f) = MCHBAR8(0xa2f) | (1 << 1);
+ MCHBAR32(0xa30) = MCHBAR32(0xa30) | (1 << 26);
}
- if (RANK_IS_POPULATED(s->dimms, 0, 1)
- || RANK_IS_POPULATED(s->dimms, 1, 1)) {
- MCHBAR8(0xa2f) = MCHBAR8(0xa2f) | (1 << 1);
- }
- MCHBAR32(0xa30) = MCHBAR32(0xa30) | (1 << 26);
printk(BIOS_DEBUG, "Done ddr2\n");
}