mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Ingo Molnar" <mingo@elte.hu>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"H. Anvin" <hpa@zytor.com>,
	"Arjan van de Ven" <arjan@infradead.org>
Subject: Re: x86 git tree broken (bisected)
Date: Sun, 13 Apr 2008 15:00:28 -0700	[thread overview]
Message-ID: <86802c440804131500q420f7442hd8512cc6f4a1a6fd@mail.gmail.com> (raw)
In-Reply-To: <200804131812.55684.rjw@sisk.pl>

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

On Sun, Apr 13, 2008 at 9:12 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
...
>  > can you try to apply the patch i sent to you about agp bridge order
>  > reading for buggy silicon?
>  >
>  > Please boot kernel with "debug"...
>  >
>  > I want to verify if you can get
>  >
>  > "
>  > Aperture conflicts with PCI mapping.
>  > "
>  >
>  > in your boot log...
>
>  It's not present in there:
>
>  rafael@albercik:~> grep Aperture failing-with-patch-dmesg.log
>  Aperture too small (32 MB)
>  Aperture from AGP @ de000000 size 4096 MB (APSIZE 0)
>  Aperture too small (0 MB)
>  agpgart: Aperture pointing to RAM
>  agpgart: Aperture from AGP @ de000000 size 4096 MB
>  agpgart: Aperture too small (0 MB)
>
>  Full dmesg output attached.

please check attached debug patch. and check if you can change GART
size in your BIOS setup to 64M instead of 32M

Thanks

YH

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: debug_gart_checking.patch --]
[-- Type: text/x-patch; name=debug_gart_checking.patch, Size: 3041 bytes --]

[PATCH] x86_64: checking aperture size order...

diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 2e93b31..e86689a 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -96,7 +96,7 @@ static int __init aperture_valid(u64 aper_base, u32 aper_size)
 		printk(KERN_ERR "Aperture pointing to e820 RAM. Ignoring.\n");
 		return 0;
 	}
-	if (aper_size < 64*1024*1024) {
+	if (aper_size < 32*1024*1024) {
 		printk(KERN_ERR "Aperture too small (%d MB)\n", aper_size>>20);
 		return 0;
 	}
@@ -167,7 +167,9 @@ static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order)
 	 * On some sick chips, APSIZE is 0. It means it wants 4G
 	 * so let double check that order, and lets trust AMD NB settings:
 	 */
