From f62cda71542930a365fdb33253b1349da40fcec6 Mon Sep 17 00:00:00 2001 From: gonzo Date: Thu, 9 Dec 2010 07:47:40 +0000 Subject: - dump_avail layout should be sequence of [start, end) pairs, not . Spotted by: alc@ --- sys/mips/adm5120/adm5120_machdep.c | 2 +- sys/mips/alchemy/alchemy_machdep.c | 2 +- sys/mips/cavium/octeon_machdep.c | 6 ++---- sys/mips/idt/idt_machdep.c | 2 +- sys/mips/malta/malta_machdep.c | 2 +- sys/mips/rmi/xlr_machdep.c | 8 ++++---- sys/mips/sentry5/s5_machdep.c | 4 +--- sys/mips/sibyte/sb_machdep.c | 4 +--- 8 files changed, 12 insertions(+), 18 deletions(-) diff --git a/sys/mips/adm5120/adm5120_machdep.c b/sys/mips/adm5120/adm5120_machdep.c index 39440ff..bc7b7b0 100644 --- a/sys/mips/adm5120/adm5120_machdep.c +++ b/sys/mips/adm5120/adm5120_machdep.c @@ -98,7 +98,7 @@ mips_init(void) phys_avail[1] = ctob(realmem); dump_avail[0] = phys_avail[0]; - dump_avail[1] = phys_avail[1] - phys_avail[0]; + dump_avail[1] = phys_avail[1]; physmem = realmem; diff --git a/sys/mips/alchemy/alchemy_machdep.c b/sys/mips/alchemy/alchemy_machdep.c index 600926a..047fa42 100644 --- a/sys/mips/alchemy/alchemy_machdep.c +++ b/sys/mips/alchemy/alchemy_machdep.c @@ -98,7 +98,7 @@ mips_init(void) phys_avail[1] = ctob(realmem); dump_avail[0] = phys_avail[0]; - dump_avail[1] = phys_avail[1] - phys_avail[0]; + dump_avail[1] = phys_avail[1]; physmem = realmem; diff --git a/sys/mips/cavium/octeon_machdep.c b/sys/mips/cavium/octeon_machdep.c index 839310a..edb92af 100644 --- a/sys/mips/cavium/octeon_machdep.c +++ b/sys/mips/cavium/octeon_machdep.c @@ -275,7 +275,7 @@ octeon_memory_init(void) phys_avail[1] = 96 << 20; dump_avail[0] = phys_avail[0]; - dump_avail[1] = phys_avail[1] - phys_avail[0]; + dump_avail[1] = phys_avail[1]; realmem = physmem = btoc(phys_avail[1] - phys_avail[0]); return; @@ -317,10 +317,8 @@ octeon_memory_init(void) i += 2; } - for (j = 0; j < i; j += 2) { + for (j = 0; j < i; j++) dump_avail[j] = phys_avail[j]; - dump_avail[j+1] = phys_avail[j+1] - phys_avail[j]; - } realmem = physmem; } diff --git a/sys/mips/idt/idt_machdep.c b/sys/mips/idt/idt_machdep.c index c7f3878..6c76c26 100644 --- a/sys/mips/idt/idt_machdep.c +++ b/sys/mips/idt/idt_machdep.c @@ -168,7 +168,7 @@ platform_start(__register_t a0, __register_t a1, phys_avail[1] = ctob(realmem); dump_avail[0] = phys_avail[0]; - dump_avail[1] = phys_avail[1] - phys_avail[0]; + dump_avail[1] = phys_avail[1]; physmem = realmem; diff --git a/sys/mips/malta/malta_machdep.c b/sys/mips/malta/malta_machdep.c index f6257dd..0ff34cb 100644 --- a/sys/mips/malta/malta_machdep.c +++ b/sys/mips/malta/malta_machdep.c @@ -182,7 +182,7 @@ mips_init(void) phys_avail[1] = ctob(realmem); dump_avail[0] = phys_avail[0]; - dump_avail[1] = phys_avail[1] - phys_avail[0]; + dump_avail[1] = phys_avail[1]; physmem = realmem; diff --git a/sys/mips/rmi/xlr_machdep.c b/sys/mips/rmi/xlr_machdep.c index 5cc4fc2..5a5bb79 100644 --- a/sys/mips/rmi/xlr_machdep.c +++ b/sys/mips/rmi/xlr_machdep.c @@ -363,8 +363,8 @@ xlr_mem_init(void) (void *)phys_avail[0], (void *)phys_avail[1]); - dump_avail[0] = boot_map->physmem_map[0].addr; - dump_avail[1] = boot_map->physmem_map[0].size; + dump_avail[0] = phys_avail[0]; + dump_avail[1] = phys_avail[1]; } else { /* @@ -394,8 +394,8 @@ xlr_mem_init(void) (void *)phys_avail[j+1]); } - dump_avail[j] = boot_map->physmem_map[j].addr; - dump_avail[j+1] = boot_map->physmem_map[j].size; + dump_avail[j] = phys_avail[j]; + dump_avail[j+1] = phys_avail[j+1]; physsz += boot_map->physmem_map[i].size; } diff --git a/sys/mips/sentry5/s5_machdep.c b/sys/mips/sentry5/s5_machdep.c index 9f6bdff..4491b93 100644 --- a/sys/mips/sentry5/s5_machdep.c +++ b/sys/mips/sentry5/s5_machdep.c @@ -128,10 +128,8 @@ mips_init(void) realmem = btoc(physmem); #endif - for (j = 0; j < i; j += 2) { + for (j = 0; j < i; j++) dump_avail[j] = phys_avail[j]; - dump_avail[j+1] = phys_avail[j+1] - phys_avail[j]; - } physmem = realmem; diff --git a/sys/mips/sibyte/sb_machdep.c b/sys/mips/sibyte/sb_machdep.c index edf5009..ac30451 100644 --- a/sys/mips/sibyte/sb_machdep.c +++ b/sys/mips/sibyte/sb_machdep.c @@ -225,10 +225,8 @@ mips_init(void) realmem = btoc(physmem); #endif - for (j = 0; j < i; j += 2) { + for (j = 0; j < i; j++) dump_avail[j] = phys_avail[j]; - dump_avail[j+1] = phys_avail[j+1] - phys_avail[j]; - } physmem = realmem; -- cgit v1.1