aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/e820.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c
index 829beec9247e..9645bb51f76a 100644
--- a/arch/i386/kernel/e820.c
+++ b/arch/i386/kernel/e820.c
@@ -393,10 +393,8 @@ int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
393 ____________________33__ 393 ____________________33__
394 ______________________4_ 394 ______________________4_
395 */ 395 */
396 printk("sanitize start\n");
397 /* if there's only one memory region, don't bother */ 396 /* if there's only one memory region, don't bother */
398 if (*pnr_map < 2) { 397 if (*pnr_map < 2) {
399 printk("sanitize bail 0\n");
400 return -1; 398 return -1;
401 } 399 }
402 400
@@ -405,7 +403,6 @@ int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
405 /* bail out if we find any unreasonable addresses in bios map */ 403 /* bail out if we find any unreasonable addresses in bios map */
406 for (i=0; i<old_nr; i++) 404 for (i=0; i<old_nr; i++)
407 if (biosmap[i].addr + biosmap[i].size < biosmap[i].addr) { 405 if (biosmap[i].addr + biosmap[i].size < biosmap[i].addr) {
408 printk("sanitize bail 1\n");
409 return -1; 406 return -1;
410 } 407 }
411 408
@@ -501,7 +498,6 @@ int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
501 memcpy(biosmap, new_bios, new_nr*sizeof(struct e820entry)); 498 memcpy(biosmap, new_bios, new_nr*sizeof(struct e820entry));
502 *pnr_map = new_nr; 499 *pnr_map = new_nr;
503 500
504 printk("sanitize end\n");
505 return 0; 501 return 0;
506} 502}
507 503
@@ -532,7 +528,6 @@ int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
532 unsigned long long size = biosmap->size; 528 unsigned long long size = biosmap->size;
533 unsigned long long end = start + size; 529 unsigned long long end = start + size;
534 unsigned long type = biosmap->type; 530 unsigned long type = biosmap->type;
535 printk("copy_e820_map() start: %016Lx size: %016Lx end: %016Lx type: %ld\n", start, size, end, type);
536 531
537 /* Overflow in 64 bits? Ignore the memory map. */ 532 /* Overflow in 64 bits? Ignore the memory map. */
538 if (start > end) 533 if (start > end)
@@ -543,17 +538,11 @@ int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
543 * Not right. Fix it up. 538 * Not right. Fix it up.
544 */ 539 */
545 if (type == E820_RAM) { 540 if (type == E820_RAM) {
546 printk("copy_e820_map() type is E820_RAM\n");
547 if (start < 0x100000ULL && end > 0xA0000ULL) { 541 if (start < 0x100000ULL && end > 0xA0000ULL) {
548 printk("copy_e820_map() lies in range...\n"); 542 if (start < 0xA0000ULL)
549 if (start < 0xA0000ULL) {
550 printk("copy_e820_map() start < 0xA0000ULL\n");
551 add_memory_region(start, 0xA0000ULL-start, type); 543 add_memory_region(start, 0xA0000ULL-start, type);
552 } 544 if (end <= 0x100000ULL)
553 if (end <= 0x100000ULL) {
554 printk("copy_e820_map() end <= 0x100000ULL\n");
555 continue; 545 continue;
556 }
557 start = 0x100000ULL; 546 start = 0x100000ULL;
558 size = end - start; 547 size = end - start;
559 } 548 }