Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80522
b: refs/heads/master
c: 950f9d9
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent 496542c commit 7ca6ca3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f5192b9feeff6a96c97c143c3ca558fdbe2dc8e
refs/heads/master: 950f9d95bed1a366434d3597ea75f5b9d772d74f
15 changes: 10 additions & 5 deletions trunk/arch/x86/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@ int page_is_ram(unsigned long pagenr)
*/
if (e820.map[i].type != E820_RAM)
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;
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))
return 1;
}
Expand Down
7 changes: 1 addition & 6 deletions trunk/arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@
#include <linux/slab.h>
#include <linux/mm.h>

#include <asm/e820.h>
#include <asm/processor.h>
#include <asm/tlbflush.h>
#include <asm/sections.h>
#include <asm/uaccess.h>
#include <asm/pgalloc.h>

/*
* We must allow the BIOS range to be executable:
*/
#define BIOS_BEGIN 0x000a0000
#define BIOS_END 0x00100000

static inline int
within(unsigned long addr, unsigned long start, unsigned long end)
{
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/asm-x86/e820.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ struct e820map {
#define ISA_START_ADDRESS 0xa0000
#define ISA_END_ADDRESS 0x100000

#define BIOS_BEGIN 0x000a0000
#define BIOS_END 0x00100000

#ifdef __KERNEL__
#ifdef CONFIG_X86_32
# include "e820_32.h"
Expand Down

0 comments on commit 7ca6ca3

Please sign in to comment.