public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [patch] Ignore MCFG if the mmconfig area isn't reserved in the e820 table
Date: Thu, 23 Mar 2006 18:56:11 +0100	[thread overview]
Message-ID: <200603231856.12227.ak@suse.de> (raw)
In-Reply-To: <1143138170.3147.43.camel@laptopd505.fenrus.org>

On Thursday 23 March 2006 19:22, Arjan van de Ven wrote:
> Hi,
> 
> There have been several machines that don't have a working MMCONFIG,
> often because of a buggy MCFG table in the ACPI bios. This patch adds a
> simple sanity check that detects a whole bunch of these cases, and when
> it detects it, linux now boots rather than crash-and-burns. 

Yes, MCFG is a pain recently. Looks like we did the grave mistake
of using something in the BIOS before Windows again.

> +
> +/*
> + * Check if an address is reserved in the e820 map
> + */
> +int is_e820_reserved(u64 address)
> +{
> +	int	      i;
> +	i = e820.nr_map;
> +	while (--i >= 0) {
> +		unsigned long long start = e820.map[i].addr;
> +		unsigned long long end = start + e820.map[i].size;
> +
> +		if (address <=end && address >= start) {
> +			if (e820.map[i].type == E820_RESERVED)
> +				return 1;
> +			else
> +				return 0;
> +		}
> +	}
> +	return 0;
> +}

That is e820_mapped(address, address+size, E820_RESERVED)

And not having a size is definitely wrong on i386 too.

-Andi


  reply	other threads:[~2006-03-23 18:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-23 18:22 [patch] Ignore MCFG if the mmconfig area isn't reserved in the e820 table Arjan van de Ven
2006-03-23 17:56 ` Andi Kleen [this message]
2006-03-23 19:02   ` Arjan van de Ven
2006-03-23 19:15     ` Arjan van de Ven
2006-03-24 12:19       ` Andi Kleen
2006-03-24 13:36         ` Arjan van de Ven
2006-03-24 21:25         ` Greg KH
2006-03-24 15:22       ` [patch] Ignore MCFG if the mmconfig area isn't reserved in thee820 table Ashok Raj
2006-03-24 15:24         ` Arjan van de Ven
2006-03-24 15:39           ` Andi Kleen
2006-03-24 15:42             ` Arjan van de Ven
2006-03-24 15:48               ` Ashok Raj
2006-03-24 15:48                 ` Arjan van de Ven
2006-03-24 15:48               ` Andi Kleen
2006-03-24 15:50                 ` Arjan van de Ven
  -- strict thread matches above, loose matches on Subject: below --
2006-05-18  2:53 [patch] Ignore MCFG if the mmconfig area isn't reserved in the e820 table Konrad Rzeszutek
2006-05-18 13:03 ` Arjan van de Ven
2006-05-18 15:56   ` Konrad Rzeszutek
2006-05-18 16:46     ` Arjan van de Ven
2006-05-18 18:06       ` Petr Vandrovec
2006-05-18 18:15         ` Arjan van de Ven

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=200603231856.12227.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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