mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
- Populate dump_avail with proper values from phys_avail
This commit is contained in:
parent
aa93efedd8
commit
99629fa36d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216318
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user