[coreboot-gerrit] Patch set updated for coreboot: b610b66 [NOTFORMERGE] mainboard/lenovo/x60/i915.c: Set PGETBL_CTL to VBIOS value

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Wed Jun 4 17:35:21 CEST 2014


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5927

-gerrit

commit b610b66d1ad0f72f4b25ae89e8e960312584733a
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Tue Jun 3 22:05:33 2014 +0200

    [NOTFORMERGE] mainboard/lenovo/x60/i915.c: Set PGETBL_CTL to VBIOS value
    
    PGETBL_CTL differs between VBIOS (-) and native graphics init (+).
    
    -          PGETBL_CTL: 0x3ffc0001
    +          PGETBL_CTL: 0x3f800001
    
    Also print what is written to PGETBL_CTL.
    
    Change-Id: I0a5b04c2c5300f5056cb48075aa5804984bc9948
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/mainboard/lenovo/x60/i915.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/mainboard/lenovo/x60/i915.c b/src/mainboard/lenovo/x60/i915.c
index b41a0ba..0c15aaa 100644
--- a/src/mainboard/lenovo/x60/i915.c
+++ b/src/mainboard/lenovo/x60/i915.c
@@ -135,19 +135,29 @@ int gtt_setup(unsigned int mmiobase)
 {
 	unsigned long PGETBL_save;
 
-	PGETBL_save = read32(mmiobase + PGETBL_CTL) & ~PGETBL_ENABLED;
+	PGETBL_save = read32(mmiobase + PGETBL_CTL);
+	printk(BIOS_DEBUG, "%s: GTT PGETLB_CTL register (original): 0x%lx\n", __func__, PGETBL_save);
+	PGETBL_save &= ~PGETBL_ENABLED;
+	printk(BIOS_DEBUG, "%s: GTT PGETLB_CTL register (&= ~PGETBL_ENABLED): 0x%lx\n", __func__, PGETBL_save);
 	PGETBL_save |= PGETBL_ENABLED;
+	printk(BIOS_DEBUG, "%s: GTT PGETLB_CTL register: 0x%lx\n", __func__, PGETBL_save);
 
 	PGETBL_save |= pci_read_config32(dev_find_slot(0, PCI_DEVFN(2,0)), 0x5c) & 0xfffff000;
+	printk(BIOS_DEBUG, "%s: GTT PGETLB_CTL register: 0x%lx\n", __func__, PGETBL_save);
 	PGETBL_save |= 2; /* set GTT to 256kb */
+	printk(BIOS_DEBUG, "%s: GTT PGETLB_CTL register: 0x%lx\n", __func__, PGETBL_save);
+
+	PGETBL_save += 0x7c0000;
+	printk(BIOS_DEBUG, "%s: GTT PGETLB_CTL register (added 0x7c0000 for VBIOS value): 0x%lx\n", __func__, PGETBL_save);
 
 	write32(mmiobase + GFX_FLSH_CNTL, 0);
 
 	write32(mmiobase + PGETBL_CTL, PGETBL_save);
 
 	/* verify */
-	if (read32(mmiobase + PGETBL_CTL) & PGETBL_ENABLED) {
-		printk(BIOS_DEBUG, "gtt_setup is enabled.\n");
+	PGETBL_save = read32(mmiobase + PGETBL_CTL);
+	if (PGETBL_save & PGETBL_ENABLED) {
+		printk(BIOS_DEBUG, "gtt_setup is enabled: GTT PGETLB_CTL register: 0x%lx\n", PGETBL_save);
 	} else {
 		printk(BIOS_DEBUG, "gtt_setup failed!!!\n");
 		return 1;



More information about the coreboot-gerrit mailing list