summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2012-10-15 20:53:44 +0200
committerRichard Braun <rbraun@sceen.net>2012-10-15 20:53:44 +0200
commit73378a3e526d2425ff8079a24b3604a8119d5128 (patch)
tree3823374ce74f503ab7cbd90454c598ef8d9d4488
parentb99d56d88ac4c245e5dad7ebe893436f88fac202 (diff)
x86/param: update physical memory configuration
Add amd64 properties, and increase PAE limit to 52 bits.
-rw-r--r--arch/x86/machine/biosmem.c12
-rw-r--r--arch/x86/machine/param.h21
2 files changed, 16 insertions, 17 deletions
diff --git a/arch/x86/machine/biosmem.c b/arch/x86/machine/biosmem.c
index ad80afa6..77bc8d0c 100644
--- a/arch/x86/machine/biosmem.c
+++ b/arch/x86/machine/biosmem.c
@@ -504,10 +504,10 @@ biosmem_map_find_avail(phys_addr_t *phys_start, phys_addr_t *phys_end)
if (entry->type != BIOSMEM_TYPE_AVAILABLE)
continue;
-#ifndef PAE
+#ifndef VM_PHYS_HIGHMEM_LIMIT
if (entry->base_addr >= VM_PHYS_NORMAL_LIMIT)
break;
-#endif /* PAE */
+#endif /* VM_PHYS_HIGHMEM_LIMIT */
start = vm_page_round(entry->base_addr);
@@ -516,10 +516,10 @@ biosmem_map_find_avail(phys_addr_t *phys_start, phys_addr_t *phys_end)
entry_end = entry->base_addr + entry->length;
-#ifndef PAE
+#ifndef VM_PHYS_HIGHMEM_LIMIT
if (entry_end > VM_PHYS_NORMAL_LIMIT)
entry_end = VM_PHYS_NORMAL_LIMIT;
-#endif /* PAE */
+#endif /* VM_PHYS_HIGHMEM_LIMIT */
end = vm_page_trunc(entry_end);
@@ -577,7 +577,7 @@ biosmem_setup(void)
biosmem_heap_free, biosmem_heap_end,
VM_PHYS_SEGLIST_NORMAL);
-#ifdef PAE
+#ifdef VM_PHYS_HIGHMEM_LIMIT
phys_start = VM_PHYS_NORMAL_LIMIT;
phys_end = VM_PHYS_HIGHMEM_LIMIT;
error = biosmem_map_find_avail(&phys_start, &phys_end);
@@ -585,7 +585,7 @@ biosmem_setup(void)
if (!error)
biosmem_load_segment("highmem", phys_start, phys_end,
phys_start, phys_end, VM_PHYS_SEGLIST_HIGHMEM);
-#endif /* PAE */
+#endif /* VM_PHYS_HIGHMEM_LIMIT */
}
static void __init
diff --git a/arch/x86/machine/param.h b/arch/x86/machine/param.h
index ffa0ff7e..814e71b8 100644
--- a/arch/x86/machine/param.h
+++ b/arch/x86/machine/param.h
@@ -87,13 +87,22 @@
#endif /* __LP64__ */
/*
- * Maximum number of physical segments.
+ * Physical memory properties.
*/
+#ifdef __LP64__
+#define VM_MAX_PHYS_SEG 2
+#define VM_PHYS_NORMAL_LIMIT DECL_CONST(0x100000000, UL)
+#define VM_PHYS_HIGHMEM_LIMIT DECL_CONST(0x10000000000000, UL)
+#else /* __LP64__ */
#ifdef PAE
#define VM_MAX_PHYS_SEG 2
+#define VM_PHYS_NORMAL_LIMIT DECL_CONST(0x100000000, ULL)
+#define VM_PHYS_HIGHMEM_LIMIT DECL_CONST(0x10000000000000, ULL)
#else /* PAE */
#define VM_MAX_PHYS_SEG 1
+#define VM_PHYS_NORMAL_LIMIT DECL_CONST(0xfffff000, UL)
#endif /* PAE */
+#endif /* __LP64__ */
/*
* Number of physical segment lists.
@@ -107,16 +116,6 @@
#define VM_PHYS_SEGLIST_NORMAL 0
/*
- * Segment boundaries.
- */
-#ifdef PAE
-#define VM_PHYS_NORMAL_LIMIT DECL_CONST(0x100000000, ULL)
-#define VM_PHYS_HIGHMEM_LIMIT DECL_CONST(0x1000000000, ULL)
-#else /* PAE */
-#define VM_PHYS_NORMAL_LIMIT DECL_CONST(0xfffff000, UL)
-#endif /* PAE */
-
-/*
* Virtual space reserved for kernel map entries.
*/
#define VM_MAP_KENTRY_SIZE DECL_CONST(0x800000, UL)