|
@@ -42,13 +42,18 @@ int page_is_ram(unsigned long pagenr)
|
|
*/
|
|
*/
|
|
if (e820.map[i].type != E820_RAM)
|
|
if (e820.map[i].type != E820_RAM)
|
|
continue;
|
|
continue;
|
|
- /*
|
|
|
|
- * !!!FIXME!!! Some BIOSen report areas as RAM that
|
|
|
|
- * are not. Notably the 640->1Mb area. We need a sanity
|
|
|
|
- * check here.
|
|
|
|
- */
|
|
|
|
addr = (e820.map[i].addr + PAGE_SIZE-1) >> PAGE_SHIFT;
|
|
addr = (e820.map[i].addr + PAGE_SIZE-1) >> PAGE_SHIFT;
|
|
end = (e820.map[i].addr + e820.map[i].size) >> PAGE_SHIFT;
|
|
end = (e820.map[i].addr + e820.map[i].size) >> PAGE_SHIFT;
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Sanity check: Some BIOSen report areas as RAM that
|
|
|
|
+ * are not. Notably the 640->1Mb area, which is the
|
|
|
|
+ * PCI BIOS area.
|
|
|
|
+ */
|
|
|
|
+ if (addr >= (BIOS_BEGIN >> PAGE_SHIFT) &&
|
|
|
|
+ end < (BIOS_END >> PAGE_SHIFT))
|
|
|
|
+ continue;
|
|
|
|
+
|
|
if ((pagenr >= addr) && (pagenr < end))
|
|
if ((pagenr >= addr) && (pagenr < end))
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|