summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorgonzo <gonzo@FreeBSD.org>2010-12-09 07:01:03 +0000
committergonzo <gonzo@FreeBSD.org>2010-12-09 07:01:03 +0000
commit8ae51d5a21a1fc98aff0548e431f4a2892128289 (patch)
tree84bf289479a5756413146b50f58901a4d79802a1 /sys/mips
parent012e7effe8b74bcbabfe1dc56b95ee94e3ca056b (diff)
downloadFreeBSD-src-8ae51d5a21a1fc98aff0548e431f4a2892128289.zip
FreeBSD-src-8ae51d5a21a1fc98aff0548e431f4a2892128289.tar.gz
- Populate dump_avail with proper values from phys_avail
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/adm5120/adm5120_machdep.c3
-rw-r--r--sys/mips/alchemy/alchemy_machdep.c3
-rw-r--r--sys/mips/atheros/ar71xx_machdep.c3
-rw-r--r--sys/mips/cavium/octeon_machdep.c10
-rw-r--r--sys/mips/idt/idt_machdep.c3
-rw-r--r--sys/mips/malta/malta_machdep.c3
-rw-r--r--sys/mips/rmi/xlr_machdep.c7
-rw-r--r--sys/mips/sentry5/s5_machdep.c7
-rw-r--r--sys/mips/sibyte/sb_machdep.c7
9 files changed, 43 insertions, 3 deletions
diff --git a/sys/mips/adm5120/adm5120_machdep.c b/sys/mips/adm5120/adm5120_machdep.c
index 90a6b90..39440ff 100644
--- a/sys/mips/adm5120/adm5120_machdep.c
+++ b/sys/mips/adm5120/adm5120_machdep.c
@@ -97,6 +97,9 @@ mips_init(void)
phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end);
phys_avail[1] = ctob(realmem);
+ dump_avail[0] = phys_avail[0];
+ dump_avail[1] = phys_avail[1] - phys_avail[0];
+
physmem = realmem;
init_param1();
diff --git a/sys/mips/alchemy/alchemy_machdep.c b/sys/mips/alchemy/alchemy_machdep.c
index a94d995..600926a 100644
--- a/sys/mips/alchemy/alchemy_machdep.c
+++ b/sys/mips/alchemy/alchemy_machdep.c
@@ -97,6 +97,9 @@ mips_init(void)
phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end);
phys_avail[1] = ctob(realmem);
+ dump_avail[0] = phys_avail[0];
+ dump_avail[1] = phys_avail[1] - phys_avail[0];
+
physmem = realmem;
init_param1();
diff --git a/sys/mips/atheros/ar71xx_machdep.c b/sys/mips/atheros/ar71xx_machdep.c
index ec355cc..c8abc74 100644
--- a/sys/mips/atheros/ar71xx_machdep.c
+++ b/sys/mips/atheros/ar71xx_machdep.c
@@ -184,6 +184,9 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused,
phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end);
phys_avail[1] = ctob(realmem);
+ dump_avail[0] = phys_avail[0];
+ dump_avail[1] = phys_avail[1] - phys_avail[0];
+
physmem = realmem;
/*
diff --git a/sys/mips/cavium/octeon_machdep.c b/sys/mips/cavium/octeon_machdep.c
index 886595c..839310a 100644
--- a/sys/mips/cavium/octeon_machdep.c
+++ b/sys/mips/cavium/octeon_machdep.c
@@ -265,7 +265,7 @@ octeon_memory_init(void)
{
vm_paddr_t phys_end;
int64_t addr;
- unsigned i;
+ unsigned i, j;
phys_end = round_page(MIPS_KSEG0_TO_PHYS((vm_offset_t)&end));
@@ -274,6 +274,9 @@ octeon_memory_init(void)
phys_avail[0] = phys_end;
phys_avail[1] = 96 << 20;
+ dump_avail[0] = phys_avail[0];
+ dump_avail[1] = phys_avail[1] - phys_avail[0];
+
realmem = physmem = btoc(phys_avail[1] - phys_avail[0]);
return;
}
@@ -314,6 +317,11 @@ octeon_memory_init(void)
i += 2;
}
+ for (j = 0; j < i; j += 2) {
+ 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 0dfee66..c7f3878 100644
--- a/sys/mips/idt/idt_machdep.c
+++ b/sys/mips/idt/idt_machdep.c
@@ -167,6 +167,9 @@ platform_start(__register_t a0, __register_t a1,
phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end);
phys_avail[1] = ctob(realmem);
+ dump_avail[0] = phys_avail[0];
+ dump_avail[1] = phys_avail[1] - phys_avail[0];
+
physmem = realmem;
/*
diff --git a/sys/mips/malta/malta_machdep.c b/sys/mips/malta/malta_machdep.c
index 6cbdcd8..f6257dd 100644
--- a/sys/mips/malta/malta_machdep.c
+++ b/sys/mips/malta/malta_machdep.c
@@ -181,6 +181,9 @@ mips_init(void)
phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end);
phys_avail[1] = ctob(realmem);
+ dump_avail[0] = phys_avail[0];
+ dump_avail[1] = phys_avail[1] - phys_avail[0];
+
physmem = realmem;
init_param1();
diff --git a/sys/mips/rmi/xlr_machdep.c b/sys/mips/rmi/xlr_machdep.c
index 8f96633..5cc4fc2 100644
--- a/sys/mips/rmi/xlr_machdep.c
+++ b/sys/mips/rmi/xlr_machdep.c
@@ -363,6 +363,9 @@ 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;
+
} else {
/*
* Can't use this code yet, because most of the fixed allocations happen from
@@ -390,6 +393,10 @@ xlr_mem_init(void)
(void *)phys_avail[j],
(void *)phys_avail[j+1]);
}
+
+ dump_avail[j] = boot_map->physmem_map[j].addr;
+ dump_avail[j+1] = boot_map->physmem_map[j].size;
+
physsz += boot_map->physmem_map[i].size;
}
}
diff --git a/sys/mips/sentry5/s5_machdep.c b/sys/mips/sentry5/s5_machdep.c
index 00e6231..9f6bdff 100644
--- a/sys/mips/sentry5/s5_machdep.c
+++ b/sys/mips/sentry5/s5_machdep.c
@@ -91,7 +91,7 @@ platform_cpu_init()
static void
mips_init(void)
{
- int i;
+ int i, j;
printf("entry: mips_init()\n");
@@ -128,6 +128,11 @@ mips_init(void)
realmem = btoc(physmem);
#endif
+ for (j = 0; j < i; j += 2) {
+ dump_avail[j] = phys_avail[j];
+ dump_avail[j+1] = phys_avail[j+1] - phys_avail[j];
+ }
+
physmem = realmem;
init_param1();
diff --git a/sys/mips/sibyte/sb_machdep.c b/sys/mips/sibyte/sb_machdep.c
index ba4b62e9..edf5009 100644
--- a/sys/mips/sibyte/sb_machdep.c
+++ b/sys/mips/sibyte/sb_machdep.c
@@ -138,7 +138,7 @@ sb_intr_init(int cpuid)
static void
mips_init(void)
{
- int i, cfe_mem_idx, tmp;
+ int i, j, cfe_mem_idx, tmp;
uint64_t maxmem;
#ifdef CFE_ENV
@@ -225,6 +225,11 @@ mips_init(void)
realmem = btoc(physmem);
#endif
+ for (j = 0; j < i; j += 2) {
+ dump_avail[j] = phys_avail[j];
+ dump_avail[j+1] = phys_avail[j+1] - phys_avail[j];
+ }
+
physmem = realmem;
init_param1();
OpenPOWER on IntegriCloud