Messages in this thread | | | From | Andi Kleen <> | 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 |
| |
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/
| |