[coreboot] New patch to review for coreboot: af92826 i945, Lenovo ThinkPad X60: correct VGA init's physbase?
Denis Carikli (GNUtoo@no-log.org)
gerrit at coreboot.org
Thu Feb 28 19:31:31 CET 2013
Denis Carikli (GNUtoo at no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2558
-gerrit
commit af92826e725296a7c4927f06057e7a8e6cda8433
Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date: Thu Feb 28 15:20:04 2013 +0100
i945, Lenovo ThinkPad X60: correct VGA init's physbase?
Change-Id: Ic1cc7a7ed8ef9f1b73125103a4c5e7b30f41fdc2
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
---
src/mainboard/lenovo/x60/i915.c | 8 +++++---
src/mainboard/lenovo/x60/i915io.c | 2 +-
src/northbridge/intel/i945/gma.c | 7 ++++++-
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/mainboard/lenovo/x60/i915.c b/src/mainboard/lenovo/x60/i915.c
index 073351e..420a9fe 100644
--- a/src/mainboard/lenovo/x60/i915.c
+++ b/src/mainboard/lenovo/x60/i915.c
@@ -87,6 +87,7 @@ static void io_i915_WRITE32(unsigned long val, unsigned long addr)
4250.00
PTEs
*/
+
static void
setgtt(int start, int end, unsigned long base, int inc)
{
@@ -245,10 +246,11 @@ int i915lightup(unsigned int pphysbase,
}
}
- setgtt(0, 4520, physbase, 4096);
+ setgtt(0, 8192, physbase, 1024);
printk(BIOS_SPEW, "memset %p to 0xff for %d bytes\n",
- (void *)graphics, 4520*4096);
- memset((void *)graphics, 0xff, 4520*4096);
+ (void *)graphics, 8192*1024);
+ memset((void *)graphics, 0xff, 8192*1024);
+
printk(BIOS_SPEW, "%ld microseconds\n", globalmicroseconds());
i915_init_done = 1;
oprom_is_loaded = 1;
diff --git a/src/mainboard/lenovo/x60/i915io.c b/src/mainboard/lenovo/x60/i915io.c
index 1f37972..4161693 100644
--- a/src/mainboard/lenovo/x60/i915io.c
+++ b/src/mainboard/lenovo/x60/i915io.c
@@ -20,7 +20,7 @@
#include "i915io.h"
struct iodef iodefs[] = {
-{V,0,},
+{V,7,},
{M, 1, "Linux agpgart interface v0.103"},
{M, 1, "agpgart-intel 0000:00:00.0:Intel 945GM Chipset"},
{M, 1, "agpgart-intel 0000:00:00.0:detected gtt size:262144K total, 262144K mappable"},
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c
index 9ef863c..d7d6ab3 100644
--- a/src/northbridge/intel/i945/gma.c
+++ b/src/northbridge/intel/i945/gma.c
@@ -34,6 +34,7 @@ static void gma_func0_init(struct device *dev)
{
u32 reg32;
u32 graphics_base, graphics_size;
+ int tolud;
/* Unconditionally reset graphics */
pci_write_config8(dev, GDRST, 1);
@@ -70,8 +71,12 @@ static void gma_func0_init(struct device *dev)
u32 iobase, mmiobase, physbase;
iobase = dev->resource_list[1].base;
mmiobase = dev->resource_list[0].base;
+#if 0 /* unreliable according to i915_stolen_to_phys in the linux driver */
physbase = pci_read_config32(dev, 0x5c) & ~0xf;
-
+#else
+ tolud = pci_read_config8(dev_find_slot(0, PCI_DEVFN(0,0)), TOLUD);
+ physbase = (tolud >> 3 << 27);
+#endif
int i915lightup(u32 physbase, u32 iobase, u32 mmiobase, u32 gfx);
i915lightup(physbase, iobase, mmiobase, graphics_base);
#endif
More information about the coreboot
mailing list