lkml.org 
[lkml]   [2006]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch] Ignore MCFG if the mmconfig area isn't reserved in the e820 table
Date
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-23 19:40    [W:1.236 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site