Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35921
b: refs/heads/master
c: 8380aab
h: refs/heads/master
i:
  35919: 392e53a
v: v3
  • Loading branch information
Andi Kleen authored and Andi Kleen committed Sep 26, 2006
1 parent 4e584f2 commit 7c06247
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 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: b3698c03eb6d4581e879d6bb0f183ed8dda96d37
refs/heads/master: 8380aabb99719af583447133f19a4d8074b5c337
28 changes: 9 additions & 19 deletions trunk/arch/x86_64/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,35 +536,25 @@ static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
return 0;
}

void __init setup_memory_region(void)
void early_panic(char *msg)
{
char *who = "BIOS-e820";
early_printk(msg);
panic(msg);
}

void __init setup_memory_region(void)
{
/*
* Try to copy the BIOS-supplied E820-map.
*
* Otherwise fake a memory map; one section from 0k->640k,
* the next section from 1mb->appropriate_mem_k
*/
sanitize_e820_map(E820_MAP, &E820_MAP_NR);
if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) {
unsigned long mem_size;

/* compare results from other methods and take the greater */
if (ALT_MEM_K < EXT_MEM_K) {
mem_size = EXT_MEM_K;
who = "BIOS-88";
} else {
mem_size = ALT_MEM_K;
who = "BIOS-e801";
}

e820.nr_map = 0;
add_memory_region(0, LOWMEMSIZE(), E820_RAM);
add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
}
if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0)
early_panic("Cannot find a valid memory map");
printk(KERN_INFO "BIOS-provided physical RAM map:\n");
e820_print_map(who);
e820_print_map("BIOS-e820");
}

static int __init parse_memopt(char *p)
Expand Down
4 changes: 0 additions & 4 deletions trunk/include/asm-x86_64/e820.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
#define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
#define E820_NVS 4

#define HIGH_MEMORY (1024*1024)

#define LOWMEMSIZE() (0x9f000)

#ifndef __ASSEMBLY__
struct e820entry {
u64 addr; /* start of memory segment */
Expand Down

0 comments on commit 7c06247

Please sign in to comment.