-	if (aper + (32UL<<(20 + *order)) > 0x100000000UL) {
+	printk(KERN_INFO "Aperture from AGP @ %Lx old size %u MB\n",
+			aper, 32 << old_order);
+	if (aper + (32ULL<<(20 + *order)) > 0x100000000ULL) {
 		printk(KERN_INFO "Aperture size %u MB (APSIZE %x) is not right, using settings from NB\n",
 				32 << *order, apsizereg);
 		*order = old_order;
@@ -302,8 +304,8 @@ void __init early_gart_iommu_check(void)
 		fix = 1;
 
 	if (gart_fix_e820 && !fix && aper_enabled) {
-		if (e820_any_mapped(aper_base, aper_base + aper_size,
-				    E820_RAM)) {
+		if (!e820_all_mapped(aper_base, aper_base + aper_size,
+				    E820_RESERVED)) {
 			/* reserved it, so we can resuse it in second kernel */
 			printk(KERN_INFO "update e820 for GART\n");
 			add_memory_region(aper_base, aper_size, E820_RESERVED);
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 8fc05c8..97d4821 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -245,11 +245,7 @@ static int __devinit aperture_valid(u64 aper, u32 size)
 		printk(KERN_ERR PFX "No aperture\n");
 		return 0;
 	}
-	if (size < 32*1024*1024) {
-		printk(KERN_ERR PFX "Aperture too small (%d MB)\n", size>>20);
-		return 0;
-	}
-       if ((u64)aper + size > 0x100000000ULL) {
+	if ((u64)aper + size > 0x100000000ULL) {
 		printk(KERN_ERR PFX "Aperture out of bounds\n");
 		return 0;
 	}
@@ -257,6 +253,10 @@ static int __devinit aperture_valid(u64 aper, u32 size)
 		printk(KERN_ERR PFX "Aperture pointing to RAM\n");
 		return 0;
 	}
+	if (size < 32*1024*1024) {
+		printk(KERN_ERR PFX "Aperture too small (%d MB)\n", size>>20);
+		return 0;
+	}
 
 	/* Request the Aperture. This catches cases when someone else
 	   already put a mapping in there - happens with some very broken BIOS
@@ -317,7 +317,7 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
 	 * On some sick chips APSIZE is 0. This means it wants 4G
 	 * so let double check that order, and lets trust the AMD NB settings
 	 */
-	if (aper + (32ULL<<(20 + order)) > 0x100000000ULL) {
+	if (order >=0 && aper + (32ULL<<(20 + order)) > 0x100000000ULL) {
 		printk(KERN_INFO "Aperture size %u MB is not right, using settings from NB\n",
 				  32 << order);
 		order = nb_order;

  parent reply	other threads:[~2008-04-13 22:00 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10 19:59 x86 git tree broken Rafael J. Wysocki
2008-04-10 20:13 ` Ingo Molnar
2008-04-10 20:25   ` Rafael J. Wysocki
2008-04-10 20:29     ` Ingo Molnar
2008-04-10 20:38       ` Ingo Molnar
2008-04-10 22:28         ` Rafael J. Wysocki
2008-04-11 19:26           ` x86 git tree broken (bisected) Rafael J. Wysocki
2008-04-11 20:23             ` Rafael J. Wysocki
2008-04-11 20:29               ` Rafael J. Wysocki
2008-04-11 20:26             ` Yinghai Lu
2008-04-11 20:51               ` Rafael J. Wysocki
2008-04-11 21:11                 ` Yinghai Lu
2008-04-11 21:21                   ` Rafael J. Wysocki
2008-04-11 21:31                     ` Yinghai Lu
2008-04-13  8:24                 ` Yinghai Lu
2008-04-13  8:41                   ` Yinghai Lu
2008-04-13 16:14                     ` Rafael J. Wysocki
2008-04-14  9:02                       ` Ingo Molnar
2008-04-13 16:12                   ` Rafael J. Wysocki
2008-04-13 18:07                     ` Yinghai Lu
2008-04-13 18:47                       ` Rafael J. Wysocki
2008-04-13 18:53                         ` Yinghai Lu
2008-04-13 18:54                         ` Yinghai Lu
2008-04-13 22:00                     ` Yinghai Lu [this message]
2008-04-13 22:10                       ` Rafael J. Wysocki
2008-04-13 22:32                         ` Yinghai Lu
2008-04-13 23:41                           ` Rafael J. Wysocki
2008-04-13 23:45                             ` H. Peter Anvin
2008-04-14  0:09                               ` Rafael J. Wysocki
2008-04-14  0:12                                 ` H. Peter Anvin
2008-04-14  0:19                           ` Rafael J. Wysocki
2008-04-14  1:42                             ` Yinghai Lu
2008-04-14  9:16                               ` Ingo Molnar
2008-04-14 18:08                                 ` Yinghai Lu
2008-04-14 20:21                               ` Rafael J. Wysocki
2008-04-14 21:06                                 ` Yinghai Lu
2008-04-14 21:09                                   ` Rafael J. Wysocki
2008-04-14 21:36                                     ` Yinghai Lu
2008-04-13  7:51               ` Ingo Molnar
2008-04-13  7:59                 ` Yinghai Lu
2008-04-13  7:58             ` [rfc] hw resource debugging checks (was: Re: x86 git tree broken (bisected)) Ingo Molnar
2008-04-13  8:18               ` Yinghai Lu
2008-04-13  9:19                 ` Ingo Molnar
2008-04-13  9:39               ` [rfc] hw resource debugging checks Andi Kleen
2008-04-13 17:53                 ` Arjan van de Ven
2008-04-13 18:19                 ` Yinghai Lu
2008-04-13 18:29                   ` Andi Kleen
2008-04-13 19:29                     ` Yinghai Lu
2008-04-14  3:52                       ` Arjan van de Ven
2008-04-14  5:01                         ` Yinghai Lu
2008-04-14 14:12                           ` Arjan van de Ven
2008-04-14 18:11                             ` Yinghai Lu
2008-04-13 15:48               ` [rfc] hw resource debugging checks (was: Re: x86 git tree broken (bisected)) Arjan van de Ven
2008-04-10 20:51 ` x86 git tree broken Ingo Molnar
2008-04-10 22:27   ` Rafael J. Wysocki
2008-04-11  6:43     ` Ingo Molnar
     [not found] <fa.2mJjVaMdmV5IWp3mQiYHE1u4pHU@ifi.uio.no>
     [not found] ` <fa.SO/I64FxJXD1oLBH54BTs4pc56c@ifi.uio.no>
     [not found]   ` <fa.fJC0A/aGr6H8XE94NUuvl1ixoc0@ifi.uio.no>
     [not found]     ` <fa.qs5oa+YMIJd6h2hpuGCULc8ODY4@ifi.uio.no>
2008-04-16  4:27       ` x86 git tree broken (bisected) Robert Hancock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86802c440804131500q420f7442hd8512cc6f4a1a6fd@mail.gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®